diff --git a/docs/user-configs/list.toml b/docs/user-configs/list.toml index 7e0e71ae..4ec29163 100644 --- a/docs/user-configs/list.toml +++ b/docs/user-configs/list.toml @@ -60,11 +60,6 @@ repo = "nvim-nix" owner = "hbjydev" repo = "hvim" -[[config]] -owner = "HeitorAugustoLN" -repo = "nvim-config" -description = "HeitorAugustoLN's personal Neovim configuration made with Nixvim" - [[config]] owner = "JMartJonesy" repo = "kickstart.nixvim" @@ -196,3 +191,9 @@ owner = "carl0xs" title = "nixcfg" description = "Nix configuration setup, including nixvim" url = "https://github.com/carl0xs/nixcfg/blob/main/modules/workstation/neovim.nix" + +[[config]] +owner = "ar-at-localhost" +title = "np" +description = "Nixvim setup, focused on Project Oriented Development" +url = "https://github.com/ar-at-localhost/np" diff --git a/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix b/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix new file mode 100644 index 00000000..5374114b --- /dev/null +++ b/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix @@ -0,0 +1,47 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "blink-cmp-nixpkgs-maintainers"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + description = '' + nixpkgs-maintainers source for blink-cmp. + + --- + + This plugin should be configured through blink-cmp's `sources.providers` settings. + + For example: + + ```nix + plugins.blink-cmp = { + enable = true; + settings.sources = { + per_filetype = { + markdown = [ "nixpkgs_maintainers" ]; + }; + providers = { + nixpkgs_maintainers = { + module = "blink_cmp_nixpkgs_maintainers"; + name = "nixpkgs maintainers"; + opts = { + # Number of days after which the list of maintainers is refreshed + cache_lifetime = 14; + # Do not print status messages + silent = false; + # Customize the `nixpkgs` source flake for fetching the maintainers list + # Example: "github:NixOS/nixpkgs/master" + nixpkgs_flake_uri = "nixpkgs"; + }; + }; + }; + }; + }; + ``` + ''; + + # Configured through blink-cmp + callSetup = false; + hasLuaConfig = false; + hasSettings = false; +} diff --git a/plugins/by-name/blink-cmp/default.nix b/plugins/by-name/blink-cmp/default.nix index d12d4a4c..32d98169 100644 --- a/plugins/by-name/blink-cmp/default.nix +++ b/plugins/by-name/blink-cmp/default.nix @@ -56,5 +56,8 @@ lib.nixvim.plugins.mkNeovimPlugin { -- Capabilities configuration for blink-cmp capabilities = require("blink-cmp").get_lsp_capabilities(capabilities) ''; + + # blink_cmp_fuzzy lib + performance.combinePlugins.pathsToLink = [ "/target/release" ]; }; } diff --git a/plugins/by-name/blink-pairs/default.nix b/plugins/by-name/blink-pairs/default.nix new file mode 100644 index 00000000..901a0960 --- /dev/null +++ b/plugins/by-name/blink-pairs/default.nix @@ -0,0 +1,31 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "blink-pairs"; + moduleName = "blink.pairs"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + settingsExample = { + mappings.enabled = false; + highlights = { + enabled = true; + cmdline = true; + groups = [ + "rainbow1" + "rainbow2" + "rainbow3" + "rainbow4" + "rainbow5" + "rainbow6" + ]; + unmatched_group = ""; + matchparen = { + enabled = true; + cmdline = false; + include_surrounding = false; + group = "BlinkPairsMatchParen"; + priority = 250; + }; + }; + }; +} diff --git a/plugins/by-name/chadtree/default.nix b/plugins/by-name/chadtree/default.nix index d7ad0e74..f0c6646b 100644 --- a/plugins/by-name/chadtree/default.nix +++ b/plugins/by-name/chadtree/default.nix @@ -17,6 +17,11 @@ lib.nixvim.plugins.mkNeovimPlugin { plugins.chadtree.luaConfig.content = '' vim.api.nvim_set_var("chadtree_settings", ${lib.nixvim.toLuaObject cfg.settings}) ''; + + # Use XDG specifications for storing the CHADTree runtime and session files. + # If set to false, will store everything under repo location. + # Fixes https://github.com/nix-community/nixvim/issues/4154 + plugins.chadtree.settings.xdg = lib.mkDefault true; }; settingsExample = { diff --git a/plugins/by-name/vscode-diff/default.nix b/plugins/by-name/codediff/default.nix similarity index 95% rename from plugins/by-name/vscode-diff/default.nix rename to plugins/by-name/codediff/default.nix index 63a57db1..62c11a9a 100644 --- a/plugins/by-name/vscode-diff/default.nix +++ b/plugins/by-name/codediff/default.nix @@ -1,6 +1,6 @@ { lib, ... }: lib.nixvim.plugins.mkNeovimPlugin { - name = "vscode-diff"; + name = "codediff"; package = "codediff-nvim"; maintainers = [ lib.maintainers.GaetanLepage ]; diff --git a/plugins/by-name/model/default.nix b/plugins/by-name/model/default.nix new file mode 100644 index 00000000..b8878042 --- /dev/null +++ b/plugins/by-name/model/default.nix @@ -0,0 +1,30 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "model"; + package = "model-nvim"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + settingsExample = { + prompts = { + zephyr = { + provider.__raw = "require('model.providers.llamacpp')"; + options.url = "http:localhost:8080"; + + builder.__raw = '' + function(input, context) + return { + prompt = + '<|system|>' + .. (context.args or 'You are a helpful assistant') + .. '\n\n<|user|>\n' + .. input + .. '\n<|assistant|>', + stop = { '' } + } + end + ''; + }; + }; + }; +} diff --git a/plugins/by-name/project-nvim/default.nix b/plugins/by-name/project-nvim/default.nix index f8b82ece..56e0446c 100644 --- a/plugins/by-name/project-nvim/default.nix +++ b/plugins/by-name/project-nvim/default.nix @@ -3,9 +3,6 @@ config, ... }: -let - inherit (lib.nixvim) defaultNullOpts; -in lib.nixvim.plugins.mkNeovimPlugin { name = "project-nvim"; moduleName = "project"; @@ -13,72 +10,14 @@ lib.nixvim.plugins.mkNeovimPlugin { maintainers = [ lib.maintainers.khaneliman ]; - settingsOptions = { - manual_mode = defaultNullOpts.mkBool false '' - Manual mode doesn't automatically change your root directory, so you have the option to - manually do so using `:ProjectRoot` command. - ''; - - detection_methods = - defaultNullOpts.mkListOf lib.types.str - [ - "lsp" - "pattern" - ] - '' - Methods of detecting the root directory. - **"lsp"** uses the native neovim lsp, while **"pattern"** uses vim-rooter like glob pattern - matching. - Here order matters: if one is not detected, the other is used as fallback. - You can also delete or rearangne the detection methods. - ''; - - patterns = - defaultNullOpts.mkListOf lib.types.str - [ - ".git" - "_darcs" - ".hg" - ".bzr" - ".svn" - "Makefile" - "package.json" - ] - '' - All the patterns used to detect root dir, when **"pattern"** is in `detectionMethods`. - ''; - - ignore_lsp = defaultNullOpts.mkListOf lib.types.str [ ] "Table of lsp clients to ignore by name."; - - exclude_dirs = defaultNullOpts.mkListOf lib.types.str [ - ] "Don't calculate root dir on specific directories."; - - show_hidden = defaultNullOpts.mkBool false "Show hidden files in telescope."; - - silent_chdir = defaultNullOpts.mkBool true '' - When set to false, you will get a message when `project.nvim` changes your directory. - ''; - - scope_chdir = - defaultNullOpts.mkEnumFirstDefault - [ - "global" - "tab" - "win" - ] - '' - What scope to change the directory. - ''; - - data_path = defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.fn.stdpath('data')") "Path where project.nvim will store the project history for use in telescope."; - }; - settingsExample = { - detection_methods = [ "lsp" ]; + lsp = { + enabled = true; + ignore = [ "tsserver" ]; + }; patterns = [ ".git" ]; - ignore_lsp = [ "tsserver" ]; - excludeDirs = [ "/home/user/secret-directory" ]; - showHidden = true; + exclude_dirs = [ "/home/user/secret-directory" ]; + show_hidden = true; silent_chdir = false; }; diff --git a/plugins/deprecation.nix b/plugins/deprecation.nix index b23a7fa7..8eef0645 100644 --- a/plugins/deprecation.nix +++ b/plugins/deprecation.nix @@ -43,6 +43,8 @@ let presence-nvim = "presence"; # Added 2025-11-07 ethersync = "teamtype"; + # Added 2026-01-24 + vscode-diff = "codediff"; }; # Added 2024-09-21; remove after 24.11 # `iconsPackage` options were briefly available in the following plugins for ~3 weeks diff --git a/tests/test-sources/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix b/tests/test-sources/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix new file mode 100644 index 00000000..093d2d28 --- /dev/null +++ b/tests/test-sources/plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix @@ -0,0 +1,34 @@ +{ + empty = { + plugins = { + blink-cmp.enable = true; + blink-cmp-nixpkgs-maintainers.enable = true; + }; + }; + + example = { + plugins = { + blink-cmp-nixpkgs-maintainers.enable = true; + blink-cmp = { + enable = true; + + settings.sources = { + per_filetype = { + markdown = [ "nixpkgs_maintainers" ]; + }; + providers = { + nixpkgs_maintainers = { + module = "blink_cmp_nixpkgs_maintainers"; + name = "nixpkgs maintainers"; + opts = { + cache_lifetime = 14; + silent = false; + nixpkgs_flake_uri = "nixpkgs"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/blink-pairs/default.nix b/tests/test-sources/plugins/by-name/blink-pairs/default.nix new file mode 100644 index 00000000..6f3bfac3 --- /dev/null +++ b/tests/test-sources/plugins/by-name/blink-pairs/default.nix @@ -0,0 +1,67 @@ +{ + empty = { + plugins.blink-pairs.enable = true; + }; + + defaults = { + plugins.blink-pairs = { + enable = true; + settings = { + mappings = { + enabled = true; + cmdline = true; + disabled_filetypes = [ ]; + pairs = [ ]; + }; + highlights = { + enabled = true; + cmdline = true; + groups = [ + "BlinkPairsOrange" + "BlinkPairsPurple" + "BlinkPairsBlue" + ]; + unmatched_group = "BlinkPairsUnmatched"; + matchparen = { + enabled = true; + cmdline = false; + include_surrounding = false; + group = "BlinkPairsMatchParen"; + priority = 250; + }; + }; + debug = false; + }; + }; + }; + + example = { + plugins.blink-pairs = { + enable = true; + + settings = { + mappings.enabled = false; + highlights = { + enabled = true; + cmdline = true; + groups = [ + "rainbow1" + "rainbow2" + "rainbow3" + "rainbow4" + "rainbow5" + "rainbow6" + ]; + unmatched_group = ""; + matchparen = { + enabled = true; + cmdline = false; + include_surrounding = false; + group = "BlinkPairsMatchParen"; + priority = 250; + }; + }; + }; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/vscode-diff/default.nix b/tests/test-sources/plugins/by-name/codediff/default.nix similarity index 95% rename from tests/test-sources/plugins/by-name/vscode-diff/default.nix rename to tests/test-sources/plugins/by-name/codediff/default.nix index 46dbf7c4..ca494819 100644 --- a/tests/test-sources/plugins/by-name/vscode-diff/default.nix +++ b/tests/test-sources/plugins/by-name/codediff/default.nix @@ -3,14 +3,14 @@ # TODO: re-enable after next flake lock update (nixpkgs PR #482779) # Plugin tries to download libgomp from GitHub during setup test.runNvim = false; - plugins.vscode-diff.enable = true; + plugins.codediff.enable = true; }; defaults = { # TODO: re-enable after next flake lock update (nixpkgs PR #482779) # Plugin tries to download libgomp from GitHub during setup test.runNvim = false; - plugins.vscode-diff = { + plugins.codediff = { enable = true; settings = { @@ -41,7 +41,7 @@ # TODO: re-enable after next flake lock update (nixpkgs PR #482779) # Plugin tries to download libgomp from GitHub during setup test.runNvim = false; - plugins.vscode-diff = { + plugins.codediff = { enable = true; settings = { diff --git a/tests/test-sources/plugins/by-name/model/default.nix b/tests/test-sources/plugins/by-name/model/default.nix new file mode 100644 index 00000000..1f42e341 --- /dev/null +++ b/tests/test-sources/plugins/by-name/model/default.nix @@ -0,0 +1,46 @@ +{ + empty = { + plugins.model.enable = true; + }; + + example = { + plugins.model = { + enable = true; + + settings = { + prompts = { + zephyr = { + provider.__raw = "require('model.providers.llamacpp')"; + options.url = "http:localhost:8080"; + + builder.__raw = '' + function(input, context) + return { + prompt = + '<|system|>' + .. (context.args or 'You are a helpful assistant') + .. '\n\n<|user|>\n' + .. input + .. '\n<|assistant|>', + stop = { '' } + } + end + ''; + }; + }; + }; + }; + }; + + defaults = { + plugins.model = { + enable = true; + + settings = { + default_prompt.__raw = "require('model.providers.openai').default_prompt"; + prompts.__raw = "require('model.prompts.starters')"; + chats.__raw = "require('model.prompts.chats')"; + }; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/project-nvim/default.nix b/tests/test-sources/plugins/by-name/project-nvim/default.nix index 4d1d75bf..6402cf4a 100644 --- a/tests/test-sources/plugins/by-name/project-nvim/default.nix +++ b/tests/test-sources/plugins/by-name/project-nvim/default.nix @@ -31,10 +31,10 @@ enable = true; settings = { manual_mode = false; - detection_methods = [ - "lsp" - "pattern" - ]; + lsp = { + enabled = true; + ignore.__empty = { }; + }; patterns = [ ".git" "_darcs" @@ -44,7 +44,6 @@ "Makefile" "package.json" ]; - ignore_lsp.__empty = { }; exclude_dirs.__empty = { }; show_hidden = false; silent_chdir = true;