From 1b73e78788e1931285fa6335763a0a7ad4f152e4 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 15:19:00 +0300 Subject: [PATCH 01/33] docs/manual: move v0.9 entries to the correct file; format Signed-off-by: NotAShelf Change-Id: I593bbd1dbfd60215e317360d1652588a6a6a6964 --- docs/manual/release-notes/rl-0.8.md | 6 ------ docs/manual/release-notes/rl-0.9.md | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 docs/manual/release-notes/rl-0.9.md diff --git a/docs/manual/release-notes/rl-0.8.md b/docs/manual/release-notes/rl-0.8.md index fadb2e69..62f42638 100644 --- a/docs/manual/release-notes/rl-0.8.md +++ b/docs/manual/release-notes/rl-0.8.md @@ -621,9 +621,3 @@ [JudahZF](https://github.com/JudahZF): - Added gitFiles mapping option to telescope - -[Ring-A-Ding-Ding-Baby](https://github.com/Ring-A-Ding-Ding-Baby) - -- Aligned `codelldb` adapter setup with [rustaceanvim]’s built-in logic. -- Added `languages.rust.dap.backend` option to choose between `codelldb` and - `lldb-dap` adapters. diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md new file mode 100644 index 00000000..c12e3558 --- /dev/null +++ b/docs/manual/release-notes/rl-0.9.md @@ -0,0 +1,9 @@ +# Release 0.5 {#sec-release-0-9} + +## Changelog {#sec-release-0-9-changelog} + +[Ring-A-Ding-Ding-Baby](https://github.com/Ring-A-Ding-Ding-Baby): + +- Aligned `codelldb` adapter setup with [rustaceanvim]’s built-in logic. +- Added `languages.rust.dap.backend` option to choose between `codelldb` and + `lldb-dap` adapters. From 858717bed77985c7bb8e356a53bb8d84060da792 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 15:19:25 +0300 Subject: [PATCH 02/33] docs/manual: fix minor typos; revamp contributing section Signed-off-by: NotAShelf Change-Id: Ibb76402cc1e759b404a5c8905109604c6a6a6964 --- docs/manual/hacking.md | 368 +++++++++++++++++++++++++++++------------ docs/manual/index.md | 29 +++- 2 files changed, 286 insertions(+), 111 deletions(-) diff --git a/docs/manual/hacking.md b/docs/manual/hacking.md index 7af0fed9..1dd5aa47 100644 --- a/docs/manual/hacking.md +++ b/docs/manual/hacking.md @@ -3,12 +3,13 @@ [open issues]: https://github.com/notashelf/nvf/issues [new issue]: https://github.com/notashelf/nvf/issues/new -nvf is designed for the developer as much as it is designed for the end-user. We -would like for any contributor to be able to propagate their changes, or add new -features to the project with minimum possible friction. As such, below are the -guides and guidelines written to streamline the contribution process and to -ensure that your valuable input integrates into nvf's development as seamlessly -as possible without leaving any question marks in your head. +**nvf** is designed for the developer as much as it is designed for the +end-user. We would like for any contributor to be able to propagate their +changes, or add new features to the project with minimum possible friction. As +such, below are the guides and guidelines written to streamline the contribution +process and to ensure that your valuable input integrates into **nvf**'s +development as seamlessly as possible without leaving any question marks in your +head. This section is directed mainly towards those who wish to contribute code into the project. If you instead wish to report a bug, or discuss a potential new @@ -23,24 +24,51 @@ please do not be afraid to submit a pull request, we will help you get it in. ## Getting Started {#sec-contrib-getting-started} -You, naturally, would like to start by forking the repository to get started. If -you are new to Git and GitHub, do have a look at GitHub's -[Fork a repo guide](https://help.github.com/articles/fork-a-repo/) for -instructions on how you can do this. Once you have a fork of **nvf**, you should -create a separate branch based on the most recent `main` branch. Give your -branch a reasonably descriptive name (e.g. `feature/debugger` or -`fix/pesky-bug`) and you are ready to work on your changes +[Fork a repo guide]: https://help.github.com/articles/fork-a-repo/ +[Contributing Guidelines]: #sec-guidelines +[Create a Pull Request]: https://help.github.com/articles/creating-a-pull-request + +To contribute to **nvf**, you'll first want to fork the repository. If you are +new to Git and GitHub, do have a look at GitHub's [Fork a repo guide] for +instructions on how you can do this. Once your fork is created, you should +create a separate branch based on the most recent `main` branch. While you _can_ +work on the main branch of your repository, it is generally preferable to use +feature branches. You should give your branch a reasonably descriptive name +(e.g. `feature/new-debugger` or `fix/pesky-bug`) and you are ready to work on +your changes! Implement your changes and commit them to the newly created branch and when you are happy with the result, and positive that it fulfills our -[Contributing Guidelines](#sec-guidelines), push the branch to GitHub and -[create a pull request](https://help.github.com/articles/creating-a-pull-request). +[Contributing Guidelines], push the branch to GitHub and [Create a Pull Request] The default pull request template available on the **nvf** repository will guide you through the rest of the process, and we'll gently nudge you in the correct direction if there are any mistakes. +Before submitting your pull request, please ensure that: + +- The code is formatted as described in the formatting section +- The commit message fits the contributing guidelines (**nvf** does not use + Conventional Commits!) +- You have updated the changelog entry and optionally updated the documentation + with important information + +None of those are reasons for a Pull Request to be closed, but it will reduce +the number of roundtrips required before we can merge your Pull Request. + +> [!IMPORTANT] +> If you do not agree with the idea of using Microsoft GitHub for contributions, +> that is perfectly understandable. Unless you refuse to have your code hosted +> on this platform, you may submit _patches_ through e-mail. +> +> You may send your patches to [@NotAShelf](https://github.com/notashelf) using +> the public e-mail located on the GitHub page. Though, please remember to +> adhere to the contributing guidelines strictly as e-mail instroduces a +> significant overhead to the communication process. + ## Guidelines {#sec-guidelines} +[discussions tab]: https://github.com/NotAShelf/nvf/discussions + If your contribution tightly follows the guidelines, then there is a good chance it will be merged without too much trouble. Some of the guidelines will be strictly enforced, others will remain as gentle nudges towards the correct @@ -48,34 +76,26 @@ direction. As we have no automated system enforcing those guidelines, please try to double check your changes before making your pull request in order to avoid "faulty" code slipping by. -If you are uncertain how these rules affect the change you would like to make -then feel free to start a discussion in the -[discussions tab](https://github.com/NotAShelf/nvf/discussions) ideally (but not -necessarily) before you start developing. +If you are not quite certain how those rules affect the change you are planning +to make, then please start a friendly discussion in the [discussions tab] before +you begin developing. This is not a requirement, but it might answer some of +your burning questions and make the contribution process easier for all parties. -### Adding Documentation {#sec-guidelines-documentation} +### Formatting {#sec-guidelines-formatting} -[Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax +[code style section]: #sec-guidelines-code-style -Almost all changes warrant updates to the documentation: at the very least, you -must update the changelog. Both the manual and module options use -[Nixpkgs Flavoured Markdown]. +There are various files within the **nvf** repository. To maintain a sense of +consistency and to avoid clashing opinions on how formatters should behave, we +are very opinionated on how those files should be formatted. -The HTML version of this manual containing both the module option descriptions -and the documentation of **nvf** (such as this page) can be generated and opened -by typing the following in a shell within a clone of the **nvf** Git repository: +- Nix files **must** be formatted with the Alejandra formatter, following some + specific tips found in [Nix style section](#nix-sec-code-style-nix). +- Markdown files **must** be formatted with the `deno fmt` command, as described + in the [Markdown style section](#sec-code-style-markdown). -```console -$ nix build .#docs-html -$ xdg-open $PWD/result/share/doc/nvf/index.html -``` - -### Formatting Code {#sec-guidelines-formatting} - -Make sure your code is formatted as described in -[code-style section](#sec-guidelines-code-style). To maintain consistency -throughout the project you are encouraged to browse through existing code and -adopt its style also in new code. +Make sure your code is formatted as described in [code style section] before +your changes are submitted. ### Formatting Commits {#sec-guidelines-commit-message-style} @@ -98,27 +118,29 @@ The commit messages should follow the component or module in the first line. A commit message ideally, but not necessarily, follow the given template from home-manager's own documentation -``` - {component}: {description} +```gitcommit +{component}: {description} - {long description} +{long description} ``` where `{component}` refers to the code component (or module) your change affects, `{description}` is a very brief description of your change, and -`{long description}` is an optional clarifying description. As a rare exception, -if there is no clear component, or your change affects many components, then the -`{component}` part is optional. See -[example commit message](#sec-guidelines-ex-commit-message) for a commit message -that fulfills these requirements. +`{long description}` is an optional clarifying description. + +[example commit message]: #sec-guidelines-ex-commit-message + +As a rare exception, if there is no clear component, or your change affects many +components, then the `{component}` part is optional. See +[example commit message] for a commit message that fulfills these requirements. #### Example Commit {#sec-guidelines-ex-commit-message} -The commit -[69f8e47e9e74c8d3d060ca22e18246b7f7d988ef](https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef) -in home-manager contains the following commit message. +[sample commit from Home Manager]: https://github.com/nix-community/home-manager/commit/69f8e47e9e74c8d3d060ca22e18246b7f7d988ef -``` +The [sample commit from Home Manager] contains the following commit message. + +```gitcommit starship: allow running in Emacs if vterm is used The vterm buffer is backed by libvterm and can handle Starship prompts @@ -128,30 +150,63 @@ without issues. Similarly, if you are contributing to **nvf**, you would include the scope of the commit followed by the description: -``` +```gitcommit languages/ruby: init module -Adds a language module for Ruby, adds appropriate formatters and Treesitter grammars +Adds a language module for Ruby, adds appropriate formatters and Treesitter +grammars ``` Long description can be omitted if the change is too simple to warrant it. A minor fix in spelling or a formatting change does not warrant long description, however, a module addition or removal does as you would like to provide the -relevant context, i.e. the reasoning behind it, for your commit. +relevant context, i.e., the reasoning for your commit. -Finally, when adding a new module, say `modules/foo.nix`, we use the fixed -commit format `foo: add module`. You can, of course, still include a long -description if you wish. +For new plugin additions, the following is a good starting point: -In case of nested modules, i.e `modules/languages/java.nix` you are recommended -to contain the parent as well - for example `languages/java: some major change`. +```gitcommit +plugin: init +``` + +You can, of course, still include a long description if you wish. + +```gitcommit +neotree: init + +This adds the neo-tree plugin. +``` + +In case of nested modules, e.g., `modules/languages/java.nix` you are +recommended to contain the parent as well -- for example +`languages/java: some major change` , or if it's a new language module, +`languages/java: init` ### Code Style {#sec-guidelines-code-style} #### Treewide {#sec-code-style-treewide} -Keep lines at a reasonable width, ideally 80 characters or less. This also -applies to string literals and module descriptions and documentation. +Across the tree, you're encouraged to follow kebab-case for file names, and keep +text files (such as Markdown) to 80 characters or less. This 80 character +recommendation also applies to option descriptions and string literals inside of +Nix files. + +#### Markdown {#sec-code-style-markdown} + +Various Markdown files are used for documentation in the **nvf** repository. +Besides the README, the manual is written almost entirely in Markdown. Since +**nvf** uses a special variant of CommonMark, dubbed "Nixpkgs-flavored +CommonMark" within this repository, you are encouraged to use the `deno fmt` +command (provided by `pkgs.deno`) to format your Markdown sources. To avoid +accidentally formatting HTML or CSS files, you might want to specify the file +extension as follows: + +```bash +# Format all Markdown files within the repository +$ deno fmt --ext md **/*.md +``` + +You may also pass `--check` to the `deno fmt` command above to see if your +formatting complies with the project standards. #### Nix {#sec-code-style-nix} @@ -165,12 +220,16 @@ While Alejandra is mostly opinionated on how code looks after formatting, certain changes are done at the user's discretion based on how the original code was structured. +##### Attribute Sets + Please use one line code for attribute sets that contain only one subset. For example: + + ```nix -# parent modules should always be unfolded -# which means module = { value = ... } instead of module.value = { ... } +# Parent modules should always be unfolded. +# which means `module = { value = ... }` instead of `module.value = { ... }`. module = { value = mkEnableOption "some description" // { default = true; }; # merges can be done inline where possible @@ -190,23 +249,45 @@ module = { } ``` + + If you move a line down after the merge operator, Alejandra will automatically -unfold the whole merged attrset for you, which we **do not** want. +unfold the whole merged attribute set for you, which we **do not** want. ```nix module = { + # This is wrong! key = mkEnableOption "some description" // { default = true; # we want this to be inline - }; # ... + }; + + # ... } ``` +Though, if the right-hand side is more than a single line, it is okay to move to +a new line. For example: + +```nix +module = { + # This is okay! + key = mkEnableOption "some description" // { + default = true; + example = false; + }; + + # ... +} +``` + +##### Lists + For lists, it is mostly up to your own discretion how you want to format them, but please try to unfold lists if they contain multiple items and especially if they are to include comments. ```nix -# this is ok +# This is ok acceptableList = [ item1 # comment item2 @@ -214,14 +295,14 @@ acceptableList = [ item4 ]; -# this is not ok +# This is *not* ok listToBeAvoided = [item1 item2 /* comment */ item3 item4]; -# this is ok +# This is ok acceptableList = [item1 item2]; -# this is also ok if the list is expected to contain more elements -acceptableList= [ +# This is also ok if the list is expected to contain more elements +acceptableList = [ item1 item2 # more items if needed... @@ -244,6 +325,81 @@ module you have changed is enabled in the maximal configuration by editing `configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same procedure as adding a new module will apply here. +## Adding Documentation {#sec-guidelines-documentation} + +[Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax +[in-house documentation generator]: https://github.com/feel-co/ndg + +Almost all changes to **nvf**'s codebase warrant updates to the documentation. +At the very least, you must update the relevant changelog document to describe +your changes. The documentation files found within the repository use a superset +of [Nixpkgs Flavoured Markdown] thanks to our +[in-house documentation generator]. + +As a general rule of thumb: + +- Everything in the CommonMark spec is supported +- Everything in Nixpkgs Flavoured Markdown is supported +- Github Flavored Markdown is supported for Tables and Admonitions + +By feeding NDG, our documentation generator, Markdown sources we can generate a +HTML manual with various goodies, including a **search page** and an **options +page**. The latter, found under `options.html` contains module options, similar +to the official Nixpkgs search utility. + +The HTML version of this documentation, dubbed the "nvf manual", can be +generated and opened by typing the following in a shell within a clone of the +**nvf** Git repository: + +```sh +# Build the online manual +$ nix build .#docs-html + +# Open it with a valid browser +$ xdg-open $PWD/result/share/doc/nvf/index.html +``` + +Additionally, if you are adding new links to the documentation it is **generally +recommended** that you run the package that identifies dead URLs in the +documentation: + +```sh +# Build the link checker package +$ nix build .#docs-linkcheck +``` + +You must ensure that the **HTML Documentation** builds before submitting a pull +request. + +### Formatting Changelog Entries + +For additions, removals or any general change that concerns the users you must +add a changelog entry. The changelog entries are later included in the rendered +manual for users hoping to learn what has changed. + +To maintain consistency, you must follow the following format in the changelog: + +```markdown +[](https://github.com/): + +- Added ... +- Removed ... +- Changed ... +``` + +```markdown +# Release 0.9 {#sec-release-0-9} + +## Breaking changes + +- We broke everything, please migrate! +``` + +If you are introducing _breaking_ changes to the repository, then you must also +briefly mention what has changed in the breaking changes section of the +changelog document that you are editing. If this section does not yet exist, you +must create it. + ## Keybinds {#sec-keybinds} As of 0.4, there exists an API for writing your own keybinds and a couple of @@ -252,7 +408,7 @@ useful utility functions are available in the following section contains a general overview to how you may utilize said functions. -## Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings} +### Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings} To set a mapping, you should define it in `vim.keymaps`. @@ -273,12 +429,12 @@ An example, simple keybinding, can look like this: ``` There are many settings available in the options. Please refer to the -[documentation](./options.html#option-vim-keymaps) to see a list of them. +[documentation](/options.html#option-vim-keymaps) to see a list of them. **nvf** provides a helper function, so that you don't have to write the mapping attribute sets every time: -- `mkKeymap`, which mimics neovim's `vim.keymap.set` function +- `mkKeymap`, which mimics Neovim's `vim.keymap.set` function You can read the source code of some modules to see them in action, but the usage should look something like this: @@ -304,6 +460,8 @@ in { } ``` + + ```nix # config.nix { @@ -333,26 +491,29 @@ in { } ``` -> [!NOTE] + + +> [!TIP] > If you have come across a plugin that has an API that doesn't seem to easily > allow custom keybindings, don't be scared to implement a draft PR. We'll help > you get it done. ## Adding Plugins {#sec-additional-plugins} -There are two methods for adding new Neovim plugins to **nvf**. npins is the -faster option that should be preferred if the plugin consists of pure Lua or -Vimscript code. In which case there is no building required, and we can easily -handle the copying of plugin files. Alternative method, which is required when -plugins try to build their own libraries (e.g., in Rust or C) that need to be -built with Nix to function correctly. +**nvf** generally tries to avoid using Neovim plugins from Nixpkgs, and thus +uses one of the two alternative methods where applicable. npins is the faster +option that should be preferred if the plugin consists of pure Lua or Vimscript +code. In which case there is no building required, and we can easily handle the +copying of plugin files. Alternative method, which is required when plugins try +to build their own libraries (e.g., in Rust, C or even Assembly) that need to be +built with Nix to function correctly. In this case you must use a local overlay. ### With npins {#sec-npins-for-plugins} -npins is the standard method of adding new plugins to **nvf**. You simply need -the repository URL for the plugin, and can add it as a source to be built -automatically with one command. To add a new Neovim plugin, use `npins`. For -example: +npins is the standard, and as described above, the _faster_ method of adding new +plugins to **nvf**. You simply need the repository URL for the plugin, and you +can add it as a source to be built automatically with just one command. To add a +new Neovim plugin, use `npins`. For example: ```bash nix-shell -p npins # or nix shell nixpkgs#npins if using flakes @@ -364,16 +525,13 @@ Then run: npins add --name github -b ``` -::: {.note} - -Be sure to replace any non-alphanumeric characters with `-` for `--name`. For -example - -```bash -npins add --name lazydev-nvim github folke lazydev.nvim -b main -``` - -::: +> [!NOTE] +> Be sure to replace any non-alphanumeric characters with `-` for `--name`. For +> example +> +> ```bash +> npins add --name lazydev-nvim github folke lazydev.nvim -b main +> ``` Once the `npins` command is done, you can start referencing the plugin as a **string**. @@ -399,15 +557,21 @@ We use `buildRustPackage` to build the library from the repository root, and copy everything in the `postInstall` phase. ```nix -postInstall = '' - cp -r {lua,plugin} "$out" +{ + # ... + + postInstall = '' + cp -r {lua,plugin} "$out" - mkdir -p "$out/doc" - cp 'doc/'*'.txt' "$out/doc/" + mkdir -p "$out/doc" + cp 'doc/'*'.txt' "$out/doc/" - mkdir -p "$out/target" - mv "$out/lib" "$out/target/release" -''; + mkdir -p "$out/target" + mv "$out/lib" "$out/target/release" + ''; + + # ... +} ``` In a similar fashion, you may utilize `stdenv.mkDerivation` and other Nixpkgs @@ -503,7 +667,7 @@ own fields! } ``` -### Details of toLuaObject {#sec-details-of-toluaobject} +### Details of `toLuaObject` {#sec-details-of-toluaobject} As you've seen above, `toLuaObject` is used to convert our nix attrSet `cfg.setupOpts`, into a lua table. Here are some rules of the conversion: @@ -544,7 +708,7 @@ As you've seen above, `toLuaObject` is used to convert our nix attrSet } ``` -### Lazy plugins {#sec-lazy-plugins} +### Lazy Loading Plugins {#sec-lazy-plugins} If the plugin can be lazy-loaded, `vim.lazy.plugins` should be used to add it. Lazy plugins are managed by `lz.n`. diff --git a/docs/manual/index.md b/docs/manual/index.md index b07a8aca..bb2a5901 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -1,6 +1,6 @@ # Introduction {#nvf-manual} -Version @NVF_VERSION@ +Generated for nvf @NVF_VERSION@ ## Preface {#ch-preface} @@ -8,11 +8,11 @@ Version @NVF_VERSION@ **nvf** is a highly modular, configurable, extensible and easy to use Neovim configuration framework built and designed to be used with Nix. Boasting -flexibility, robustness and ease of use, this projecct allows you to configure a +flexibility, robustness and ease of use, this project allows you to configure a fully featured Neovim instance with a few lines of Nix with lots of options for advanced users as well. -## Try it out {#ch-try-it-out} +## Try it Out {#ch-try-it-out} Thanks to the portability of Nix, you can try out nvf without actually installing it to your machine. Below are the commands you may run to try out @@ -27,20 +27,27 @@ You may try out any of the provided configurations using the `nix run` command on a system where Nix is installed. ```sh +# Add the nvf cache $ cachix use nvf # Optional: it'll save you CPU resources and time + +# Run the minimal configuration with the cache enabled $ nix run github:notashelf/nvf#nix # Will run the default minimal configuration ``` Do keep in mind that this is **susceptible to garbage collection** meaning that the built outputs will be removed from your Nix store once you garbage collect. -## Using Prebuilt Configs {#sec-using-prebuilt-configs} +## Using Prebuilt Configurations {#sec-using-prebuilt-configs} + + ```bash $ nix run github:notashelf/nvf#nix $ nix run github:notashelf/nvf#maximal ``` + + ### Available Configurations {#sec-available-configs} > [!NOTE] @@ -61,7 +68,7 @@ $ nix run github:notashelf/nvf#nix test.nix ``` This command will start Neovim with some opinionated plugin configurations, and -is designed specifically for Nix. the `nix` configuration lets you see how a +is designed specifically for Nix. The `nix` configuration lets you see how a fully configured Neovim setup _might_ look like without downloading too many packages or shell utilities. @@ -87,12 +94,16 @@ companion or fun plugins. ## Installing nvf {#ch-installation} + + [module installation section]: #ch-module-installation -There are multiple ways of installing nvf on your system. You may either choose -the standalone installation method, which does not depend on a module system and -may be done on any system that has the Nix package manager or the appropriate -modules for NixOS and home-manager as described in the + + +There are multiple ways of installing **nvf** on your system. You may either +choose the standalone installation method, which does not depend on a module +system and may be done on any system that has the Nix package manager or the +appropriate modules for NixOS and Home Manager as described in the [module installation section]. ```{=include=} From c6022aeab2ddb4ef2b40e2473483a081913709ed Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 15:50:25 +0300 Subject: [PATCH 03/33] flake: document 'develop' package better Signed-off-by: NotAShelf Change-Id: Ida5b35a258dcc8ffa6fa6d653b76ddb36a6a6964 --- flake/develop.nix | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/flake/develop.nix b/flake/develop.nix index 71c13688..c05b2a9a 100644 --- a/flake/develop.nix +++ b/flake/develop.nix @@ -1,15 +1,23 @@ {lib, ...}: { - perSystem = { - pkgs, - config, - self', - ... - }: { + perSystem = {pkgs, ...}: { + # The default dev shell provides packages required to interact with + # the codebase as described by the contributing guidelines. It includes the + # formatters required, and a few additional goodies for linting work. devShells = { - default = self'.devShells.lsp; - nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];}; - lsp = pkgs.mkShellNoCC { - packages = with pkgs; [nil statix deadnix alejandra npins]; + default = pkgs.mkShellNoCC { + packages = with pkgs; [ + # Nix tooling + nil # LSP + statix # static checker + deadnix # dead code finder + + # So that we can interact with plugin sources + npins + + # Formatters + alejandra + deno + ]; }; }; @@ -18,7 +26,11 @@ # testing, but make sure to discard the changes before creating a pull # request. packages.dev = let - configuration = {}; + configuration = { + # This is essentially the configuration that will be passed to the + # builder function. For example: + # vim.languages.nix.enable = true; + }; customNeovim = lib.nvim.neovimConfiguration { inherit pkgs; From 20bcf9e9467b1fe0b2cd735eaaa0b7542cb82b49 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 16:10:22 +0300 Subject: [PATCH 04/33] docs: link NDG syntax documentation; revise keymaps section Signed-off-by: NotAShelf Change-Id: Ie150938b131257fbc143f338b8d9956e6a6a6964 --- docs/manual/hacking.md | 289 ++++++++++++++++++++++++----------------- 1 file changed, 171 insertions(+), 118 deletions(-) diff --git a/docs/manual/hacking.md b/docs/manual/hacking.md index 1dd5aa47..c475d6ff 100644 --- a/docs/manual/hacking.md +++ b/docs/manual/hacking.md @@ -311,24 +311,52 @@ acceptableList = [ ## Testing Changes {#sec-testing-changes} -Once you have made your changes, you will need to test them thoroughly. If it is -a module, add your module option to `configuration.nix` (located in the root of -this project) inside `neovimConfiguration`. Enable it, and then run the maximal -configuration with `nix run .#maximal -Lv` to check for build errors. If neovim -opens in the current directory without any error messages (you can check the -output of `:messages` inside neovim to see if there are any errors), then your -changes are good to go. Open your pull request, and it will be reviewed as soon -as possible. +Once you have made your changes, you will need to test them thoroughly. To make +testing easier you may either use the `configuration.nix` located in the +repository root, or use the development package located in `flake/develop.nix`. +The development package allows you to quickly bootstrap a Neovim configuration +with only the required modules, instead of the packages that consume the +`configuration.nix`, so it is generally preferable. To use it navigate to the +`develop.nix` module, and update the `configuration` set with the Neovim +configuration that you would like to test with. For example: -If it is not a new module, but a change to an existing one, then make sure the -module you have changed is enabled in the maximal configuration by editing -`configuration.nix`, and then run it with `nix run .#maximal -Lv`. Same -procedure as adding a new module will apply here. +```nix +{ + # Let's assume you are adding a new module for the Nix language. + # You will need to enable it here + configuration = { + vim.languages.nix.enable = true; + + # You can also enable other plugins that you wish to test with, for example + # none-ls: + vim.lsp.null-ls = { + enable = true; + setupOpts = { /* Your setup options here */ }; + }; + }; +``` + +You may then run this package with `nix run .#develop` and check for build or +runtime errors. If Neovim builds and opens without any errors, then your changes +are good to go. Open your pull request, and it will be reviewed as soon as +possible. + +If your changes are rather large, or if you would like to instead test with a +more complex configuration then you might use the `configuration.nix` for +testing. Make your changes, and then build either the default or `maximal` +package to test your changes. + +> [!IMPORTANT] +> `configuration.nix` is a module used to bootstrap **demo** packages and should +> generally not be changed unless migrating old APIs or updating the set of +> default plugins. Similarly, the `develop.nix` file is for reference, and +> testing configurations **should not be committed**. ## Adding Documentation {#sec-guidelines-documentation} [Nixpkgs Flavoured Markdown]: https://github.com/NixOS/nixpkgs/blob/master/doc/README.md#syntax [in-house documentation generator]: https://github.com/feel-co/ndg +[library documentation]: https://github.com/feel-co/ndg/blob/main/ndg-commonmark/docs/SYNTAX.md Almost all changes to **nvf**'s codebase warrant updates to the documentation. At the very least, you must update the relevant changelog document to describe @@ -345,7 +373,10 @@ As a general rule of thumb: By feeding NDG, our documentation generator, Markdown sources we can generate a HTML manual with various goodies, including a **search page** and an **options page**. The latter, found under `options.html` contains module options, similar -to the official Nixpkgs search utility. +to the official Nixpkgs search utility. The supported syntax for NDG can be +found over at the [library documentation]. + +### Building the Documentation The HTML version of this documentation, dubbed the "nvf manual", can be generated and opened by typing the following in a shell within a clone of the @@ -369,7 +400,9 @@ $ nix build .#docs-linkcheck ``` You must ensure that the **HTML Documentation** builds before submitting a pull -request. +request. If the documentation builds, an automatic "preview" build will be +deployed automatically for your Pull Request. You may use this preview to view +your changes as your Pull Request is updated. ### Formatting Changelog Entries @@ -380,13 +413,30 @@ manual for users hoping to learn what has changed. To maintain consistency, you must follow the following format in the changelog: ```markdown -[](https://github.com/): +[username](https://github.com/username): - Added ... - Removed ... - Changed ... ``` +If this is your first contribution, you should add yourself to the changelog. +Linking your GitHub account is not a strict requirement; it can be any page that +people can use to discover you. Below the link to your profile, you should +include a brief description of your changes. Those descriptions must be in past +tense, unlike commit messages. + +While adding a new section, please insert the section at an arbitrary location +under the `## Changelog` section rather than the end of the document. This helps +avoid merge conflicts. + +### Breaking Changes + +If you are introducing _breaking_ changes to the repository, then you must also +briefly mention what has changed in the breaking changes section of the +changelog document that you are editing. If this section does not yet exist, you +must create it. + ```markdown # Release 0.9 {#sec-release-0-9} @@ -395,108 +445,10 @@ To maintain consistency, you must follow the following format in the changelog: - We broke everything, please migrate! ``` -If you are introducing _breaking_ changes to the repository, then you must also -briefly mention what has changed in the breaking changes section of the -changelog document that you are editing. If this section does not yet exist, you -must create it. - -## Keybinds {#sec-keybinds} - -As of 0.4, there exists an API for writing your own keybinds and a couple of -useful utility functions are available in the -[extended standard library](https://github.com/NotAShelf/nvf/tree/main/lib). The -following section contains a general overview to how you may utilize said -functions. - -### Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings} - -To set a mapping, you should define it in `vim.keymaps`. - -An example, simple keybinding, can look like this: - -```nix -{ - vim.keymaps = [ - { - key = "wq"; - mode = ["n"]; - action = ":wq"; - silent = true; - desc = "Save file and quit"; - } - ]; -} -``` - -There are many settings available in the options. Please refer to the -[documentation](/options.html#option-vim-keymaps) to see a list of them. - -**nvf** provides a helper function, so that you don't have to write the mapping -attribute sets every time: - -- `mkKeymap`, which mimics Neovim's `vim.keymap.set` function - -You can read the source code of some modules to see them in action, but the -usage should look something like this: - -```nix -# plugindefinition.nix -{lib, ...}: let - inherit (lib.options) mkEnableOption; - inherit (lib.nvim.binds) mkMappingOption; -in { - options.vim.plugin = { - enable = mkEnableOption "Enable plugin"; - - # Mappings should always be inside an attrset called mappings - mappings = { - workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "lwd"; - documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "ld"; - lspReferences = mkMappingOption "LSP References [trouble]" "lr"; - quickfix = mkMappingOption "QuickFix [trouble]" "xq"; - locList = mkMappingOption "LOCList [trouble]" "xl"; - symbols = mkMappingOption "Symbols [trouble]" "xs"; - }; -} -``` - - - -```nix -# config.nix -{ - config, - lib, - options, - ... -}: let - inherit (lib.modules) mkIf; - inherit (lib.nvim.binds) mkKeymap; - - cfg = config.vim.plugin; - - keys = cfg.mappings; - inherit (options.vim.lsp.trouble) mappings; -in { - config = mkIf cfg.enable { - vim.keymaps = [ - (mkKeymap "n" keys.workspaceDiagnostics "Trouble toggle diagnostics" {desc = mappings.workspaceDiagnostics.description;}) - (mkKeymap "n" keys.documentDiagnostics "Trouble toggle diagnostics filter.buf=0" {desc = mappings.documentDiagnostics.description;}) - (mkKeymap "n" keys.lspReferences "Trouble toggle lsp_references" {desc = mappings.lspReferences.description;}) - (mkKeymap "n" keys.quickfix "Trouble toggle quickfix" {desc = mappings.quickfix.description;}) - (mkKeymap "n" keys.locList "Trouble toggle loclist" {desc = mappings.locList.description;}) - (mkKeymap "n" keys.symbols "Trouble toggle symbols" {desc = mappings.symbols.description;}) - ]; - }; -} -``` - - - -> [!TIP] -> If you have come across a plugin that has an API that doesn't seem to easily -> allow custom keybindings, don't be scared to implement a draft PR. We'll help -> you get it done. +This section is _critical_, as it is used to communicate to the users what has +changed in the codebase and what breakage they may expect upon an update. To be +comprehensive, you should include migration steps or how users may mitigate +breakage depending on the context of the change. ## Adding Plugins {#sec-additional-plugins} @@ -593,7 +545,7 @@ your package to the plugin builder (`pluginBuilders`) function manually in } ``` -### Modular setup options {#sec-modular-setup-options} +### Modular Setup Options {#sec-modular-setup-options} Most plugins is initialized with a call to `require('plugin').setup({...})`. @@ -768,3 +720,104 @@ require('lz.n').load({ A full list of options can be found in the [`vim.lazy.plugins` spec] on the rendered manual. + +## Keybinds {#sec-keybinds} + +[extended standard library]: https://github.com/NotAShelf/nvf/tree/main/lib + +As of 0.4, there exists an API for writing your own keybinds and a couple of +useful utility functions are available in the [extended standard library]. The +following section contains a general overview to how you may utilize said +functions. + +### Custom Key Mappings Support for a Plugin {#sec-custom-key-mappings} + +To set a mapping, you should define it in `vim.keymaps`. As an example, a simple +keybinding can look like this: + +```nix +{ + vim.keymaps = [ + { + key = "wq"; + mode = ["n"]; + action = ":wq"; + silent = true; + desc = "Save file and quit"; + } + ]; +} +``` + +[module option documentation]: options.html#option-vim-keymaps + +There are many other settings available in the keymap module. Please refer to +the [module option documentation] for a full and up-to-date list of them. + +To make adding new keymaps for your favorite plugins easier, **nvf** provides a +helper function. This is so that you do not have to write the mapping attribute +sets every time: + +- `mkKeymap`, which mimics Neovim's `vim.keymap.set` function + +You can read the source code of some modules to see them in action, but the +usage should look something like this: + +```nix +# pluginDefinition.nix +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.binds) mkMappingOption; +in { + options.vim.plugin = { + enable = mkEnableOption "Enable plugin"; + + # Mappings should always be inside an attrset called mappings + mappings = { + workspaceDiagnostics = mkMappingOption "Workspace diagnostics [trouble]" "lwd"; + documentDiagnostics = mkMappingOption "Document diagnostics [trouble]" "ld"; + lspReferences = mkMappingOption "LSP References [trouble]" "lr"; + quickfix = mkMappingOption "QuickFix [trouble]" "xq"; + locList = mkMappingOption "LOCList [trouble]" "xl"; + symbols = mkMappingOption "Symbols [trouble]" "xs"; + }; +} +``` + + + +```nix +# config.nix +{ + config, + lib, + options, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.binds) mkKeymap; + + cfg = config.vim.plugin; + + keys = cfg.mappings; + inherit (options.vim.lsp.trouble) mappings; +in { + config = mkIf cfg.enable { + vim.keymaps = [ + (mkKeymap "n" keys.workspaceDiagnostics "Trouble toggle diagnostics" {desc = mappings.workspaceDiagnostics.description;}) + (mkKeymap "n" keys.documentDiagnostics "Trouble toggle diagnostics filter.buf=0" {desc = mappings.documentDiagnostics.description;}) + (mkKeymap "n" keys.lspReferences "Trouble toggle lsp_references" {desc = mappings.lspReferences.description;}) + (mkKeymap "n" keys.quickfix "Trouble toggle quickfix" {desc = mappings.quickfix.description;}) + (mkKeymap "n" keys.locList "Trouble toggle loclist" {desc = mappings.locList.description;}) + (mkKeymap "n" keys.symbols "Trouble toggle symbols" {desc = mappings.symbols.description;}) + ]; + }; +} +``` + + + +> [!TIP] +> If you have come across a plugin that has an API that doesn't seem to easily +> allow custom keybindings, don't be scared to implement a draft PR. We'll help +> you get it done. From a4bff9749a73cf662fbdbcc6d7a4d22ba6316200 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 16:15:43 +0300 Subject: [PATCH 05/33] flake: add a Markdown formatting check; add Deno to formatting wrapper Signed-off-by: NotAShelf Change-Id: I05593a413696ac3c6f03b2108f7ddd816a6a6964 --- flake.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 31e8d0f1..9a7fc438 100644 --- a/flake.nix +++ b/flake.nix @@ -57,7 +57,7 @@ perSystem = {pkgs, ...}: { # Provides the default formatter for 'nix fmt', which will format the - # entire tree with Alejandra. The wrapper script is necessary due to + # entire Nix source with Alejandra. The wrapper script is necessary due to # changes to the behaviour of Nix, which now encourages wrappers for # tree-wide formatting. formatter = pkgs.writeShellApplication { @@ -66,11 +66,15 @@ runtimeInputs = [ pkgs.alejandra pkgs.fd + pkgs.deno ]; text = '' # Find Nix files in the tree and format them with Alejandra - fd "$@" -t f -e nix -x alejandra -q '{}' + fd "$@" -t f -e nix -x nixfmt -q '{}' + + # Same for Markdown files, but with deno + fd "$@" -t f -e md -x deno fmt '{}' ''; }; @@ -81,7 +85,16 @@ # This can be initiated with `nix build .#checks..nix-fmt` # or with `nix flake check` nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} '' - alejandra --check ${self} < /dev/null | tee $out + alejandra --check ${self} < /dev/null + touch $out + ''; + + # Check if Markdown sources are properly formatted + # This can be initiated with `nix build .#checks..md-fmt` + # or with `nix flake check` + md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} '' + deno fmt --check ${self} --ext md < /dev/null + touch $out ''; }; }; From 9f7da0727a01dc8b4aa1cf3a552eabd68f0e9ebb Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 16:17:03 +0300 Subject: [PATCH 06/33] ci: fix workflow id for formatting check Signed-off-by: NotAShelf Change-Id: I44b40a5e771022cb94b8e0e9405375216a6a6964 --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5583213e..e3a3a7ed 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -28,7 +28,7 @@ jobs: - name: Check Flake run: nix flake check - format-with-alejandra: + format-sources: name: "Check formatting" runs-on: ubuntu-latest if: "!contains(github.event.pull_request.title, '[skip ci]')" From 8a1ef233ebc8fe106ff734487e73ef604d203c2b Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 16:33:49 +0300 Subject: [PATCH 07/33] docs: fix headings; move quirks to `includes` block' Signed-off-by: NotAShelf Change-Id: Ie853fc60a60c6ff6a945dc67560639ac6a6a6964 --- docs/manual/configuring.md | 9 ++--- docs/manual/index.md | 15 ++++---- docs/manual/installation/modules/flakes.md | 7 ++-- .../installation/modules/home-manager.md | 6 ++-- docs/manual/installation/modules/nixos.md | 4 +-- .../installation/standalone/home-manager.md | 2 +- docs/manual/installation/standalone/nixos.md | 2 +- docs/manual/quirks.md | 35 ++++--------------- docs/manual/quirks/nodejs.md | 29 +++++++++++++++ 9 files changed, 61 insertions(+), 48 deletions(-) create mode 100644 docs/manual/quirks/nodejs.md diff --git a/docs/manual/configuring.md b/docs/manual/configuring.md index 99e1755f..9a1b71cf 100644 --- a/docs/manual/configuring.md +++ b/docs/manual/configuring.md @@ -3,10 +3,11 @@ [helpful tips section]: ./tips.html#ch-helpful-tips [options reference]: ./options.html -nvf allows for _very_ extensive configuration in Neovim through the Nix module -interface. The below chapters describe several of the options exposed in nvf for -your convenience. You might also be interested in the [helpful tips section] for -more advanced or unusual configuration options supported by nvf. +**nvf** allows for _very_ extensive configuration in Neovim through the Nix +module interface. The below chapters describe several of the options exposed in +nvf for your convenience. You might also be interested in the +[helpful tips section] for more advanced or unusual configuration options +supported by nvf. Note that this section does not cover module _options_. For an overview of all module options provided by nvf, please visit the [options reference] diff --git a/docs/manual/index.md b/docs/manual/index.md index bb2a5901..fec434a9 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -6,15 +6,18 @@ Generated for nvf @NVF_VERSION@ ### What is nvf {#sec-what-is-it} -**nvf** is a highly modular, configurable, extensible and easy to use Neovim -configuration framework built and designed to be used with Nix. Boasting -flexibility, robustness and ease of use, this project allows you to configure a -fully featured Neovim instance with a few lines of Nix with lots of options for -advanced users as well. +[Nix]: https://nixos.org + +**nvf** is a highly modular, configurable, extensible and _easy to use_ Neovim +configuration framework built for and designed to be used with [Nix]. Boasting +flexibility, robustness and ease of use (among other positive traits), this +project allows you to configure a fully featured Neovim instance with a few +lines of Nix while leaving all kinds of doors open for integrating Lua in your +configurations _whether you are a beginner or an advanced user_. ## Try it Out {#ch-try-it-out} -Thanks to the portability of Nix, you can try out nvf without actually +Thanks to the portability of Nix, you can try out **nvf** without actually installing it to your machine. Below are the commands you may run to try out different configurations provided by this flake. As of v0.5, two specialized configurations are provided: diff --git a/docs/manual/installation/modules/flakes.md b/docs/manual/installation/modules/flakes.md index 273d2b00..88b6e929 100644 --- a/docs/manual/installation/modules/flakes.md +++ b/docs/manual/installation/modules/flakes.md @@ -1,7 +1,7 @@ -### Prerequisites {#sec-flakes-prerequisites} +#### Prerequisites {#sec-flakes-prerequisites} -To install nvf with flakes, you must make sure the following requirements are -met. +To install **nvf** with flakes, you must make sure the following requirements +are met. 1. Nix 2.4 or later must be installed. You may use `nix-shell` to get a later version of Nix from nixpkgs. @@ -29,5 +29,6 @@ met. following additional flags to `nix` and `home-manager`: ```sh + # Temporarily enables "nix-command" and "flakes" experimental features. $ nix --extra-experimental-features "nix-command flakes" ``` diff --git a/docs/manual/installation/modules/home-manager.md b/docs/manual/installation/modules/home-manager.md index 37d35e2b..916208ce 100644 --- a/docs/manual/installation/modules/home-manager.md +++ b/docs/manual/installation/modules/home-manager.md @@ -1,7 +1,7 @@ -# Home-Manager Module {#ch-hm-module} +## Home Manager Module {#ch-hm-module} -The home-manager module allows us to customize the different `vim` options from -inside the home-manager configuration without having to call for the wrapper +The Home Manager module allows us to customize the different `vim` options from +inside the Home Manager configuration without having to call for the wrapper yourself. It is the recommended way to use **nvf** alongside the NixOS module depending on your needs. diff --git a/docs/manual/installation/modules/nixos.md b/docs/manual/installation/modules/nixos.md index 946905c1..0186465b 100644 --- a/docs/manual/installation/modules/nixos.md +++ b/docs/manual/installation/modules/nixos.md @@ -1,11 +1,11 @@ -# NixOS Module {#ch-nixos-module} +## NixOS Module {#ch-nixos-module} The NixOS module allows us to customize the different `vim` options from inside the NixOS configuration without having to call for the wrapper yourself. It is the recommended way to use **nvf** alongside the home-manager module depending on your needs. -## With Flakes {#sec-nixos-flakes} +### With Flakes {#sec-nixos-flakes} ```{=include=} flakes.md diff --git a/docs/manual/installation/standalone/home-manager.md b/docs/manual/installation/standalone/home-manager.md index 0c1dc025..ab604df9 100644 --- a/docs/manual/installation/standalone/home-manager.md +++ b/docs/manual/installation/standalone/home-manager.md @@ -1,4 +1,4 @@ -# Standalone Installation on Home-Manager {#ch-standalone-hm} +## Standalone Installation on Home-Manager {#ch-standalone-hm} Your built Neovim configuration can be exposed as a flake output to make it easier to share across machines, repositories and so on. Or it can be added to diff --git a/docs/manual/installation/standalone/nixos.md b/docs/manual/installation/standalone/nixos.md index 65dc9205..d5c48c66 100644 --- a/docs/manual/installation/standalone/nixos.md +++ b/docs/manual/installation/standalone/nixos.md @@ -1,4 +1,4 @@ -# Standalone Installation on NixOS {#ch-standalone-nixos} +## Standalone Installation on NixOS {#ch-standalone-nixos} Your built Neovim configuration can be exposed as a flake output to make it easier to share across machines, repositories and so on. Or it can be added to diff --git a/docs/manual/quirks.md b/docs/manual/quirks.md index 17f7abaf..056f7f5e 100644 --- a/docs/manual/quirks.md +++ b/docs/manual/quirks.md @@ -5,30 +5,9 @@ be it a result of generating Lua from Nix, or the state of packaging. This page, in turn, will list any known modules or plugins that are known to misbehave, and possible workarounds that you may apply. -## NodeJS {#ch-quirks-nodejs} - -### eslint-plugin-prettier {#sec-eslint-plugin-prettier} - -When working with NodeJS, everything works as expected, but some projects have -settings that can fool nvf. - -If [this plugin](https://github.com/prettier/eslint-plugin-prettier) or similar -is included, you might get a situation where your eslint configuration diagnoses -your formatting according to its own config (usually `.eslintrc.js`). - -The issue there is your formatting is made via prettierd. - -This results in auto-formatting relying on your prettier config, while your -eslint config diagnoses formatting -[which it's not supposed to](https://prettier.io/docs/en/comparison.html)) - -In the end, you get discrepancies between what your editor does and what it -wants. - -Solutions are: - -1. Don't add a formatting config to eslint, and separate prettier and eslint. -2. PR this repo to add an ESLint formatter and configure nvf to use it. +```{=include=} +quirks/nodejs.md +``` ## Bugs & Suggestions {#ch-bugs-suggestions} @@ -36,10 +15,10 @@ Solutions are: [discussions tab]: https://github.com/notashelf/nvf/discussions [pull requests tab]: https://github.com/notashelf/nvf/pulls -Some quirks are not exactly quirks, but bugs in the module systeme. If you -notice any issues with nvf, or this documentation, then please consider -reporting them over at the [issue tracker]. Issues tab, in addition to the +Some quirks are not exactly quirks, but bugs in the module system. If you notice +any issues with **nvf**, or this documentation, then please consider reporting +them over at the [issue tracker]. Issues tab, in addition to the [discussions tab] is a good place as any to request new features. -You may also consider submitting bugfixes, feature additions and upstreamed +You may also consider submitting bug fixes, feature additions and upstreamed changes that you think are critical over at the [pull requests tab]. diff --git a/docs/manual/quirks/nodejs.md b/docs/manual/quirks/nodejs.md new file mode 100644 index 00000000..f7031af6 --- /dev/null +++ b/docs/manual/quirks/nodejs.md @@ -0,0 +1,29 @@ +## NodeJS {#ch-quirks-nodejs} + +### eslint-plugin-prettier {#sec-eslint-plugin-prettier} + +[eslint-plugin-prettier]: https://github.com/prettier/eslint-plugin-prettier +[not supposed to]: https://prettier.io/docs/en/comparison.html + +When working with NodeJS, which is _obviously_ known for its meticulous +standards, most things are bound to work as expected but some projects, tools +and settings may fool the default configurations of tools provided by **nvf**. + +If + +If [eslint-plugin-prettier] or similar is included, you might get a situation +where your Eslint configuration diagnoses your formatting according to its own +config (usually `.eslintrc.js`). The issue there is your formatting is made via +prettierd. + +This results in auto-formatting relying on your prettier configuration, while +your Eslint configuration diagnoses formatting "issues" while it's +[not supposed to]. In the end, you get discrepancies between what your editor +does and what it wants. + +Solutions are: + +1. Don't add a formatting config to Eslint, instead separate Prettier and + Eslint. +2. PR the repo in question to add an ESLint formatter, and configure **nvf** to + use it. From 797748a20ced3327ff5afaaf667697d20418c9d7 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 18 Dec 2025 16:36:42 +0300 Subject: [PATCH 08/33] flake: use the correct formatter for Nix; suppress deno output Signed-off-by: NotAShelf Change-Id: Ic39d3a2448cd4b4f241909779f7ead596a6a6964 --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 9a7fc438..becc838c 100644 --- a/flake.nix +++ b/flake.nix @@ -71,10 +71,12 @@ text = '' # Find Nix files in the tree and format them with Alejandra - fd "$@" -t f -e nix -x nixfmt -q '{}' + echo "Formatting Nix files" + fd "$@" -t f -e nix -x alejandra -q '{}' # Same for Markdown files, but with deno - fd "$@" -t f -e md -x deno fmt '{}' + echo "Formatting Markdown files" + fd "$@" -t f -e md -x deno fmt -q '{}' ''; }; @@ -93,7 +95,7 @@ # This can be initiated with `nix build .#checks..md-fmt` # or with `nix flake check` md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} '' - deno fmt --check ${self} --ext md < /dev/null + deno fmt --check ${self} --ext md touch $out ''; }; From 1ca1a4676c792dc7842310fb498c224af34e626d Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Fri, 19 Dec 2025 18:55:10 +0100 Subject: [PATCH 09/33] docs: typo --- docs/manual/release-notes/rl-0.9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index c12e3558..396046ca 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -1,4 +1,4 @@ -# Release 0.5 {#sec-release-0-9} +# Release 0.9 {#sec-release-0-9} ## Changelog {#sec-release-0-9-changelog} From a1ef6d28a7a63184382d531c01656b5519aaf3ec Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 21 Dec 2025 01:49:58 +0300 Subject: [PATCH 10/33] ci: trigger docs preview on more PR events Signed-off-by: NotAShelf Change-Id: I3e40e39e69befaab40ff9f278ff7537f6a6a6964 --- .github/workflows/docs-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 10421204..d6570af7 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -3,7 +3,7 @@ name: Build and Preview Manual on: workflow_dispatch: pull_request_target: - types: [opened, synchronize, reopened, closed] + types: [opened, synchronize, reopened, labeled, unlabeled, edited] paths: - ".github/workflows/docs-preview.yml" - "modules/**" From 9f4260c2a83221fae9bbf02611e69fe5bf6e2a8f Mon Sep 17 00:00:00 2001 From: Soliprem Date: Sun, 21 Dec 2025 14:32:25 +0100 Subject: [PATCH 11/33] docs/rl-0.9: fix release notes formatting --- docs/manual/release-notes/rl-0.9.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 8e804d6d..16bc1cf0 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -2,7 +2,7 @@ ## Changelog {#sec-release-0-9-changelog} - [suimong](https://github.com/suimong): -- Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires `vim.opt.mousemoveevent` to be set. +- Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires + `vim.opt.mousemoveevent` to be set. From b1b8794a19400222e860f90377515d01cc5c6ea3 Mon Sep 17 00:00:00 2001 From: Ben Mayer <90480641+Libadoxon@users.noreply.github.com> Date: Sun, 21 Dec 2025 15:33:27 +0100 Subject: [PATCH 12/33] make toggleterm open map acutally toggle the terminal (#1295) --- docs/manual/release-notes/rl-0.8.md | 4 ++++ modules/plugins/terminal/toggleterm/config.nix | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/manual/release-notes/rl-0.8.md b/docs/manual/release-notes/rl-0.8.md index fadb2e69..bb26a9a2 100644 --- a/docs/manual/release-notes/rl-0.8.md +++ b/docs/manual/release-notes/rl-0.8.md @@ -627,3 +627,7 @@ - Aligned `codelldb` adapter setup with [rustaceanvim]’s built-in logic. - Added `languages.rust.dap.backend` option to choose between `codelldb` and `lldb-dap` adapters. + +[Libadoxon](https://github.com/Libadoxon) + +- `toggleterm` open map now also works when in terminal mode diff --git a/modules/plugins/terminal/toggleterm/config.nix b/modules/plugins/terminal/toggleterm/config.nix index 280f29d2..85cca09f 100644 --- a/modules/plugins/terminal/toggleterm/config.nix +++ b/modules/plugins/terminal/toggleterm/config.nix @@ -17,9 +17,20 @@ in { vim = { lazy.plugins.toggleterm-nvim = { package = "toggleterm-nvim"; - cmd = ["ToggleTerm" "ToggleTermSendCurrentLine" "ToggleTermSendVisualLines" "ToggleTermSendVisualSelection" "ToggleTermSetName" "ToggleTermToggleAll"]; + cmd = [ + "ToggleTerm" + "ToggleTermSendCurrentLine" + "ToggleTermSendVisualLines" + "ToggleTermSendVisualSelection" + "ToggleTermSetName" + "ToggleTermToggleAll" + ]; keys = - [(mkKeymap "n" cfg.mappings.open "execute v:count . \"ToggleTerm\"" {desc = "Toggle terminal";})] + [ + (mkKeymap ["n" "t"] cfg.mappings.open "execute v:count . \"ToggleTerm\"" { + desc = "Toggle terminal"; + }) + ] ++ optional cfg.lazygit.enable { key = cfg.lazygit.mappings.open; mode = "n"; From c60086f34e1c2f426ea4a38abf2868d8367c6876 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 22 Dec 2025 16:48:53 +0300 Subject: [PATCH 13/33] ci: use the correct documentation URL in previews Signed-off-by: NotAShelf Change-Id: Ie5151a652e134c350d6e792ecb14da376a6a6964 --- .github/workflows/docs-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 10421204..be17ef54 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -73,7 +73,7 @@ jobs: id: prelude run: | PR_NUMBER=${{ github.event.pull_request.number }} - URL="https://${{ github.repository_owner }}.github.io/nvf/docs-preview-${PR_NUMBER}/" + URL="https:///nvf.notashelf.dev/docs-preview-${PR_NUMBER}/" # Propagate non-interpolatable environment vars echo "URL=$URL" >> "$GITHUB_OUTPUT" From c15191cee8f0a5849e78dc7ba63c3beb1abd40e9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 22 Dec 2025 16:49:10 +0300 Subject: [PATCH 14/33] ci: force CNAME in deployments Signed-off-by: NotAShelf Change-Id: I6a22db6d5f3b95c416aefcd3dc4304556a6a6964 --- .github/workflows/manual.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 1c628b08..4b6e2eff 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -59,3 +59,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public + cname: nvf.notashelf.dev From ef1f22efaf4aa37ba9382a7d1807fa8ac9c097fd Mon Sep 17 00:00:00 2001 From: suiiii Date: Wed, 24 Dec 2025 18:17:49 +0100 Subject: [PATCH 15/33] pins/codecompanion-nvim: bump to v18.3.0 --- npins/sources.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 919ef20d..a9df47b7 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -285,9 +285,9 @@ }, "branch": "main", "submodules": false, - "revision": "38db66c4e20032821bd166f7012291fe99f1e8f3", - "url": "https://github.com/olimorris/codecompanion.nvim/archive/38db66c4e20032821bd166f7012291fe99f1e8f3.tar.gz", - "hash": "1iqqgcj7vdsif0fj0pf6ifn3nh05aznk2gnas7l3lg8b5g103vb8" + "revision": "b3bb0d73079643d4a5b0d8b621cde619a73bc91a", + "url": "https://github.com/olimorris/codecompanion.nvim/archive/b3bb0d73079643d4a5b0d8b621cde619a73bc91a.tar.gz", + "hash": "0jzldi9h98hci5ij1qnb4283hmh14irnprp5zg6mnfs9l6m8z3mq" }, "codewindow-nvim": { "type": "Git", From 0390abd6736ff34a016afc66366d1f46372f28de Mon Sep 17 00:00:00 2001 From: ilkecan <40234257+ilkecan@users.noreply.github.com> Date: Tue, 30 Dec 2025 19:43:52 +0000 Subject: [PATCH 16/33] flake: prevent the second nixpkgs in lock file (#1308) --- flake.lock | 22 ++++------------------ flake.nix | 5 ++++- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index de4d1484..9f6d599a 100644 --- a/flake.lock +++ b/flake.lock @@ -53,7 +53,9 @@ }, "ndg": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1765720983, @@ -70,22 +72,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1764242076, - "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1764081664, "narHash": "sha256-sUoHmPr/EwXzRMpv1u/kH+dXuvJEyyF2Q7muE+t0EU4=", @@ -107,7 +93,7 @@ "flake-parts": "flake-parts", "mnw": "mnw", "ndg": "ndg", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "systems": "systems" } }, diff --git a/flake.nix b/flake.nix index 31e8d0f1..cb4a8ae8 100644 --- a/flake.nix +++ b/flake.nix @@ -107,6 +107,9 @@ mnw.url = "github:Gerg-L/mnw"; # Alternative documentation generator - ndg.url = "github:feel-co/ndg"; + ndg = { + url = "github:feel-co/ndg"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } From 9c75c2a199af39fc95fb203636ce97d070ca3973 Mon Sep 17 00:00:00 2001 From: rain capsule <29630035+busybox11@users.noreply.github.com> Date: Fri, 2 Jan 2026 16:55:00 +0100 Subject: [PATCH 17/33] docs(readme): fix 404 on installation links (#1313) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7786636a..b83772ae 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ ## Features -[standalone]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-installation -[NixOS module]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-nixos -[Home-Manager module]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-hm +[standalone]: https://nvf.notashelf.dev/#ch-standalone-installation +[NixOS module]: https://nvf.notashelf.dev/#ch-standalone-nixos +[Home-Manager module]: https://nvf.notashelf.dev/#ch-standalone-hm [release notes]: https://notashelf.github.io/nvf/release-notes.html [discussions tab]: https://github.com/notashelf/nvf/discussions [FAQ section]: #frequently-asked-questions From 1bf757685b065c5aaeaf252c02457238df42ed31 Mon Sep 17 00:00:00 2001 From: Jens Feodor Nielsen Date: Mon, 5 Jan 2026 16:29:19 +0100 Subject: [PATCH 18/33] utility/ccc: add setupOpts option (#1294) * utility/ccc: add inputs and outputs options Added `ccc.nvim` options `vim.utility.ccc.inputs` and `vim.utility.ccc.outputs` to make input color systems and output color formats configurable. * utility/ccc: add setupOpts option Added `ccc.nvim` option `vim.utility.ccc.setupOpts` with the existing hard-coded options as default values. * utility/ccc: no hidden mapping, better types - Remove hidden mapping input/output options into luaInline with prefixes. - Update types of setupOpts sub-options to avoid large blocks of inline Lua in the configuration. * utility/ccc: properly format with alejandra --- docs/manual/release-notes/rl-0.9.md | 7 ++ modules/plugins/utility/ccc/ccc.nix | 140 ++++++++++++++++++++++++- modules/plugins/utility/ccc/config.nix | 37 +------ 3 files changed, 148 insertions(+), 36 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 16bc1cf0..03588586 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -6,3 +6,10 @@ - Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires `vim.opt.mousemoveevent` to be set. + +[jfeo](https://github.com/jfeo): + +[ccc.nvim]: https://github.com/uga-rosa/ccc.nvim + +- Added [ccc.nvim] option {option}`vim.utility.ccc.setupOpts` with the existing + hard-coded options as default values. diff --git a/modules/plugins/utility/ccc/ccc.nix b/modules/plugins/utility/ccc/ccc.nix index f900b531..99c169fb 100644 --- a/modules/plugins/utility/ccc/ccc.nix +++ b/modules/plugins/utility/ccc/ccc.nix @@ -1,10 +1,148 @@ {lib, ...}: let - inherit (lib.options) mkEnableOption; + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) anything attrsOf listOf enum; inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; + inherit (lib.generators) mkLuaInline; in { options.vim.utility.ccc = { enable = mkEnableOption "ccc color picker for neovim"; + setupOpts = mkPluginSetupOption "ccc.nvim" { + highlighter = mkOption { + type = attrsOf anything; + default = { + auto_enable = true; + max_byte = 2 * 1024 * 1024; # 2mb + lsp = true; + filetypes = mkLuaInline "colorPickerFts"; + }; + description = '' + Settings for the highlighter. See {command}`:help ccc` for options. + ''; + }; + + pickers = mkOption { + type = listOf luaInline; + default = map mkLuaInline [ + "ccc.picker.hex" + "ccc.picker.css_rgb" + "ccc.picker.css_hsl" + "ccc.picker.ansi_escape { meaning1 = \"bold\", }" + ]; + description = '' + List of formats that can be detected by {command}`:CccPick` to be + activated. + + Must be inline lua references to `ccc.picker`, for example + `mkLuaInline "ccc.picker.hex"`. See {command}`:help ccc` for options. + ''; + }; + + alpha_show = mkOption { + type = enum [ + "show" + "hide" + "auto" + ]; + default = "hide"; + description = '' + This option determines whether the alpha slider is displayed when the + UI is opened. "show" and "hide" mean as they are. "auto" makes the + slider appear only when the alpha value can be picked up. + ''; + }; + + recognize = mkOption { + type = attrsOf anything; + default = { + output = true; + }; + description = '' + Settings for recognizing the color format. See {command}`:help ccc` for options. + ''; + }; + + inputs = mkOption { + type = listOf luaInline; + default = map mkLuaInline ["ccc.input.hsl"]; + description = '' + List of color systems to be activated. Must be inline lua references to + `ccc.input`, for example `mkLuaInline "ccc.input.rgb"`. See + {command}`:help ccc` for options. + + The toggle input mode action toggles in this order. The first one is + the default used at the first startup. Once activated, it will keep the + previous input mode. + ''; + }; + + outputs = mkOption { + type = listOf luaInline; + default = map mkLuaInline [ + "ccc.output.css_hsl" + "ccc.output.css_rgb" + "ccc.output.hex" + ]; + description = '' + List of output formats to be activated. Must be inline Lua references to + `ccc.output`, for example `mkLuaInline "ccc.output.rgb"`. See + {command}`:help ccc` for options. + + The toggle output mode action toggles in this order. The first one is + the default used at the first startup. Once activated, it will keep the + previous output mode. + ''; + }; + + convert = mkOption { + type = listOf (listOf luaInline); + default = map (map mkLuaInline) [ + [ + "ccc.picker.hex" + "ccc.output.css_hsl" + ] + [ + "ccc.picker.css_rgb" + "ccc.output.css_hsl" + ] + [ + "ccc.picker.css_hsl" + "ccc.output.hex" + ] + ]; + description = '' + Specify the correspondence between picker and output. Must be a list of + two-element lists defining picker/output pairs as inline Lua references, + for example: + + ```nix + map (map mkLuaInline) [ + ["ccc.picker.hex", "ccc.output.css_rgb"] + ["ccc.picker.css_rgb", "ccc.output.hex"] + ]; + ``` + + See {command}`:help ccc` for options. + ''; + }; + + mappings = mkOption { + type = attrsOf luaInline; + default = { + "q" = mkLuaInline "ccc.mapping.quit"; + "L" = mkLuaInline "ccc.mapping.increase10"; + "H" = mkLuaInline "ccc.mapping.decrease10"; + }; + description = '' + The mappings are set in the UI of ccc. The table where lhs is key and + rhs is value. To disable all default mappings, use + {option}`vim.utility.ccc.setupOpts.disable_default_mappings`. To + disable only some of the default mappings, set `ccc.mapping.none`. + ''; + }; + }; + mappings = { quit = mkMappingOption "Cancel and close the UI without replace or insert" ""; increase10 = mkMappingOption "Increase the value times delta of the slider" ""; diff --git a/modules/plugins/utility/ccc/config.nix b/modules/plugins/utility/ccc/config.nix index 33948562..e0654ceb 100644 --- a/modules/plugins/utility/ccc/config.nix +++ b/modules/plugins/utility/ccc/config.nix @@ -5,7 +5,7 @@ }: let inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAnywhere; - + inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.utility.ccc; in { config = mkIf cfg.enable { @@ -13,40 +13,7 @@ in { vim.pluginRC.ccc = entryAnywhere '' local ccc = require("ccc") - ccc.setup { - highlighter = { - auto_enable = true, - max_byte = 2 * 1024 * 1024, -- 2mb - lsp = true, - filetypes = colorPickerFts, - }, - pickers = { - ccc.picker.hex, - ccc.picker.css_rgb, - ccc.picker.css_hsl, - ccc.picker.ansi_escape { - meaning1 = "bright", -- whether the 1 means bright or yellow - }, - }, - alpha_show = "hide", -- needed when highlighter.lsp is set to true - recognize = { output = true }, -- automatically recognize color format under cursor - inputs = { ccc.input.hsl }, - outputs = { - ccc.output.css_hsl, - ccc.output.css_rgb, - ccc.output.hex, - }, - convert = { - { ccc.picker.hex, ccc.output.css_hsl }, - { ccc.picker.css_rgb, ccc.output.css_hsl }, - { ccc.picker.css_hsl, ccc.output.hex }, - }, - mappings = { - ["q"] = ccc.mapping.quit, - ["L"] = ccc.mapping.increase10, - ["H"] = ccc.mapping.decrease10, - }, - } + ccc.setup(${toLuaObject cfg.setupOpts}) ''; }; } From e0f6fe7a2ab340acde8ca0a6e4b081beafd3fb5b Mon Sep 17 00:00:00 2001 From: Thales Menato <8753631+thamenato@users.noreply.github.com> Date: Mon, 5 Jan 2026 11:07:31 -0500 Subject: [PATCH 19/33] treesitter: attempt to adapt to (breaking) Nixpkgs changes (#1315) * feat: update from builtGrammars to grammarPlugins * fix: renamed packages * chore: revert back the configs part * wip: try using config * chore: update flake * docs: update release-note --------- Co-authored-by: raf --- docs/manual/release-notes/rl-0.9.md | 11 +++++++++++ flake.lock | 6 +++--- lib/types/languages.nix | 2 +- modules/plugins/languages/csharp.nix | 2 +- modules/plugins/languages/markdown.nix | 2 +- modules/plugins/languages/python.nix | 2 +- modules/plugins/languages/sql.nix | 2 +- modules/plugins/notes/orgmode/config.nix | 2 +- modules/plugins/treesitter/config.nix | 2 +- modules/plugins/treesitter/treesitter.nix | 6 +++--- modules/plugins/treesitter/ts-textobjects/config.nix | 2 +- modules/plugins/ui/noice/config.nix | 2 +- 12 files changed, 26 insertions(+), 15 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 03588586..8c06cfcf 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -1,5 +1,11 @@ # Release 0.9 {#sec-release-0-9} +## Breaking changes + +- Nixpkgs merged a full and incompatible rewrite of vimPlugins.nvim-treesitter. + The changes affected how grammars are built and it caused issues when neovim + attempted to load languages and could not find files in expected locations. + ## Changelog {#sec-release-0-9-changelog} [suimong](https://github.com/suimong): @@ -7,6 +13,11 @@ - Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires `vim.opt.mousemoveevent` to be set. +[thamenato](https://github.com/thamenato): + +- Attempt to adapt nvim-treesitter to (breaking) Nixpkgs changes. Some treesitte grammars + were changed to prefer `grammarPlugins` over `builtGrammars`. + [jfeo](https://github.com/jfeo): [ccc.nvim]: https://github.com/uga-rosa/ccc.nvim diff --git a/flake.lock b/flake.lock index 9f6d599a..0b4c58d5 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1764081664, - "narHash": "sha256-sUoHmPr/EwXzRMpv1u/kH+dXuvJEyyF2Q7muE+t0EU4=", + "lastModified": 1767364772, + "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dc205f7b4fdb04c8b7877b43edb7b73be7730081", + "rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa", "type": "github" }, "original": { diff --git a/lib/types/languages.nix b/lib/types/languages.nix index b1865c41..45515f55 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -30,7 +30,7 @@ mkGrammarOption = pkgs: grammar: mkPackageOption pkgs ["${grammar} treesitter"] { - default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar]; + default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar]; }; in { inherit diagnostics diagnosticSubmodule mkGrammarOption; diff --git a/modules/plugins/languages/csharp.nix b/modules/plugins/languages/csharp.nix index 20e5bd72..ef973301 100644 --- a/modules/plugins/languages/csharp.nix +++ b/modules/plugins/languages/csharp.nix @@ -178,7 +178,7 @@ in { treesitter = { enable = mkEnableOption "C# treesitter" // {default = config.vim.languages.enableTreesitter;}; - package = mkGrammarOption pkgs "c-sharp"; + package = mkGrammarOption pkgs "c_sharp"; }; lsp = { diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 59615cec..feb3f2a5 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -63,7 +63,7 @@ in { description = "Enable Markdown treesitter"; }; mdPackage = mkGrammarOption pkgs "markdown"; - mdInlinePackage = mkGrammarOption pkgs "markdown-inline"; + mdInlinePackage = mkGrammarOption pkgs "markdown_inline"; }; lsp = { diff --git a/modules/plugins/languages/python.nix b/modules/plugins/languages/python.nix index b1cbe224..9cfb82f6 100644 --- a/modules/plugins/languages/python.nix +++ b/modules/plugins/languages/python.nix @@ -228,7 +228,7 @@ in { package = mkOption { description = "Python treesitter grammar to use"; type = package; - default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.python; + default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.python; }; }; diff --git a/modules/plugins/languages/sql.nix b/modules/plugins/languages/sql.nix index e3e686ec..e5787e43 100644 --- a/modules/plugins/languages/sql.nix +++ b/modules/plugins/languages/sql.nix @@ -66,7 +66,7 @@ in { package = mkOption { type = package; - default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.sql; + default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.sql; description = "SQL treesitter grammar to use"; }; }; diff --git a/modules/plugins/notes/orgmode/config.nix b/modules/plugins/notes/orgmode/config.nix index 3f1b7eaf..19b47aa1 100644 --- a/modules/plugins/notes/orgmode/config.nix +++ b/modules/plugins/notes/orgmode/config.nix @@ -21,7 +21,7 @@ in { pluginRC.orgmode = entryAnywhere '' -- Treesitter configuration - require('nvim-treesitter.configs').setup { + require('nvim-treesitter.config').setup { -- If TS highlights are not enabled at all, or disabled via `disable` prop, -- highlighting will fallback to default Vim syntax highlighting diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index f7955110..d10e1e89 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -52,7 +52,7 @@ in { ''); pluginRC.treesitter = entryAfter ["basic"] '' - require('nvim-treesitter.configs').setup { + require('nvim-treesitter.config').setup { -- Disable imperative treesitter options that would attempt to fetch -- grammars into the read-only Nix store. To add additional grammars here -- you must use the `config.vim.treesitter.grammars` option. diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index d761d6b3..cf1c5375 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -25,14 +25,14 @@ in { type = listOf package; default = []; example = literalExpression '' - with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [ regex kdl ]; ''; description = '' List of treesitter grammars to install. For grammars to be installed properly, - you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`. + you must use grammars from `pkgs.vimPlugins.nvim-treesitter.grammarPlugins`. You can use `pkgs.vimPlugins.nvim-treesitter.allGrammars` to install all grammars. For languages already supported by nvf, you may use @@ -56,7 +56,7 @@ in { internal = true; readOnly = true; type = listOf package; - default = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [c lua vim vimdoc query]; + default = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [c lua vim vimdoc query]; description = '' A list of treesitter grammars that will be installed by default if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars` diff --git a/modules/plugins/treesitter/ts-textobjects/config.nix b/modules/plugins/treesitter/ts-textobjects/config.nix index 7a9239d1..511ebdce 100644 --- a/modules/plugins/treesitter/ts-textobjects/config.nix +++ b/modules/plugins/treesitter/ts-textobjects/config.nix @@ -16,7 +16,7 @@ in { # set up treesitter-textobjects after Treesitter, whose config we're adding to. pluginRC.treesitter-textobjects = entryAfter ["treesitter"] '' - require("nvim-treesitter.configs").setup({textobjects = ${toLuaObject cfg.setupOpts}}) + require("nvim-treesitter.config").setup({textobjects = ${toLuaObject cfg.setupOpts}}) ''; }; }; diff --git a/modules/plugins/ui/noice/config.nix b/modules/plugins/ui/noice/config.nix index fe82f588..1f81f4a9 100644 --- a/modules/plugins/ui/noice/config.nix +++ b/modules/plugins/ui/noice/config.nix @@ -12,7 +12,7 @@ cfg = config.vim.ui.noice; tscfg = config.vim.treesitter; - defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown]; + defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [vim regex lua bash markdown]; in { config = mkIf cfg.enable { vim = { From 270ca3a50aa3f59df23fd6817df44d35686cf744 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 15:01:33 +0300 Subject: [PATCH 20/33] docs: fix rebase artifacts in 0.9 release notes; format Signed-off-by: NotAShelf Change-Id: Ie10b047abb24dbc228f7278810fd01106a6a6964 --- docs/manual/release-notes/rl-0.9.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 5c696da7..9b5d2d29 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -1,12 +1,15 @@ # Release 0.9 {#sec-release-0-9} -## Changelog {#sec-release-0-9-changelog} - ## Breaking changes -- Nixpkgs merged a full and incompatible rewrite of vimPlugins.nvim-treesitter. - The changes affected how grammars are built and it caused issues when neovim - attempted to load languages and could not find files in expected locations. +- Nixpkgs has merged a fully incompatible rewrite of + `vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master` + branch to the new main branch. This change also affects how grammars are + built, and forces us to change a few things around. + - We must now use `"nvim-treesitter".setup` over the old `.configs`. + Additionally, built grammars **no longer include queries by default**, + therefore queries not managed by nvf will lack their respective syntax + highlighting capabilities. ## Changelog {#sec-release-0-9-changelog} @@ -17,8 +20,9 @@ [thamenato](https://github.com/thamenato): -- Attempt to adapt nvim-treesitter to (breaking) Nixpkgs changes. Some treesitte grammars - were changed to prefer `grammarPlugins` over `builtGrammars`. +- Attempt to adapt nvim-treesitter to (breaking) Nixpkgs changes. Some + treesitter grammars were changed to prefer `grammarPlugins` over + `builtGrammars`. [jfeo](https://github.com/jfeo): @@ -29,7 +33,6 @@ [Ring-A-Ding-Ding-Baby](https://github.com/Ring-A-Ding-Ding-Baby): - - Aligned `codelldb` adapter setup with [rustaceanvim]’s built-in logic. - Added `languages.rust.dap.backend` option to choose between `codelldb` and `lldb-dap` adapters. @@ -37,5 +40,3 @@ [Libadoxon](https://github.com/Libadoxon): - `toggleterm` open map now also works when in terminal mode - - From c1713898c44cab30072b93635a6bf897b4002138 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 6 Jan 2026 15:08:11 +0300 Subject: [PATCH 21/33] docs/hacking: clarify wording Signed-off-by: NotAShelf Change-Id: If7d01c782c95bf066050831615db24f66a6a6964 --- docs/manual/hacking.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/manual/hacking.md b/docs/manual/hacking.md index c475d6ff..0b48f3dd 100644 --- a/docs/manual/hacking.md +++ b/docs/manual/hacking.md @@ -53,7 +53,8 @@ Before submitting your pull request, please ensure that: with important information None of those are reasons for a Pull Request to be closed, but it will reduce -the number of roundtrips required before we can merge your Pull Request. +the number of "roundtrips", or rather, the back-and-forth required before we can +merge your Pull Request. > [!IMPORTANT] > If you do not agree with the idea of using Microsoft GitHub for contributions, @@ -62,7 +63,7 @@ the number of roundtrips required before we can merge your Pull Request. > > You may send your patches to [@NotAShelf](https://github.com/notashelf) using > the public e-mail located on the GitHub page. Though, please remember to -> adhere to the contributing guidelines strictly as e-mail instroduces a +> adhere to the contributing guidelines strictly, as e-mail introduces a > significant overhead to the communication process. ## Guidelines {#sec-guidelines} From 27a2953aff8c51b415ecacf8424cd47f04a3ea47 Mon Sep 17 00:00:00 2001 From: Heitor Augusto <44377258+HeitorAugustoLN@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:45:28 -0300 Subject: [PATCH 22/33] treesitter: migrate to the new api --- docs/manual/release-notes/rl-0.9.md | 8 +- modules/extra/deprecations.nix | 34 ++++++ modules/plugins/treesitter/config.nix | 106 +++++++------------ modules/plugins/treesitter/treesitter.nix | 121 ++-------------------- 4 files changed, 82 insertions(+), 187 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 9b5d2d29..612e473d 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -4,12 +4,8 @@ - Nixpkgs has merged a fully incompatible rewrite of `vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master` - branch to the new main branch. This change also affects how grammars are - built, and forces us to change a few things around. - - We must now use `"nvim-treesitter".setup` over the old `.configs`. - Additionally, built grammars **no longer include queries by default**, - therefore queries not managed by nvf will lack their respective syntax - highlighting capabilities. + branch to the new main branch. This change removes incremental selections, so + it is no longer available. ## Changelog {#sec-release-0-9-changelog} diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 7012feac..76d258bd 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -308,5 +308,39 @@ in { ]) # Migrated via batchRenameOptions. Further batch renames must be below this line. renamedVimOpts + + # 2026-01-06 + [ + (mkRemovedOptionModule ["vim" "treesitter" "highlight" "disable"] '' + Treesitter highlighting is now handled by Neovim natively, and it does not have a disable option. + '') + (mkRemovedOptionModule ["vim" "treesitter" "highlight" "additionalVimRegexHighlighting"] '' + Treesitter highlighting is now handled by Neovim natively, and it does not have a additionalVimRegexHighlighting option. + '') + (mkRemovedOptionModule ["vim" "treesitter" "indent" "disable"] '' + Treesitter indentation is now handled differently, and it does not have a disable option. + '') + (mkRemovedOptionModule ["vim" "treesitter" "incrementalSelection" "enable"] '' + Incremental selection configuration has been removed from nvim-treesitter. + '') + (mkRemovedOptionModule ["vim" "treesitter" "incrementalSelection" "disable"] '' + Incremental selection configuration has been removed from nvim-treesitter. + '') + (mkRemovedOptionModule ["vim" "treesitter" "mappings" "incrementalSelection" "init"] '' + Incremental selection configuration has been removed from nvim-treesitter. + '') + (mkRemovedOptionModule ["vim" "treesitter" "mappings" "incrementalSelection" "incrementByNode"] '' + Incremental selection configuration has been removed from nvim-treesitter. + '') + ( + mkRemovedOptionModule ["vim" "treesitter" "mappings" "incrementalSelection" "incrementByScope"] + '' + Incremental selection configuration has been removed from nvim-treesitter. + '' + ) + (mkRemovedOptionModule ["vim" "treesitter" "mappings" "incrementalSelection" "decrementByNode"] '' + Incremental selection configuration has been removed from nvim-treesitter. + '') + ] ]; } diff --git a/modules/plugins/treesitter/config.nix b/modules/plugins/treesitter/config.nix index d10e1e89..899e7c19 100644 --- a/modules/plugins/treesitter/config.nix +++ b/modules/plugins/treesitter/config.nix @@ -1,19 +1,13 @@ { config, lib, - options, ... }: let - inherit (lib.modules) mkIf mkMerge; + inherit (lib.modules) mkIf; inherit (lib.lists) optionals; - inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings; - inherit (lib.nvim.lua) toLuaObject; - inherit (lib.nvim.dag) entryBefore entryAfter; + inherit (lib.nvim.dag) entryAfter; cfg = config.vim.treesitter; - - mappingDefinitions = options.vim.treesitter.mappings; - mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions; in { config = mkIf cfg.enable { vim = { @@ -27,68 +21,46 @@ in { treesitter.grammars = optionals cfg.addDefaultGrammars cfg.defaultGrammars; - maps = { - # HACK: Using mkSetLuaBinding and putting the lua code does not work for some reason: It just selects the whole file. - # This works though, and if it ain't broke, don't fix it. - normal = mkSetBinding mappings.incrementalSelection.init ":lua require('nvim-treesitter.incremental_selection').init_selection()"; + pluginRC.treesitter-autocommands = entryAfter ["basic"] '' + vim.api.nvim_create_augroup("nvf_treesitter", { clear = true }) - visualOnly = mkMerge [ - (mkSetBinding mappings.incrementalSelection.incrementByNode "lua require('nvim-treesitter.incremental_selection').node_incremental()") - (mkSetBinding mappings.incrementalSelection.incrementByScope "lua require('nvim-treesitter.incremental_selection').scope_incremental()") - (mkSetBinding mappings.incrementalSelection.decrementByNode "lua require('nvim-treesitter.incremental_selection').node_decremental()") - ]; - }; + ${lib.optionalString cfg.highlight.enable '' + -- Enable treesitter highlighting for all filetypes + vim.api.nvim_create_autocmd("FileType", { + group = "nvf_treesitter", + pattern = "*", + callback = function() + pcall(vim.treesitter.start) + end, + }) + ''} - # For some reason treesitter highlighting does not work on start if this is set before syntax on - pluginRC.treesitter-fold = mkIf cfg.fold (entryBefore ["basic"] '' - -- This is required by treesitter-context to handle folds - vim.o.foldmethod = "expr" - vim.o.foldexpr = "nvim_treesitter#foldexpr()" + ${lib.optionalString cfg.indent.enable '' + -- Enable treesitter highlighting for all filetypes + vim.api.nvim_create_autocmd("FileType", { + group = "nvf_treesitter", + pattern = "*", + callback = function() + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, + }) + ''} - -- This is optional, but is set rather as a sane default. - -- If unset, opened files will be folded by automatically as - -- the files are opened - vim.o.foldenable = false - ''); - - pluginRC.treesitter = entryAfter ["basic"] '' - require('nvim-treesitter.config').setup { - -- Disable imperative treesitter options that would attempt to fetch - -- grammars into the read-only Nix store. To add additional grammars here - -- you must use the `config.vim.treesitter.grammars` option. - auto_install = false, - sync_install = false, - ensure_installed = {}, - - -- Indentation module for Treesitter - indent = { - enable = ${toLuaObject cfg.indent.enable}, - disable = ${toLuaObject cfg.indent.disable}, - }, - - -- Highlight module for Treesitter - highlight = { - enable = ${toLuaObject cfg.highlight.enable}, - disable = ${toLuaObject cfg.highlight.disable}, - additional_vim_regex_highlighting = ${toLuaObject cfg.highlight.additionalVimRegexHighlighting}, - }, - - -- Indentation module for Treesitter - -- Keymaps are set to false here as they are - -- handled by `vim.maps` entries calling lua - -- functions achieving the same functionality. - incremental_selection = { - enable = ${toLuaObject cfg.incrementalSelection.enable}, - disable = ${toLuaObject cfg.incrementalSelection.disable}, - keymaps = { - init_selection = false, - node_incremental = false, - scope_incremental = false, - node_decremental = false, - - }, - }, - } + ${lib.optionalString cfg.fold '' + -- Enable treesitter folding for all filetypes + vim.api.nvim_create_autocmd("FileType", { + group = "nvf_treesitter", + pattern = "*", + callback = function() + vim.wo[0][0].foldmethod = "expr" + vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()" + -- This is optional, but is set rather as a sane default. + -- If unset, opened files will be folded by automatically as + -- the files are opened + vim.o.foldenable = false + end, + }) + ''} ''; }; }; diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index cf1c5375..b7e2f031 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -3,21 +3,12 @@ lib, ... }: let - inherit (lib.options) mkOption mkEnableOption literalMD literalExpression; - inherit (lib.types) listOf package str either bool; - inherit (lib.nvim.binds) mkMappingOption; - inherit (lib.nvim.types) luaInline; + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) listOf package bool; in { options.vim.treesitter = { enable = mkEnableOption "treesitter, also enabled automatically through language options"; - mappings.incrementalSelection = { - init = mkMappingOption "Init selection [treesitter]" "gnn"; - incrementByNode = mkMappingOption "Increment selection by node [treesitter]" "grn"; - incrementByScope = mkMappingOption "Increment selection by scope [treesitter]" "grc"; - decrementByNode = mkMappingOption "Decrement selection by node [treesitter]" "grm"; - }; - fold = mkEnableOption "fold with treesitter"; autotagHtml = mkEnableOption "autoclose and rename html tag"; @@ -25,14 +16,14 @@ in { type = listOf package; default = []; example = literalExpression '' - with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [ + with pkgs.vimPlugins.nvim-treesitter.parsers; [ regex kdl ]; ''; description = '' List of treesitter grammars to install. For grammars to be installed properly, - you must use grammars from `pkgs.vimPlugins.nvim-treesitter.grammarPlugins`. + you must use grammars from `pkgs.vimPlugins.nvim-treesitter.parsers` or `pkgs.vimPlugins.nvim-treesitter.grammarPlugins`. You can use `pkgs.vimPlugins.nvim-treesitter.allGrammars` to install all grammars. For languages already supported by nvf, you may use @@ -56,7 +47,7 @@ in { internal = true; readOnly = true; type = listOf package; - default = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [c lua vim vimdoc query]; + default = with pkgs.vimPlugins.nvim-treesitter.parsers; [c lua vim vimdoc query]; description = '' A list of treesitter grammars that will be installed by default if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars` @@ -73,105 +64,7 @@ in { ''; }; - indent = { - enable = mkEnableOption "indentation with treesitter" // {default = true;}; - disable = mkOption { - type = either (listOf str) luaInline; - default = []; - example = literalExpression ''["c" "rust"]''; - - description = '' - List of treesitter grammars to disable indentation for. - - This option can be either a list, in which case it will be - converted to a Lua table containing grammars to disable - indentation for, or a string containing a **lua function** - that will be read as is. - - ::: {.warning} - A comma will be added at the end of your function, so you - do not need to add it yourself. Doing so will cause in - syntax errors within your Neovim configuration. - ::: - ''; - }; - }; - - highlight = { - enable = mkEnableOption "highlighting with treesitter" // {default = true;}; - disable = mkOption { - type = either (listOf str) luaInline; - default = []; - example = literalMD '' - ```lua - -- Disable slow treesitter highlight for large files - function(lang, buf) - local max_filesize = 1000 * 1024 -- 1MB - local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end - ``` - ''; - - description = '' - List of treesitter grammars to disable highlighting for. - - This option can be either a list, in which case it will be - converted to a Lua table containing grammars to disable - highlighting for, or a string containing a **lua function** - that will be read as is. - - ::: {.warning} - A comma will be added at the end of your function, so you - do not need to add it yourself. Doing so will cause in - syntax errors within your Neovim configuration. - ::: - ''; - }; - - additionalVimRegexHighlighting = mkOption { - type = either bool (listOf str); - default = false; - description = '' - Takes either a boolean or a list of languages. - - Setting this to true will run `:h syntax` and tree-sitter at the same time. - You may this to `true` if you depend on 'syntax' being enabled (like for - indentation). - - ::: {.note} - Using this option may slow down your editor, and you may see some duplicate - highlights. - ::: - ''; - }; - }; - - incrementalSelection = { - enable = mkEnableOption "incremental selection with treesitter" // {default = true;}; - disable = mkOption { - type = either (listOf str) luaInline; - default = []; - example = literalExpression ''["c" "rust" ]''; - - description = '' - List of treesitter grammars to disable incremental selection - for. - - This option can be either a list, in which case it will be - converted to a Lua table containing grammars to disable - indentation for, or a string containing a **lua function** - that will be read as is. - - ::: {.warning} - A comma will be added at the end of your function, so you - do not need to add it yourself. Doing so will cause in - syntax errors within your Neovim configuration. - ::: - ''; - }; - }; + indent = {enable = mkEnableOption "indentation with treesitter" // {default = true;};}; + highlight = {enable = mkEnableOption "highlighting with treesitter" // {default = true;};}; }; } From 996451dbe2bd6286cf17ccdc771890e174826535 Mon Sep 17 00:00:00 2001 From: taylrfnt Date: Tue, 6 Jan 2026 20:44:40 -0600 Subject: [PATCH 23/33] flake: add darwinModule --- docs/manual/release-notes/rl-0.9.md | 12 ++++++++++++ flake.nix | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 9b5d2d29..12c28977 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -13,6 +13,18 @@ ## Changelog {#sec-release-0-9-changelog} +[taylrfnt](https://github.com/taylrfnt) + +- Introduce a `darwinModule` option for Darwin users. The ergonomics of + importing a `nixosModule` into a Darwin flake were less than ideal, and when + users fork and update npins, they are prone to encountering errors like the + following: + + ```shell + (class: "nixos") cannot be imported into a module + evaluation that expects class "darwin". + ``` + [suimong](https://github.com/suimong): - Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires diff --git a/flake.nix b/flake.nix index bd4c1149..5fd9b732 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,11 @@ '' self.nixosModules.nvf; }; + + darwinModules = { + nvf = import ./flake/modules/nixos.nix {inherit lib inputs;}; + default = self.darwinModules.nvf; + }; }; perSystem = {pkgs, ...}: { From eab22435ac7e72998be92c2e7a2fab314cc43605 Mon Sep 17 00:00:00 2001 From: taylrfnt Date: Tue, 6 Jan 2026 21:01:17 -0600 Subject: [PATCH 24/33] meta: update pr template broken url --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 66fe9c0f..04839ff6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,8 +24,8 @@ it above in your description. --> [editorconfig]: https://editorconfig.org -[changelog]: https://github.com/NotAShelf/nvf/tree/main/docs/release-notes -[hacking nvf]: https://notashelf.github.io/nvf/index.xhtml#sec-guidelines +[changelog]: https://github.com/NotAShelf/nvf/tree/main/docs/manual/release-notes +[hacking nvf]: https://nvf.notashelf.dev/hacking.html#sec-guidelines - [ ] I have updated the [changelog] as per my changes - [ ] I have tested, and self-reviewed my code From 2973ce1a6f8053bf0debfdfa9531b0caa356f2d1 Mon Sep 17 00:00:00 2001 From: jtliang24 Date: Wed, 7 Jan 2026 22:33:48 -0500 Subject: [PATCH 25/33] Update nixfmt command to use pkgs.nixfmt --- modules/plugins/languages/nix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index f03806f9..0dc5b357 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -39,7 +39,7 @@ }; nixfmt = { - command = getExe pkgs.nixfmt-rfc-style; + command = getExe pkgs.nixfmt; }; }; From 28a9fd25f70311ed36dbd5838ede1b237ee0044e Mon Sep 17 00:00:00 2001 From: jtliang24 Date: Wed, 7 Jan 2026 22:44:34 -0500 Subject: [PATCH 26/33] Update release notes for this change --- docs/manual/release-notes/rl-0.9.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 612e473d..ce8f6232 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -36,3 +36,7 @@ [Libadoxon](https://github.com/Libadoxon): - `toggleterm` open map now also works when in terminal mode + +[jtliang24](https://github.com/jtliang24): + +- Updated nix language plugin to use pkgs.nixfmt instead of pkgs.nixfmt-rfc-style From dd36db36d656faaa74f7ebd3f2672d2f328f342a Mon Sep 17 00:00:00 2001 From: Heitor Augusto <44377258+HeitorAugustoLN@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:53:02 -0300 Subject: [PATCH 27/33] treesitter: `parsers` -> `grammarPlugins` --- modules/plugins/treesitter/treesitter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/treesitter/treesitter.nix b/modules/plugins/treesitter/treesitter.nix index b7e2f031..c2039a9f 100644 --- a/modules/plugins/treesitter/treesitter.nix +++ b/modules/plugins/treesitter/treesitter.nix @@ -16,7 +16,7 @@ in { type = listOf package; default = []; example = literalExpression '' - with pkgs.vimPlugins.nvim-treesitter.parsers; [ + with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [ regex kdl ]; @@ -47,7 +47,7 @@ in { internal = true; readOnly = true; type = listOf package; - default = with pkgs.vimPlugins.nvim-treesitter.parsers; [c lua vim vimdoc query]; + default = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [c lua vim vimdoc query]; description = '' A list of treesitter grammars that will be installed by default if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars` From ec9716f011c32d0e58591e993aa6304fac3daa12 Mon Sep 17 00:00:00 2001 From: alfarel Date: Fri, 31 Oct 2025 18:28:01 +0000 Subject: [PATCH 28/33] pins: switch to maintained obsidian.nvim fork, use stable releases Stable releases are regular and compatible with the latest packaged nvim versions from nixpkgs. --- npins/sources.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index a9df47b7..a599f8b4 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2108,17 +2108,20 @@ "hash": "1qbyh8r2gbaw2n0mm7qwi4y8r9ywyz37q35vlxjzy879ba8dlnlm" }, "obsidian-nvim": { - "type": "Git", + "type": "GitRelease", "repository": { "type": "GitHub", - "owner": "epwalsh", + "owner": "obsidian-nvim", "repo": "obsidian.nvim" }, - "branch": "main", + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, "submodules": false, - "revision": "14e0427bef6c55da0d63f9a313fd9941be3a2479", - "url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz", - "hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr" + "version": "v3.15.3", + "revision": "3121b4b52a167949c4126254272346d363cc92b6", + "url": "https://api.github.com/repos/obsidian-nvim/obsidian.nvim/tarball/v3.15.3", + "hash": "0m6lwqb2y19xrs11hj818ja36z5ql34xk81x393b20jwnd0bar5l" }, "oil-git-status.nvim": { "type": "Git", From dbf4d7df760ba3401e8494fc137073be659e7d57 Mon Sep 17 00:00:00 2001 From: alfarel Date: Fri, 31 Oct 2025 19:46:43 +0000 Subject: [PATCH 29/33] notes/obsidian-nvim: remove unnecessary options and add integrations/compat --- docs/manual/release-notes/rl-0.9.md | 72 ++++++++++++++++++ modules/plugins/notes/obsidian/config.nix | 57 +++++++++++++-- modules/plugins/notes/obsidian/obsidian.nix | 81 ++++++++++++--------- 3 files changed, 171 insertions(+), 39 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index ce8f6232..09a75feb 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -6,6 +6,24 @@ `vimPlugins.nvim-treesitter`. Namely, it changes from the frozen `master` branch to the new main branch. This change removes incremental selections, so it is no longer available. +- [obsidian.nvim] now uses a maintained fork which has removed the `dir` + setting. Use `workspaces` instead: + + ```nix + { + workspaces = [ + { + name = "any-string"; + path = "~/old/dir/path/value"; + } + ]; + } + ``` + + Some other settings and commands are now deprecated but are still supported. + + - The `setupOpts.mappings` options were also removed. Use the built-in + Neovim settings (nvf's {option}`vim.keymaps`) ## Changelog {#sec-release-0-9-changelog} @@ -40,3 +58,57 @@ [jtliang24](https://github.com/jtliang24): - Updated nix language plugin to use pkgs.nixfmt instead of pkgs.nixfmt-rfc-style + +[alfarel](https://github.com/alfarelcynthesis): + +[obsidian.nvim]: https://github.com/obsidian-nvim/obsidian.nvim +[blink.cmp]: https://cmp.saghen.dev/ +[snacks.nvim]: https://github.com/folke/snacks.nvim +[mini.nvim]: https://nvim-mini.org/mini.nvim/ +[telescope.nvim]: https://github.com/nvim-telescope/telescope.nvim +[fzf-lua]: https://github.com/ibhagwan/fzf-lua +[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim +[markview.nvim]: https://github.com/OXY2DEV/markview.nvim +[which-key.nvim]: https://github.com/folke/which-key.nvim + +- Upgrade [obsidian.nvim] to use a maintained fork, instead of the unmaintained + upstream. + - Various upstream improvements: + - Support [blink.cmp] and completion plugin autodetection. + - Support various pickers for prompts, including [snacks.nvim]'s + `snacks.picker`, [mini.nvim]'s `mini.pick`, [telescope.nvim], and + [fzf-lua]. + - Merge commands like `ObsidianBacklinks` into `Obisidian backlinks`. The + old format is still supported by default. + - Some `setupOpts` options have changed: + - `disable_frontmatter` -> `frontmatter.enabled` (and inverted), still + supported. + - `note_frontmatter_func` -> `frontmatter.func`, still supported. + - `statusline` module is now deprecated in favour of `footer`, still + supported. + - `dir` is no longer supported, use `workspaces`: + + ```nix + { + workspaces = [ + { + name = "any-string"; + path = "~/old/dir/path/value"; + } + ]; + } + ``` + + - `use_advanced_uri` -> `open.use_advanced_uri`. + - Mappings are now expected to be set using the built-in Neovim APIs, + managed by `vim.keymaps` in nvf, instead of `mappings` options. + - Some option defaults have changed. + - And more. + - Automatically configure an enabled picker in the order mentioned above, if + any are enabled. + - Add integration with `snacks.image` for rendering workspace/vault assets. + - Detect if [render-markdown.nvim] or [markview.nvim] are enabled and disable + the `ui` module if so. It should work without this, but `render-markdown`'s + {command}`:healthcheck` doesn't know that. + - Remove [which-key.nvim] `o` `+Notes` description which did not + actually correspond to any keybinds. diff --git a/modules/plugins/notes/obsidian/config.nix b/modules/plugins/notes/obsidian/config.nix index 835bc17c..145ddff7 100644 --- a/modules/plugins/notes/obsidian/config.nix +++ b/modules/plugins/notes/obsidian/config.nix @@ -3,9 +3,9 @@ lib, ... }: let - inherit (lib.modules) mkIf; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.generators) mkLuaInline; inherit (lib.nvim.dag) entryAnywhere; - inherit (lib.nvim.binds) pushDownDefault; inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.notes.obsidian; @@ -18,13 +18,58 @@ in { "tabular" ]; - binds.whichKey.register = pushDownDefault { - "o" = "+Notes"; - }; - pluginRC.obsidian = entryAnywhere '' require("obsidian").setup(${toLuaObject cfg.setupOpts}) ''; + + notes.obsidian.setupOpts = let + # may not be defined + snacks-picker.enable = config.vim.utility.snacks-nvim.setupOpts.picker.enabled or false; + mini-pick = config.vim.mini.pick; + inherit (config.vim) telescope fzf-lua; + + inherit (config.vim.languages.markdown.extensions) render-markdown-nvim markview-nvim; + in + mkMerge [ + # Don't set option unless we have a useful setting for it. + (mkIf (snacks-picker.enable || mini-pick.enable || telescope.enable || fzf-lua.enable) { + # It doesn't detect/choose this. + # Some pickers and completion plugins don't get detected correctly by the checkhealth, but they all work. + # Values taken from the [config's](https://github.com/obsidian-nvim/obsidian.nvim/blob/main/lua/obsidian/config/init.lua) valid ones. + picker.name = + if snacks-picker.enable + then "snacks.pick" + else if mini-pick.enable + then "mini.pick" + else if telescope.enable + then "telescope.nvim" + else if fzf-lua.enable + then "fzf-lua" + # NOTE: Shouldn't happen with the if-guard. + else null; + }) + + # Should be disabled automatically, but still shows up in render-markdown's checkhealth. + # This is also useful in that it will conflict with a user explicitly enabling it + # without mkForce, which is probably a copy paste issue and a sign to look at + # whether this option is useful. + (mkIf (render-markdown-nvim.enable || markview-nvim.enable) {ui.enable = false;}) + ]; + + # Resolve markdown image paths in the vault. + # Only actually used by snacks if image.enabled is set to true and + # required programs are supplied and `attachments.img_folder` is correct. + # From https://github.com/obsidian-nvim/obsidian.nvim/wiki/Images, + # which notes the API might change. + utility.snacks-nvim.setupOpts = mkIf config.vim.utility.snacks-nvim.enable { + image.resolve = mkLuaInline '' + function(path, src) + if require("obsidian.api").path_is_note(path) then + return require("obsidian.api").resolve_image_path(src) + end + end + ''; + }; }; }; } diff --git a/modules/plugins/notes/obsidian/obsidian.nix b/modules/plugins/notes/obsidian/obsidian.nix index 17369b88..15cdf33f 100644 --- a/modules/plugins/notes/obsidian/obsidian.nix +++ b/modules/plugins/notes/obsidian/obsidian.nix @@ -1,14 +1,7 @@ -{ - config, - lib, - ... -}: let - inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) bool str nullOr; - inherit (lib.modules) mkRenamedOptionModule; +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.modules) mkRenamedOptionModule mkRemovedOptionModule; inherit (lib.nvim.types) mkPluginSetupOption; - - autocompleteCfg = config.vim.autocomplete; in { imports = let renamedSetupOption = oldPath: newPath: @@ -16,38 +9,60 @@ in { (["vim" "notes" "obsidian"] ++ oldPath) (["vim" "notes" "obsidian" "setupOpts"] ++ newPath); in [ - (renamedSetupOption ["dir"] ["dir"]) + ( + mkRemovedOptionModule ["vim" "notes" "obsidian" "dir"] + '' + `obsidian.nvim` has migrated to the `setupOpts.workspaces` option to support multiple vaults with a single interface. + + To continue using a single vault, set: + + ```nix + { + notes.obsidian.setupOpts.workspaces = [ + { + name = "any-string"; + path = "~/old/dir/path/value"; + } + ]; + } + ``` + + See the [wiki](https://github.com/obsidian-nvim/obsidian.nvim/wiki/Workspace#vault-based-workspaces) for more information. + '' + ) (renamedSetupOption ["daily-notes" "folder"] ["daily_notes" "folder"]) (renamedSetupOption ["daily-notes" "date-format"] ["daily_notes" "date_format"]) (renamedSetupOption ["completion"] ["completion"]) ]; + options.vim.notes = { obsidian = { - enable = mkEnableOption "complementary neovim plugins for Obsidian editor"; + enable = + mkEnableOption "" + // { + description = '' + Whether to enable plugins to complement the Obsidian markdown editor [obsidian.nvim]. - setupOpts = mkPluginSetupOption "Obsidian.nvim" { - daily_notes = { - folder = mkOption { - type = nullOr str; - default = null; - description = "Directory in which daily notes should be created"; - }; - date_format = mkOption { - type = nullOr str; - default = null; - description = "Date format used for creating daily notes"; - }; + Enables [vim-markdown] which automatically folds markdown headings inside and outside of workspaces/vaults. + Set {option}`vim.globals.vim_markdown_folding_disable = 1;` to disable automatic folding, + or {option}`vim.globals.vim_markdown_folding_level = ;` to set the default fold level for new buffers. + + nvf will choose one of `snacks.picker`, `mini.pick`, `telescope`, or `fzf-lua` as the `obsidian.nvim` picker based on whether they are enabled, in that order. + + You can enable one of them with one of the following: + + - {option}`vim.utility.snacks-nvim.setupOpts.picker.enabled` and {option}`vim.utility.snacks-nvim.enable` + - {option}`vim.mini.pick.enable` + - {option}`vim.telescope.enable` + - {option}`vim.fzf-lua.enable` + + {option}`vim.notes.obsidian.setupOpts.ui.enable` is automatically disabled if `render-markdown.nvim` or `markview.nvim` are enabled. + + [vim-markdown]: https://github.com/preservim/vim-markdown?tab=readme-ov-file#options + ''; }; - completion = { - nvim_cmp = mkOption { - # If using nvim-cmp, otherwise set to false - type = bool; - description = "If using nvim-cmp, otherwise set to false"; - default = autocompleteCfg.nvim-cmp.enable || autocompleteCfg.blink-cmp.enable; - }; - }; - }; + setupOpts = mkPluginSetupOption "obsidian.nvim" {}; }; }; } From 659c62e30d584ec9cf6fbb698d9fdfa7823bdd87 Mon Sep 17 00:00:00 2001 From: alfarel Date: Fri, 31 Oct 2025 19:47:24 +0000 Subject: [PATCH 30/33] docs/modules: remove outdated and incorrect input-following suggestions --- docs/manual/installation/modules/home-manager.md | 13 +++---------- docs/manual/installation/modules/nixos.md | 14 +++----------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/docs/manual/installation/modules/home-manager.md b/docs/manual/installation/modules/home-manager.md index 916208ce..f5d85b72 100644 --- a/docs/manual/installation/modules/home-manager.md +++ b/docs/manual/installation/modules/home-manager.md @@ -19,20 +19,13 @@ To use **nvf** with flakes, we first need to add the input to our `flake.nix`. # flake.nix { inputs = { - # Optional, if you intend to follow nvf's obsidian-nvim input - # you must also add it as a flake input. - obsidian-nvim.url = "github:epwalsh/obsidian.nvim"; - - # Required, nvf works best and only directly supports flakes + # nvf works best with and only directly supports flakes nvf = { url = "github:NotAShelf/nvf"; # You can override the input nixpkgs to follow your system's # instance of nixpkgs. This is safe to do as nvf does not depend # on a binary cache. inputs.nixpkgs.follows = "nixpkgs"; - # Optionally, you can also override individual plugins - # for example: - inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs }; # ... @@ -44,8 +37,8 @@ Followed by importing the home-manager module somewhere in your configuration. ```nix { - # Assuming "nvf" is in your inputs and inputs is in the argument set. - # See example installation below + # Assuming nvf is in your inputs and inputs is in the argument set. + # See example installation below. imports = [ inputs.nvf.homeManagerModules.default ]; } ``` diff --git a/docs/manual/installation/modules/nixos.md b/docs/manual/installation/modules/nixos.md index 0186465b..95a0fc8f 100644 --- a/docs/manual/installation/modules/nixos.md +++ b/docs/manual/installation/modules/nixos.md @@ -19,20 +19,13 @@ To use **nvf** with flakes, we first need to add the input to our `flake.nix`. # flake.nix { inputs = { - # Optional, if you intend to follow nvf's obsidian-nvim input - # you must also add it as a flake input. - obsidian-nvim.url = "github:epwalsh/obsidian.nvim"; - - # Required, nvf works best and only directly supports flakes + # nvf works best with and only directly supports flakes nvf = { url = "github:NotAShelf/nvf"; # You can override the input nixpkgs to follow your system's # instance of nixpkgs. This is safe to do as nvf does not depend # on a binary cache. inputs.nixpkgs.follows = "nixpkgs"; - # Optionally, you can also override individual plugins - # for example: - inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs }; # ... @@ -44,8 +37,8 @@ Followed by importing the NixOS module somewhere in your configuration. ```nix { - # assuming nvf is in your inputs and inputs is in the argset - # see example below + # Assuming nvf is in your inputs and inputs is in the argument set. + # See example below. imports = [ inputs.nvf.nixosModules.default ]; } ``` @@ -79,7 +72,6 @@ configure **nvf**. { programs.nvf = { enable = true; - # Your settings need to go into the settings attribute set # most settings are documented in the appendix settings = { From f8e6eccea432ce20ba30f112fcbcb0197a4ed063 Mon Sep 17 00:00:00 2001 From: alfarel Date: Fri, 31 Oct 2025 19:47:49 +0000 Subject: [PATCH 31/33] configuration.nix: don't use obsidian.nvim Obsidian essentially requires direct configuration, is not for a generic config example config. It isn't enabled now, so removing it should be fine. --- configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index cc314288..e3b85f92 100644 --- a/configuration.nix +++ b/configuration.nix @@ -214,7 +214,6 @@ isMaximal: { }; notes = { - obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled neorg.enable = false; orgmode.enable = false; mind-nvim.enable = isMaximal; From 11a7e950092a9c07d8ef725e58843042cd897f9f Mon Sep 17 00:00:00 2001 From: alfarel Date: Sat, 20 Dec 2025 07:31:12 +0000 Subject: [PATCH 32/33] notes/obsidian-nvim: fix checkhealth by building from pin manually --- modules/wrapper/build/config.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 68b2c00d..ef1c2893 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -46,6 +46,21 @@ # Disable failing require check hook checks doCheck = false; }; + # Checkhealth fails to get the plugin's commit and therefore to + # show the rest of the useful diagnostics if not built like this. + obsidian-nvim = pkgs.vimUtils.buildVimPlugin { + # If set to `"obsidian-nvim"`, this breaks like `buildPlug` and `noBuildPlug`. + name = "obsidian.nvim"; + src = getPin "obsidian-nvim"; + nvimSkipModules = [ + "minimal" + # require picker plugins + "obsidian.picker._telescope" + "obsidian.picker._snacks" + "obsidian.picker._fzf" + "obsidian.picker._mini" + ]; + }; # Get plugins built from source from self.packages # If adding a new plugin to be built from source, it must also be inherited From eb11f9b9e512070988dd09998fb63f387c94a64c Mon Sep 17 00:00:00 2001 From: changsun20 <110759360+changsun20@users.noreply.github.com> Date: Fri, 9 Jan 2026 21:46:19 +0800 Subject: [PATCH 33/33] docs: fix the xdg-open path in building the docs part --- docs/manual/hacking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/hacking.md b/docs/manual/hacking.md index 0b48f3dd..40f0854e 100644 --- a/docs/manual/hacking.md +++ b/docs/manual/hacking.md @@ -388,7 +388,7 @@ generated and opened by typing the following in a shell within a clone of the $ nix build .#docs-html # Open it with a valid browser -$ xdg-open $PWD/result/share/doc/nvf/index.html +$ xdg-open $PWD/result/share/doc/index.html ``` Additionally, if you are adding new links to the documentation it is **generally