Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental configuration-based nixvim template #2854

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Jan 18, 2025

Adds an experimental flake template that configures Nixvim directly using evalNixvim rather than the current standalone functions.

Related issues:

Todo:

  • Document new template/approach
  • A flake-parts module for perSystem.nixvimConfigurations
  • Document new flake-parts module
  • Ensure all template's checks are inherited into the main flake's checks
  • Make evalNixvim easier to access (top-level aliases)
  • Include nixvim-print-init in build.package
  • Include man-docs in build.package

Since this is experimental/draft, we don't need to tick off everything above before merging.

- `lib.nixvim.evalNixvim`
- `<nixvim>.lib.evalNixvim` (flake output)
@MattSturgeon MattSturgeon force-pushed the template/evalNixvim branch 2 times, most recently from 46cca53 to b92e08c Compare January 18, 2025 08:39
Can be used by end-users to define `perSystem.nixvimConfigurations`
using flake-parts.
@GaetanLepage
Copy link
Member

This looks very promising !

@traxys
Copy link
Member

traxys commented Jan 18, 2025

As we are defining a flake parts module could we make it such that it automatically adds a package.${system}.nvim entry set to config.nixvimConfigurations.default.config.build.package and a check.${system}.nvim set to config.nixvimConfigurations.default.config.build.test if they exist?

We could add flake module options to disable this behaviour as needed. It's maybe a bit too magic?

Alternatively we could add nvim-${name} entries for each configuration in config.nixvimConfigurations

@MattSturgeon
Copy link
Member Author

I'm moving the flake-parts module stuff to a dedicated PR: #2858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants