feat(nvim): add lazydev
This commit is contained in:
parent
461ac51552
commit
f0ac85d6fa
2 changed files with 30 additions and 11 deletions
|
|
@ -1,4 +1,10 @@
|
||||||
{...}: {
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
lazydevEnabled = config.home-manager.users.moritz.programs.nixvim.plugins.lazydev.enable;
|
||||||
|
in {
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.blink-compat.enable = true;
|
plugins.blink-compat.enable = true;
|
||||||
plugins.lsp.capabilities =
|
plugins.lsp.capabilities =
|
||||||
|
|
@ -16,16 +22,26 @@
|
||||||
};
|
};
|
||||||
appearance.nerd_font_variant = "mono";
|
appearance.nerd_font_variant = "mono";
|
||||||
sources = {
|
sources = {
|
||||||
default = [
|
default =
|
||||||
"lsp"
|
[
|
||||||
"path"
|
"lsp"
|
||||||
"snippets"
|
"path"
|
||||||
"buffer"
|
"snippets"
|
||||||
"vimtex"
|
"buffer"
|
||||||
];
|
"vimtex"
|
||||||
providers.vimtex = {
|
]
|
||||||
name = "vimtex";
|
++ lib.optional lazydevEnabled "lazydev";
|
||||||
module = "blink.compat.source";
|
providers = {
|
||||||
|
vimtex = {
|
||||||
|
name = "vimtex";
|
||||||
|
module = "blink.compat.source";
|
||||||
|
};
|
||||||
|
lazydev = lib.mkIf lazydevEnabled {
|
||||||
|
name = "LazyDev";
|
||||||
|
module = "lazydev.integrations.blink";
|
||||||
|
# make lazydev completions top priority (see `:h blink.cmp`)
|
||||||
|
score_offset = 100;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
signature.enabled = true;
|
signature.enabled = true;
|
||||||
|
|
|
||||||
3
modules/moritz/programs/nvim/plugins/lazydev.nix
Normal file
3
modules/moritz/programs/nvim/plugins/lazydev.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
home-manager.users.moritz.programs.nixvim.plugins.lazydev.enable = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue