From 92501a9814e8a16c2ad68e468e1271617e13378f Mon Sep 17 00:00:00 2001 From: alfarel Date: Thu, 9 Apr 2026 11:42:43 -0400 Subject: [PATCH 1/6] docs/quirks: remove extra `If` --- docs/manual/quirks/nodejs.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/manual/quirks/nodejs.md b/docs/manual/quirks/nodejs.md index f7031af6..d78843f0 100644 --- a/docs/manual/quirks/nodejs.md +++ b/docs/manual/quirks/nodejs.md @@ -9,8 +9,6 @@ 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 From 5f4e279187990ce132ef57166532f3824aa44f1e Mon Sep 17 00:00:00 2001 From: CaueAnjos <141049846+CaueAnjos@users.noreply.github.com> Date: Tue, 3 Feb 2026 21:43:46 -0300 Subject: [PATCH 2/6] languages/csharp: add razor support Adds razor support for `roslyn` and `csharp_ls` servers --- docs/manual/release-notes/rl-0.9.md | 4 + modules/plugins/languages/csharp.nix | 118 +++++++++++++++++++++++---- npins/sources.json | 13 +++ 3 files changed, 119 insertions(+), 16 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 2eeca8f9..96d04411 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -380,4 +380,8 @@ https://github.com/gorbit99/codewindow.nvim - Added configuration option for `foldenable` +[CaueAnjos](https://github.com/caueanjos) + +- Add razor support for `roslyn_ls` and `csharp_ls` + diff --git a/modules/plugins/languages/csharp.nix b/modules/plugins/languages/csharp.nix index b6942d0a..3dfb128d 100644 --- a/modules/plugins/languages/csharp.nix +++ b/modules/plugins/languages/csharp.nix @@ -12,7 +12,7 @@ inherit (lib.meta) getExe; inherit (lib.generators) mkLuaInline; inherit (lib.strings) optionalString; - inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf; + inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption deprecatedSingleOrListOf; inherit (lib.nvim.lua) toLuaObject; inherit (lib.nvim.attrsets) mapListToAttrs; @@ -24,9 +24,6 @@ in optionalString (key != null) "vim.keymap.set('n', '${key}', ${action}, {buffer=bufnr, noremap=true, silent=true, desc='${desc}'})"; - # Omnisharp doesn't have colors in popup docs for some reason, and I've also - # seen mentions of it being way slower, so until someone finds missing - # functionality, this will be the default. defaultServers = ["csharp_ls"]; servers = { omnisharp = { @@ -118,8 +115,8 @@ }; csharp_ls = { - cmd = [(lib.getExe pkgs.csharp-ls)]; - filetypes = ["cs"]; + cmd = [(lib.getExe pkgs.csharp-ls) "--features" "razor-support"]; + filetypes = ["cs" "razor"]; root_dir = mkLuaInline '' function(bufnr, on_dir) local function find_root_pattern(fname, lua_pattern) @@ -162,19 +159,85 @@ ''; init_options = {}; }; + + roslyn = let + pkg = pkgs.vscode-extensions.ms-dotnettools.csharp; + pluginRoot = "${pkg}/share/vscode/extensions/ms-dotnettools.csharp"; + exe = "${pluginRoot}/.roslyn/Microsoft.CodeAnalysis.LanguageServer"; + razorSourceGenerator = "${pluginRoot}/.razorExtension/Microsoft.CodeAnalysis.LanguageServer"; + razorDesignTimePath = "${pluginRoot}/.razorExtension/Targets/Microsoft.NET.Sdk.Razor.DesignTime.targets"; + razorExtension = "${pluginRoot}/.razorExtension/Microsoft.VisualStudioCode.RazorExtension.dll"; + in { + cmd = mkLuaInline '' + { + "dotnet", + "${exe}.dll", + "--stdio", + "--logLevel=Information", + "--extensionLogDirectory=" .. vim.fs.dirname(vim.lsp.get_log_path()), + "--razorSourceGenerator=${razorSourceGenerator}", + "--razorDesignTimePath=${razorDesignTimePath}", + "--extension=${razorExtension}", + } + ''; + + filetypes = ["cs" "razor"]; + root_dir = mkLuaInline '' + function(bufnr, on_dir) + local function find_root_pattern(fname, lua_pattern) + return vim.fs.root(0, function(name, path) + return name:match(lua_pattern) + end) + end + + local fname = vim.api.nvim_buf_get_name(bufnr) + on_dir(find_root_pattern(fname, "%.sln$") or find_root_pattern(fname, "%.csproj$")) + end + ''; + init_options = {}; + }; }; extraServerPlugins = { omnisharp = ["omnisharp-extended-lsp-nvim"]; csharp_ls = ["csharpls-extended-lsp-nvim"]; roslyn_ls = []; + roslyn = ["roslyn-nvim"]; }; cfg = config.vim.languages.csharp; in { options = { vim.languages.csharp = { - enable = mkEnableOption "C# language support"; + enable = mkEnableOption '' + C# language support. + + ::: {.note} + This feature will not work if the .NET SDK is not installed. + Both `roslyn` (with `roslyn-nvim`) and `csharp_ls` require the .NET SDK to function properly with Razor. + Ensure that the .NET SDK is installed. + + Check for version compatibility for optimal performance. + ::: + + ::: {.warning} + At the moment, only `roslyn`(with roslyn-nvim) provides full Razor support. + `csharp_ls` is limited to `.cshtml` files. + ::: + ''; + + extensions = { + roslyn-nvim = { + enable = mkEnableOption '' + Roslyn LSP plugin for neovim + + ::: {.note} + This feature only works for `roslyn` (not `roslyn_ls`). + ::: + ''; + setupOpts = mkPluginSetupOption "roslyn-nvim" {}; + }; + }; treesitter = { enable = @@ -183,7 +246,8 @@ in { default = config.vim.languages.enableTreesitter; defaultText = literalExpression "config.vim.languages.enableTreesitter"; }; - package = mkGrammarOption pkgs "c_sharp"; + csPackage = mkGrammarOption pkgs "c_sharp"; + razorPackage = mkGrammarOption pkgs "razor"; }; lsp = { @@ -205,17 +269,39 @@ in { config = mkIf cfg.enable (mkMerge [ (mkIf cfg.treesitter.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.package]; + vim.treesitter.grammars = with cfg.treesitter; [csPackage razorPackage]; }) (mkIf cfg.lsp.enable { - vim.startPlugins = concatMap (server: extraServerPlugins.${server}) cfg.lsp.servers; - vim.lsp.servers = - mapListToAttrs (name: { - inherit name; - value = servers.${name}; - }) - cfg.lsp.servers; + vim = { + startPlugins = concatMap (server: extraServerPlugins.${server}) cfg.lsp.servers; + luaConfigRC.razorFileTypes = + /* + lua + */ + '' + -- Set unkown file types! + vim.filetype.add { + extension = { + razor = "razor", + cshtml = "razor", + }, + } + ''; + lsp.servers = + mapListToAttrs (name: { + inherit name; + value = servers.${name}; + }) + cfg.lsp.servers; + }; + }) + (mkIf cfg.extensions.roslyn-nvim.enable { + vim = mkMerge [ + { + startPlugins = ["roslyn-nvim"]; + } + ]; }) ]); } diff --git a/npins/sources.json b/npins/sources.json index c2b6fdba..a3c12951 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -2490,6 +2490,19 @@ "url": "https://github.com/rose-pine/neovim/archive/cf2a288696b03d0934da713d66c6d71557b5c997.tar.gz", "hash": "sha256-rwCsGLt2XwGvHN7DMgt3j9yKPNc2LVUfHYPECHx5xG8=" }, + "roslyn-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "seblyng", + "repo": "roslyn.nvim" + }, + "branch": "main", + "submodules": false, + "revision": "24f7c91ee5e09c63104deaab68f932620f25c24a", + "url": "https://github.com/seblyng/roslyn.nvim/archive/24f7c91ee5e09c63104deaab68f932620f25c24a.tar.gz", + "hash": "sha256-a/Slmkrz/4P/rfRhPa1W5kGV7joQNTN0Un7bbncCnk0=" + }, "rtp-nvim": { "type": "Git", "repository": { From 2859100b0df642fb439504772ea70a9d86747a24 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 10 Apr 2026 11:56:21 +0200 Subject: [PATCH 3/6] fix typos --- .github/typos.toml | 3 ++- modules/plugins/languages/csharp.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/typos.toml b/.github/typos.toml index b6211a80..ee33f4d5 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -10,6 +10,7 @@ default.extend-ignore-words-re = [ "esy", "BA", # somehow "BANanaD3V" is valid, but BA is not... "Emac", - "tese" # for glsl shaders + "tese", # for glsl shaders + "Caue", ] diff --git a/modules/plugins/languages/csharp.nix b/modules/plugins/languages/csharp.nix index 3dfb128d..f606c603 100644 --- a/modules/plugins/languages/csharp.nix +++ b/modules/plugins/languages/csharp.nix @@ -280,7 +280,7 @@ in { lua */ '' - -- Set unkown file types! + -- Set unknown file types! vim.filetype.add { extension = { razor = "razor", From c6f9e62d0424eef845e102e11b01bbad28144871 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 10 Apr 2026 12:06:07 +0200 Subject: [PATCH 4/6] ci: use cachix in docs preview --- .github/workflows/cachix.yml | 4 ++-- .github/workflows/docs-preview.yml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 1b935fb1..41ebcc45 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -36,7 +36,7 @@ jobs: with: authToken: ${{ secrets.CACHIX_TOKEN }} extraPullNames: nix-community - name: neovim-flake + name: nvf - name: Set default git branch (to reduce log spam) run: git config --global init.defaultBranch main @@ -44,5 +44,5 @@ jobs: - name: Validate Flakes run: nix flake check - - name: Build neovim-flake with default settings + - name: Build nvf with default settings run: nix build .#${{ matrix.package }} --print-build-logs diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index fb202852..31087747 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -32,6 +32,12 @@ jobs: substituters = https://cache.nixos.org/ https://feel-co.cachix.org trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= feel-co.cachix.org-1:nwEFNnwZvtl4KKSH5LDg+/+K7bV0vcs6faMHAJ6xx0w= + - uses: cachix/cachix-action@v17 + with: + authToken: ${{ secrets.CACHIX_TOKEN }} + extraPullNames: nix-community + name: nvf + - name: Set default git branch (to reduce log spam) run: git config --global init.defaultBranch main From 89819e9e96c5b99e1de0127dd24801cefca30b5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:10:12 +0000 Subject: [PATCH 5/6] build(deps): bump cachix/install-nix-action from 31.10.3 to 31.10.4 Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.10.3 to 31.10.4. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md) - [Commits](https://github.com/cachix/install-nix-action/compare/v31.10.3...v31.10.4) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-version: 31.10.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/cachix.yml | 2 +- .github/workflows/check.yml | 10 +++++----- .github/workflows/docs-preview.yml | 2 +- .github/workflows/manual.yml | 2 +- .github/workflows/update.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index 41ebcc45..e3140b6d 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -25,7 +25,7 @@ jobs: name: Checkout - name: Install Nix - uses: cachix/install-nix-action@v31.10.3 + uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4b75a325..279e98b3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31.10.3 + - uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v6 - name: Install Nix - uses: cachix/install-nix-action@v31.10.3 + uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | @@ -93,7 +93,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31.10.3 + - uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | @@ -131,7 +131,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31.10.3 + - uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | @@ -169,7 +169,7 @@ jobs: cat "$HOME/changed_files" - name: Install Nix - uses: cachix/install-nix-action@v31.10.3 + uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 31087747..e643f279 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31.10.3 + - uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 9e073e90..a5a017c9 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: cachix/install-nix-action@v31.10.3 + - uses: cachix/install-nix-action@v31.10.4 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 71af25d2..1e8b265f 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v6 - name: "Install Nix" - uses: cachix/install-nix-action@v31.10.3 + uses: cachix/install-nix-action@v31.10.4 - name: Set up Git run: | From 917f9c0ceb77411a4805ac8e401b3ca7ba81b8f5 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Thu, 9 Apr 2026 01:45:23 +0200 Subject: [PATCH 6/6] language/asm: add more filetypes --- docs/manual/release-notes/rl-0.9.md | 2 ++ modules/plugins/languages/asm.nix | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index 96d04411..563a9f51 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -303,6 +303,8 @@ - Added `languages.jq`. Supports highlighting, formatting and lsp. +- Extend `languages.asm` to support more filetypes out of the box. + - Didn't Add [`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim), you're crazy. diff --git a/modules/plugins/languages/asm.nix b/modules/plugins/languages/asm.nix index eccc91e7..01b21001 100644 --- a/modules/plugins/languages/asm.nix +++ b/modules/plugins/languages/asm.nix @@ -18,7 +18,7 @@ asm-lsp = { enable = true; cmd = [(getExe pkgs.asm-lsp)]; - filetypes = ["asm" "vmasm"]; + filetypes = ["asm" "nasm" "masm" "vmasm" "fasm" "tasm" "tiasm" "asm68k" "asm8300"]; root_markers = [".asm-lsp.toml" ".git"]; }; }; @@ -33,7 +33,9 @@ in { default = config.vim.languages.enableTreesitter; defaultText = literalExpression "config.vim.languages.enableTreesitter"; }; - package = mkGrammarOption pkgs "asm"; + packageASM = mkGrammarOption pkgs "asm"; + packageNASM = mkGrammarOption pkgs "nasm"; + packagePicoASM = mkGrammarOption pkgs "picoasm"; }; lsp = { @@ -53,7 +55,11 @@ in { config = mkIf cfg.enable (mkMerge [ (mkIf cfg.treesitter.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.package]; + vim.treesitter.grammars = [ + cfg.treesitter.packageASM + cfg.treesitter.packageNASM + cfg.treesitter.packagePicoASM + ]; }) (mkIf cfg.lsp.enable {