Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugins/by-name/dressing/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
8 changes: 5 additions & 3 deletions plugins/by-name/inc-rename/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions plugins/by-name/lazygit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
12 changes: 11 additions & 1 deletion plugins/by-name/notebook-navigator/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
'';
Expand Down
4 changes: 2 additions & 2 deletions plugins/lsp/language-servers/tinymist-settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down