From 95c0cc3bb07ec294101562f5300ab0f5cbae1258 Mon Sep 17 00:00:00 2001 From: Venkatesan Ravi Date: Sat, 5 Apr 2025 02:00:02 +0000 Subject: [PATCH 01/10] utility/fzf-lua: remove hard dependency on fzf --- docs/release-notes/rl-0.8.md | 1 + modules/plugins/utility/fzf-lua/fzf-lua.nix | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index a245b006..1f36e37b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -300,6 +300,7 @@ - Add neo-tree integration for Bufferline. - Add more applicable filetypes to illuminate denylist. - Disable mini.indentscope for applicable filetypes. +- Fix fzf-lua having a hard dependency on fzf. [tebuevd](https://github.com/tebuevd): diff --git a/modules/plugins/utility/fzf-lua/fzf-lua.nix b/modules/plugins/utility/fzf-lua/fzf-lua.nix index c700add7..dbdf320f 100644 --- a/modules/plugins/utility/fzf-lua/fzf-lua.nix +++ b/modules/plugins/utility/fzf-lua/fzf-lua.nix @@ -1,15 +1,21 @@ { config, lib, + pkgs, ... }: let - inherit (lib.types) nullOr enum; + inherit (lib.types) enum package; inherit (lib.options) mkEnableOption mkOption; inherit (lib.nvim.types) mkPluginSetupOption borderType; in { options.vim.fzf-lua = { enable = mkEnableOption "fzf-lua"; setupOpts = mkPluginSetupOption "fzf-lua" { + fzf_bin = mkOption { + type = package; + default = "${lib.getExe pkgs.fzf}"; + description = "fzf package to use"; + }; winopts.border = mkOption { type = borderType; default = config.vim.ui.borders.globalStyle; From b7c08147e0a725b0bed8dc9d313ee3f80d97e3b5 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 4 Apr 2025 15:56:23 +0200 Subject: [PATCH 02/10] language/ts: add conform and lint rules for tsx --- modules/plugins/languages/ts.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index 8589d7ec..1736af2b 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -204,9 +204,13 @@ in { (mkIf cfg.format.enable { vim.formatter.conform-nvim = { enable = true; - setupOpts.formatters_by_ft.typescript = [cfg.format.type]; - setupOpts.formatters.${cfg.format.type} = { - command = getExe cfg.format.package; + setupOpts = { + formatters_by_ft.typescript = [cfg.format.type]; + # .tsx files + formatters_by_ft.typescriptreact = [cfg.format.type]; + formatters.${cfg.format.type} = { + command = getExe cfg.format.package; + }; }; }; }) @@ -215,6 +219,7 @@ in { vim.diagnostics.nvim-lint = { enable = true; linters_by_ft.typescript = cfg.extraDiagnostics.types; + linters_by_ft.typescriptreact = cfg.extraDiagnostics.types; linters = mkMerge (map (name: { ${name}.cmd = getExe diagnosticsProviders.${name}.package; From cb1d127d2f90e22fb8ad92ec94b71c5b88ce9c48 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 5 Apr 2025 15:51:35 +0200 Subject: [PATCH 03/10] docs: update release notes --- docs/release-notes/rl-0.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 8b87ae99..0ab84f45 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -106,6 +106,7 @@ - Add [blink.cmp] support. - Add `LazyFile` user event. - Migrate language modules from none-ls to conform/nvim-lint +- Add tsx support in conform and lint [diniamo](https://github.com/diniamo): From da57f955dfc59c62cba92c823021be03ac7593dd Mon Sep 17 00:00:00 2001 From: army castillo Date: Sat, 5 Apr 2025 23:50:41 -0400 Subject: [PATCH 04/10] assistant/codecompanion-nvim: fix nvim-cmp and defaults --- docs/release-notes/rl-0.8.md | 1 + .../assistant/codecompanion/codecompanion-nvim.nix | 14 ++++++++++++-- modules/plugins/assistant/codecompanion/config.nix | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 8b87ae99..161f50fe 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -198,6 +198,7 @@ Inspiration from `vim.languages.clang.dap` implementation. - Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`. - Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`. +- Fix [codecompanion-nvim] plugin: nvim-cmp error and setupOpts defaults. [nezia1](https://github.com/nezia1): diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index 9ebe30c0..a73f1566 100644 --- a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -9,7 +9,12 @@ in { setupOpts = mkPluginSetupOption "codecompanion-nvim" { opts = { - send_code = mkEnableOption "code from being sent to the LLM."; + send_code = + mkEnableOption "" + // { + default = true; + description = "code from being sent to the LLM."; + }; log_level = mkOption { type = enum ["DEBUG" "INFO" "ERROR" "TRACE"]; @@ -64,7 +69,12 @@ in { }; chat = { - auto_scroll = mkEnableOption "automatic page scrolling."; + auto_scroll = + mkEnableOption "" + // { + default = true; + description = "automatic page scrolling."; + }; show_settings = mkEnableOption '' LLM settings to appear at the top of the chat buffer. diff --git a/modules/plugins/assistant/codecompanion/config.nix b/modules/plugins/assistant/codecompanion/config.nix index 6b427d28..08fc8cb2 100644 --- a/modules/plugins/assistant/codecompanion/config.nix +++ b/modules/plugins/assistant/codecompanion/config.nix @@ -22,6 +22,11 @@ in { }; treesitter.enable = true; + + autocomplete.nvim-cmp = { + sources = {codecompanion-nvim = "[codecompanion]";}; + sourcePlugins = ["codecompanion-nvim"]; + }; }; }; } From 2ef9022b58e8fb928841e9aa3f51a1d2c2a2662c Mon Sep 17 00:00:00 2001 From: Venkatesan Ravi Date: Sun, 6 Apr 2025 04:46:56 +0000 Subject: [PATCH 05/10] utility/fzf-lua: fix type for fzf-bin --- modules/plugins/utility/fzf-lua/fzf-lua.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/plugins/utility/fzf-lua/fzf-lua.nix b/modules/plugins/utility/fzf-lua/fzf-lua.nix index dbdf320f..0b242864 100644 --- a/modules/plugins/utility/fzf-lua/fzf-lua.nix +++ b/modules/plugins/utility/fzf-lua/fzf-lua.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib.types) enum package; + inherit (lib.types) enum str; inherit (lib.options) mkEnableOption mkOption; inherit (lib.nvim.types) mkPluginSetupOption borderType; in { @@ -12,9 +12,9 @@ in { enable = mkEnableOption "fzf-lua"; setupOpts = mkPluginSetupOption "fzf-lua" { fzf_bin = mkOption { - type = package; + type = str; default = "${lib.getExe pkgs.fzf}"; - description = "fzf package to use"; + description = "Path to fzf executable"; }; winopts.border = mkOption { type = borderType; From edbadf5d5a180ddb2cafa50774c05487146baeed Mon Sep 17 00:00:00 2001 From: Christoph Koehler Date: Sat, 5 Apr 2025 22:45:25 -0600 Subject: [PATCH 06/10] fix: telescope ignore patterns ".git" is a regex, so because of the '.' it matches more than just the .git directory, so escape the dot to make it literal. Here, that's done with a '%'. --- docs/release-notes/rl-0.8.md | 1 + modules/plugins/utility/telescope/telescope.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 8b87ae99..4ce12e95 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -316,6 +316,7 @@ - Fix oil config referencing snacks - Add [flash.nvim] plugin to `vim.utility.motion.flash-nvim` +- Fix default telescope ignore list entry for '.git/' to properly match [rrvsh](https://github.com/rrvsh): diff --git a/modules/plugins/utility/telescope/telescope.nix b/modules/plugins/utility/telescope/telescope.nix index beacc990..9d63c3cf 100644 --- a/modules/plugins/utility/telescope/telescope.nix +++ b/modules/plugins/utility/telescope/telescope.nix @@ -117,7 +117,7 @@ file_ignore_patterns = mkOption { description = "A table of lua regex that define the files that should be ignored."; type = listOf str; - default = ["node_modules" ".git/" "dist/" "build/" "target/" "result/"]; + default = ["node_modules" "%.git/" "dist/" "build/" "target/" "result/"]; }; color_devicons = mkOption { description = "Boolean if devicons should be enabled or not."; From 51d76dd51572193135a0dde94fc6ad6dbf1fff1d Mon Sep 17 00:00:00 2001 From: army castillo Date: Sun, 6 Apr 2025 02:48:58 -0400 Subject: [PATCH 07/10] assistant/codecompanion-nvim: Description clean up Added "Whether to enable" to mkEnableOption descriptions with `//` merge. --- .../codecompanion/codecompanion-nvim.nix | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix index a73f1566..8e5ed4cc 100644 --- a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -13,7 +13,9 @@ in { mkEnableOption "" // { default = true; - description = "code from being sent to the LLM."; + description = '' + Whether to enable code being sent to the LLM. + ''; }; log_level = mkOption { @@ -35,7 +37,10 @@ in { mkEnableOption "" // { default = true; - description = "a diff view to see the changes made by the LLM."; + description = '' + Whether to enable a diff view + to see the changes made by the LLM. + ''; }; close_chat_at = mkOption { @@ -73,7 +78,7 @@ in { mkEnableOption "" // { default = true; - description = "automatic page scrolling."; + description = "Whether to enable automatic page scrolling."; }; show_settings = mkEnableOption '' @@ -95,14 +100,18 @@ in { mkEnableOption "" // { default = true; - description = "references in the chat buffer."; + description = '' + Whether to enable references in the chat buffer. + ''; }; show_token_count = mkEnableOption "" // { default = true; - description = "the token count for each response."; + description = '' + Whether to enable the token count for each response. + ''; }; intro_message = mkOption { @@ -165,7 +174,10 @@ in { mkEnableOption "" // { default = true; - description = "showing default actions in the action palette."; + description = '' + Whether to enable showing default + actions in the action palette. + ''; }; show_default_prompt_library = @@ -173,7 +185,8 @@ in { // { default = true; description = '' - showing default prompt library in the action palette. + Whether to enable showing default + prompt library in the action palette. ''; }; }; From 3e4f99311aeec70cb769ed09564ed9d3914a0ebc Mon Sep 17 00:00:00 2001 From: Venkatesan Ravi Date: Sun, 6 Apr 2025 07:12:44 +0000 Subject: [PATCH 08/10] statusline/lualine: add neo-tree extension --- docs/release-notes/rl-0.8.md | 1 + modules/plugins/statusline/lualine/config.nix | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 32460969..4068c8f0 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -303,6 +303,7 @@ - Disable mini.indentscope for applicable filetypes. - Fix fzf-lua having a hard dependency on fzf. - Enable inlay hints support - `config.vim.lsp.inlayHints`. +- Add `neo-tree` extension to `lualine`. [tebuevd](https://github.com/tebuevd): diff --git a/modules/plugins/statusline/lualine/config.nix b/modules/plugins/statusline/lualine/config.nix index facfcebb..b8334bfd 100644 --- a/modules/plugins/statusline/lualine/config.nix +++ b/modules/plugins/statusline/lualine/config.nix @@ -14,13 +14,18 @@ bCfg = config.vim.ui.breadcrumbs; in { config = mkMerge [ - # TODO: move into nvim-tree file (mkIf config.vim.filetree.nvimTree.enable { vim.statusline.lualine.setupOpts = { extensions = ["nvim-tree"]; }; }) + (mkIf config.vim.filetree.neo-tree.enable { + vim.statusline.lualine.setupOpts = { + extensions = ["neo-tree"]; + }; + }) + (mkIf (bCfg.enable && bCfg.lualine.winbar.enable && bCfg.source == "nvim-navic") { vim.statusline.lualine.setupOpts = { # TODO: rewrite in new syntax From 851dbc92fb5b280207bfc8234c33369b01b8efcd Mon Sep 17 00:00:00 2001 From: Christoph Koehler Date: Mon, 7 Apr 2025 12:00:02 -0600 Subject: [PATCH 09/10] Merge pull request #808 from ckoehler/gitlinker git/gitlinker-nvim: init --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/git/default.nix | 2 ++ modules/plugins/git/gitlinker-nvim/config.nix | 23 +++++++++++++++++++ .../plugins/git/gitlinker-nvim/default.nix | 6 +++++ .../git/gitlinker-nvim/gitlinker-nvim.nix | 13 +++++++++++ npins/sources.json | 13 +++++++++++ 6 files changed, 59 insertions(+) create mode 100644 modules/plugins/git/gitlinker-nvim/config.nix create mode 100644 modules/plugins/git/gitlinker-nvim/default.nix create mode 100644 modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 32460969..239f91b0 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -315,10 +315,12 @@ [ckoehler](https://github.com/ckoehler): [flash.nvim]: https://github.com/folke/flash.nvim +[gitlinker.nvim]: https://github.com/linrongbin16/gitlinker.nvim - Fix oil config referencing snacks - Add [flash.nvim] plugin to `vim.utility.motion.flash-nvim` - Fix default telescope ignore list entry for '.git/' to properly match +- Add [gitlinker.nvim] plugin to `vim.git.gitlinker-nvim` [rrvsh](https://github.com/rrvsh): diff --git a/modules/plugins/git/default.nix b/modules/plugins/git/default.nix index 6ed92217..06c80f35 100644 --- a/modules/plugins/git/default.nix +++ b/modules/plugins/git/default.nix @@ -5,6 +5,7 @@ in { ./gitsigns ./vim-fugitive ./git-conflict + ./gitlinker-nvim ]; options.vim.git = { @@ -15,6 +16,7 @@ in { * gitsigns * vim-fugitive * git-conflict + * gitlinker-nvim ''; }; } diff --git a/modules/plugins/git/gitlinker-nvim/config.nix b/modules/plugins/git/gitlinker-nvim/config.nix new file mode 100644 index 00000000..d1104a28 --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/config.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.git.gitlinker-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["gitlinker-nvim"]; + lazy.plugins = { + "gitlinker-nvim" = { + package = "gitlinker-nvim"; + setupModule = "gitlinker"; + inherit (cfg) setupOpts; + cmd = ["GitLink"]; + }; + }; + }; + }; +} diff --git a/modules/plugins/git/gitlinker-nvim/default.nix b/modules/plugins/git/gitlinker-nvim/default.nix new file mode 100644 index 00000000..389b7a55 --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./gitlinker-nvim.nix + ]; +} diff --git a/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix b/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix new file mode 100644 index 00000000..f315e5f9 --- /dev/null +++ b/modules/plugins/git/gitlinker-nvim/gitlinker-nvim.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.git.gitlinker-nvim = { + enable = mkEnableOption "gitlinker-nvim" // {default = config.vim.git.enable;}; + setupOpts = mkPluginSetupOption "gitlinker-nvim" {}; + }; +} diff --git a/npins/sources.json b/npins/sources.json index 140b3b24..c3ec23b1 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -562,6 +562,19 @@ "url": "https://github.com/projekt0n/github-nvim-theme/archive/c106c9472154d6b2c74b74565616b877ae8ed31d.tar.gz", "hash": "1w7lz4bgfm8hq1mir4hcr8ik585d4l4w7bjl8yl3g3zklj8223pw" }, + "gitlinker-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "linrongbin16", + "repo": "gitlinker.nvim" + }, + "branch": "master", + "submodules": false, + "revision": "23982c86f50a9c3f4bc531d41b7a4a68ddd12355", + "url": "https://github.com/linrongbin16/gitlinker.nvim/archive/23982c86f50a9c3f4bc531d41b7a4a68ddd12355.tar.gz", + "hash": "1kz3gpdysxzpb27izhq0jgk59xw01mmnfvg5yrqvxnfhyjblxvqh" + }, "gitsigns-nvim": { "type": "Git", "repository": { From a6f8df678549829a0dfcd6d7609ee098efeacb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20=C4=90=C4=83ng=20Khoa?= Date: Thu, 10 Apr 2025 20:47:52 +0700 Subject: [PATCH 10/10] Merge pull request #818 from rice-cracker-dev/eslint-fix languages: fix eslint_d error on load --- docs/release-notes/rl-0.8.md | 1 + modules/plugins/languages/astro.nix | 2 +- modules/plugins/languages/svelte.nix | 2 +- modules/plugins/languages/ts.nix | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 40f2af57..6fc28a55 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -288,6 +288,7 @@ [rice-cracker-dev](https://github.com/rice-cracker-dev): - `eslint_d` now checks for configuration files to load. +- Fixed an error where `eslint_d` fails to load. [Sc3l3t0n](https://github.com/Sc3l3t0n): diff --git a/modules/plugins/languages/astro.nix b/modules/plugins/languages/astro.nix index 9c359a2e..c12f6ada 100644 --- a/modules/plugins/languages/astro.nix +++ b/modules/plugins/languages/astro.nix @@ -62,7 +62,7 @@ local markers = { "eslint.config.js", "eslint.config.mjs", ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) + local path = vim.fs.joinpath(cwd, filename) if vim.loop.fs_stat(path) then return require("lint.linters.eslint_d").parser(output, bufnr, cwd) end diff --git a/modules/plugins/languages/svelte.nix b/modules/plugins/languages/svelte.nix index 67f11bc2..e01ec427 100644 --- a/modules/plugins/languages/svelte.nix +++ b/modules/plugins/languages/svelte.nix @@ -61,7 +61,7 @@ local markers = { "eslint.config.js", "eslint.config.mjs", ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) + local path = vim.fs.joinpath(cwd, filename) if vim.loop.fs_stat(path) then return require("lint.linters.eslint_d").parser(output, bufnr, cwd) end diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index 1736af2b..ffab265b 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -103,7 +103,7 @@ local markers = { "eslint.config.js", "eslint.config.mjs", ".eslintrc", ".eslintrc.json", ".eslintrc.js", ".eslintrc.yml", } for _, filename in ipairs(markers) do - local path = vim.fs.join(cwd, filename) + local path = vim.fs.joinpath(cwd, filename) if vim.loop.fs_stat(path) then return require("lint.linters.eslint_d").parser(output, bufnr, cwd) end