1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 11:36:07 +01:00

Compare commits

...

5 commits

Author SHA1 Message Date
saygo-png
de1760ddfd plugins/lazygit: fix type in setting declaration
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-03 22:03:08 +00:00
saygo-png
e12be2b231 plugins/dressing: fix type in setting declaration
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-03 22:03:08 +00:00
saygo-png
b0fd7f1d6a plugins/inc-rename: fix type in settings declaration
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-03 22:03:08 +00:00
saygo-png
b35e6830e0 plugins/lsp/tinymist: fix type in settings declaration
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-03 22:03:08 +00:00
saygo-png
2c003e9319 plugins/notebook-navigator: fix warning condition
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-03 22:03:08 +00:00
5 changed files with 33 additions and 9 deletions

View file

@ -12,7 +12,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
settingsOptions =
let
intOrRatio = with types; either ints.unsigned (numbers.between 0.0 1.0);
intOrRatio =
with types;
oneOf [
ints.unsigned
(numbers.between 0.0 1.0)
rawLua
];
in
{
input = {

View file

@ -46,9 +46,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
the behavior of command preview).
'';
input_buffer_type = defaultNullOpts.mkNullable (types.enum [ "dressing" ]) null ''
The type of the external input buffer to use.
'';
input_buffer_type =
defaultNullOpts.mkNullable (with types; either (enum [ "dressing" ]) rawLua) null
''
The type of the external input buffer to use.
'';
post_hook = defaultNullOpts.mkRaw null ''
Callback to run after renaming, receives the result table (from LSP

View file

@ -63,8 +63,14 @@ lib.nixvim.plugins.mkVimPlugin {
Config file path is evaluated if this value is `1`.
'';
config_file_path = defaultNullOpts.mkNullable (with types; either str (listOf str)) [
] "Custom config file path or list of custom config file paths.";
config_file_path = defaultNullOpts.mkNullable (
with types;
oneOf [
str
(listOf str)
rawLua
]
) [ ] "Custom config file path or list of custom config file paths.";
};
settingsExample = {

View file

@ -105,7 +105,17 @@ lib.nixvim.plugins.mkNeovimPlugin {
extraConfig = cfg: {
warnings = lib.nixvim.mkWarnings "plugins.notebook-navigator" [
{
when = (cfg.settings.activate_hydra_keys != null) && (!config.plugins.hydra.enable);
when =
(
!(
cfg ? settings.activate_hydra_keys
&& builtins.elem cfg.settings.activate_hydra_keys [
null
(lib.nixvim.mkRaw "nil")
]
)
)
&& (!config.plugins.hydra.enable);
message = ''
`settings.activate_hydra_keys` has been set to a non-`null` value but `plugins.hydra.enable` is `false`.
'';

View file

@ -2,7 +2,7 @@
# https://github.com/Myriad-Dreamin/tinymist/blob/main/editors/neovim/Configuration.md
let
inherit (lib.nixvim) defaultNullOpts mkNullOrOption mkNullOrStr;
inherit (lib.nixvim) defaultNullOpts mkNullOrStr;
inherit (lib) types;
in
{
@ -104,7 +104,7 @@ in
'';
completion = {
triggerOnSnippetPlaceholders = mkNullOrOption types.bool ''
triggerOnSnippetPlaceholders = defaultNullOpts.mkBool false ''
Whether to trigger completions on arguments (placeholders) of snippets.
For example, `box` will be completed to `box(|)`, and server will request the editor (lsp