Compare commits
9 commits
34a7d94cdc
...
31c3b3687d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31c3b3687d | ||
|
|
9fd62cece2 | ||
|
|
08672dfdbf | ||
|
|
3c27e1b35c | ||
|
|
7addac6d11 | ||
|
|
c19a0517dd | ||
|
|
ff90549078 | ||
|
|
f5525b2c35 | ||
|
|
acb045161f |
14 changed files with 285 additions and 81 deletions
|
|
@ -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"
|
||||
|
|
|
|||
47
plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix
Normal file
47
plugins/by-name/blink-cmp-nixpkgs-maintainers/default.nix
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
31
plugins/by-name/blink-pairs/default.nix
Normal file
31
plugins/by-name/blink-pairs/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "vscode-diff";
|
||||
name = "codediff";
|
||||
package = "codediff-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
30
plugins/by-name/model/default.nix
Normal file
30
plugins/by-name/model/default.nix
Normal file
|
|
@ -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</s>\n<|user|>\n'
|
||||
.. input
|
||||
.. '</s>\n<|assistant|>',
|
||||
stop = { '</s>' }
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
67
tests/test-sources/plugins/by-name/blink-pairs/default.nix
Normal file
67
tests/test-sources/plugins/by-name/blink-pairs/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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 = {
|
||||
46
tests/test-sources/plugins/by-name/model/default.nix
Normal file
46
tests/test-sources/plugins/by-name/model/default.nix
Normal file
|
|
@ -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</s>\n<|user|>\n'
|
||||
.. input
|
||||
.. '</s>\n<|assistant|>',
|
||||
stop = { '</s>' }
|
||||
}
|
||||
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')";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue