From b873c89d1c6dab44ffae66e70242fe83e5f433f2 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 30 Mar 2025 13:29:12 +0200 Subject: [PATCH 1/4] lsp: remove sinature help; now native with C-S --- modules/lsp.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/lsp.nix b/modules/lsp.nix index f5b97cc..00e1517 100644 --- a/modules/lsp.nix +++ b/modules/lsp.nix @@ -141,10 +141,6 @@ in action = "hover"; desc = "Hover"; }; - "ls" = { - action = "signature_help"; - desc = "Signature Help"; - }; }; }; }; From d475992a95e753f3ab88f79aa0ea87d525445df9 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 30 Mar 2025 13:30:48 +0200 Subject: [PATCH 2/4] lsp: remove function doc; now with S-K --- modules/lsp.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/lsp.nix b/modules/lsp.nix index 00e1517..74afbdb 100644 --- a/modules/lsp.nix +++ b/modules/lsp.nix @@ -137,10 +137,6 @@ in action = "implementation"; desc = "Goto Implementation"; }; - "k" = { - action = "hover"; - desc = "Hover"; - }; }; }; }; From a7712c2d148579c7864d5f5c0ccbb827d9199c9a Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 17 May 2025 01:29:09 +0200 Subject: [PATCH 3/4] nvim: enable visual_text --- modules/default.nix | 72 ++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 4d72a5d..f0a3c4f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -71,43 +71,47 @@ in secure = true; }; - plugins = let - crates = if options.plugins?crates then "crates" else "crates-nvim"; - in { - bufferline.enable = true; - commentary.enable = true; - "${crates}".enable = true; - fidget.enable = true; - gitsigns.enable = true; - indent-blankline.enable = true; - lastplace.enable = true; - lualine = { - enable = true; - settings = { - options = { - globalstatus = true; - theme = "onedark"; - }; - # https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options - sections = { - lualine_b = [ { - sources = [ "nvim_diagnostic" "nvim_lsp" ]; - } ]; - lualine_c = [ { - path = 1; - } ]; + diagnostics.virtual_text = true; + + plugins = + let + crates = if options.plugins?crates then "crates" else "crates-nvim"; + in + { + bufferline.enable = true; + commentary.enable = true; + "${crates}".enable = true; + fidget.enable = true; + gitsigns.enable = true; + indent-blankline.enable = true; + lastplace.enable = true; + lualine = { + enable = true; + settings = { + options = { + globalstatus = true; + theme = "onedark"; + }; + # https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options + sections = { + lualine_b = [{ + sources = [ "nvim_diagnostic" "nvim_lsp" ]; + }]; + lualine_c = [{ + path = 1; + }]; + }; }; }; + nvim-autopairs.enable = true; # brackets, html, ... + ${colorizer}.enable = true; + rainbow-delimiters.enable = true; + ts-context-commentstring.enable = true; # set comment string dynamically + vim-matchup.enable = true; # extends % key with comments + web-devicons.enable = true; + which-key.enable = true; + vim-suda.enable = true; }; - nvim-autopairs.enable = true; # brackets, html, ... - ${colorizer}.enable = true; - rainbow-delimiters.enable = true; - ts-context-commentstring.enable = true; # set comment string dynamically - vim-matchup.enable = true; # extends % key with comments - web-devicons.enable = true; - which-key.enable = true; - vim-suda.enable = true; - }; userCommands = { # Command aliases for common typos From 0c680917256d0bfa1bbb41cad2eae6ce163140f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 26 May 2025 20:42:52 +0200 Subject: [PATCH 4/4] Add test for 25.05, drop 24.11 --- .github/workflows/flake-build.yaml | 7 ++- flake.lock | 20 ++++---- flake.nix | 6 ++- modules/default.nix | 73 ++++++++++++++---------------- modules/treesitter.nix | 13 +----- 5 files changed, 54 insertions(+), 65 deletions(-) diff --git a/.github/workflows/flake-build.yaml b/.github/workflows/flake-build.yaml index e19d2c1..b409c7b 100644 --- a/.github/workflows/flake-build.yaml +++ b/.github/workflows/flake-build.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - target: [ "24.11", "unstable" ] + target: [ "25.05", "unstable" ] steps: - uses: actions/checkout@v4 @@ -30,9 +30,8 @@ jobs: if: matrix.target != 'unstable' run: | nix build -L \ - --override-input nixpkgs github:NixOS/nixpkgs/nixos-24.11 \ - --override-input home-manager github:nix-community/home-manager/release-24.11 \ - --override-input nixvim github:nix-community/nixvim/nixos-24.11 + --override-input nixpkgs github:NixOS/nixpkgs/nixos-25.05 \ + --override-input nixvim github:nix-community/nixvim/nixos-25.05 - name: build unstable if: matrix.target == 'unstable' diff --git a/flake.lock b/flake.lock index 6ca0477..66114e1 100644 --- a/flake.lock +++ b/flake.lock @@ -23,7 +23,10 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": [ + "nixvim", + "systems" + ] }, "locked": { "lastModified": 1731533236, @@ -41,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744232761, - "narHash": "sha256-gbl9hE39nQRpZaLjhWKmEu5ejtQsgI5TWYrIVVJn30U=", + "lastModified": 1748190013, + "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f675531bc7e6657c10a18b565cfebd8aa9e24c14", + "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", "type": "github" }, "original": { @@ -61,14 +64,15 @@ "nixpkgs": [ "nixpkgs" ], - "nuschtosSearch": [] + "nuschtosSearch": [], + "systems": "systems" }, "locked": { - "lastModified": 1744383153, - "narHash": "sha256-We4ePUixXnMOIqA9IRMWXGEW6efZRTGwTVCv5/yCvcU=", + "lastModified": 1748261770, + "narHash": "sha256-X+QUzjjZ64lZzzd1dkxIGoLHkJvmDqoEHhx81Mmx0rw=", "owner": "nix-community", "repo": "nixvim", - "rev": "e537d4a6b4c1c81f8b71dfd916fdf970d0d5c987", + "rev": "91ee94cde3d5fdde68550ac861fd0644ff47109f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5489d2c..f380cc0 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,15 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; + flake-utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "nixvim/systems"; + }; nixvim = { url = "github:nix-community/nixvim"; inputs = { nixpkgs.follows = "nixpkgs"; - # https://github.com/nix-community/nixvim/blob/main/flake.nix#L12-L34 nuschtosSearch.follows = ""; }; diff --git a/modules/default.nix b/modules/default.nix index f0a3c4f..3f7f446 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,8 +1,5 @@ { lib, options, pkgs, ... }: -let - colorizer = if lib.versionAtLeast lib.version "25.05pre" then "colorizer" else "nvim-colorizer"; -in { imports = [ ./cmp.nix @@ -71,47 +68,43 @@ in secure = true; }; - diagnostics.virtual_text = true; + diagnostic.settings.virtual_text = true; - plugins = - let - crates = if options.plugins?crates then "crates" else "crates-nvim"; - in - { - bufferline.enable = true; - commentary.enable = true; - "${crates}".enable = true; - fidget.enable = true; - gitsigns.enable = true; - indent-blankline.enable = true; - lastplace.enable = true; - lualine = { - enable = true; - settings = { - options = { - globalstatus = true; - theme = "onedark"; - }; - # https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options - sections = { - lualine_b = [{ - sources = [ "nvim_diagnostic" "nvim_lsp" ]; - }]; - lualine_c = [{ - path = 1; - }]; - }; + plugins = { + bufferline.enable = true; + commentary.enable = true; + crates.enable = true; + fidget.enable = true; + gitsigns.enable = true; + indent-blankline.enable = true; + lastplace.enable = true; + lualine = { + enable = true; + settings = { + options = { + globalstatus = true; + theme = "onedark"; + }; + # https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options + sections = { + lualine_b = [{ + sources = [ "nvim_diagnostic" "nvim_lsp" ]; + }]; + lualine_c = [{ + path = 1; + }]; }; }; - nvim-autopairs.enable = true; # brackets, html, ... - ${colorizer}.enable = true; - rainbow-delimiters.enable = true; - ts-context-commentstring.enable = true; # set comment string dynamically - vim-matchup.enable = true; # extends % key with comments - web-devicons.enable = true; - which-key.enable = true; - vim-suda.enable = true; }; + nvim-autopairs.enable = true; # brackets, html, ... + colorizer.enable = true; + rainbow-delimiters.enable = true; + ts-context-commentstring.enable = true; # set comment string dynamically + vim-matchup.enable = true; # extends % key with comments + web-devicons.enable = true; + which-key.enable = true; + vim-suda.enable = true; + }; userCommands = { # Command aliases for common typos diff --git a/modules/treesitter.nix b/modules/treesitter.nix index da97cd8..dd072ff 100644 --- a/modules/treesitter.nix +++ b/modules/treesitter.nix @@ -1,16 +1,12 @@ { lib, options, ... }: -let - # TODO: drop with 25.05 - hasDependencies = lib.versionAtLeast lib.version "25.05"; -in -lib.optionalAttrs hasDependencies { +{ dependencies = { gcc.enable = false; nodejs.enable = false; tree-sitter.enable = false; }; -} // { + plugins.treesitter = { enable = true; # exclude some big (above 10 MB) and rarely used languages @@ -22,11 +18,6 @@ lib.optionalAttrs hasDependencies { ) options.plugins.treesitter.grammarPackages.default; settings.highlight.enable = true; - } // lib.optionalAttrs (!hasDependencies) { - # we are not installing packages by hand - gccPackage = null; - nodejsPackage = null; - treesitterPackage = null; }; # Enable automatically closing and renaming HTML tags