mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 11:36:07 +01:00
Compare commits
5 commits
660fba984f
...
de1760ddfd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de1760ddfd | ||
|
|
e12be2b231 | ||
|
|
b0fd7f1d6a | ||
|
|
b35e6830e0 | ||
|
|
2c003e9319 |
5 changed files with 33 additions and 9 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue