feat(nvim): add lazydev

This commit is contained in:
Moritz Böhme 2025-07-31 16:19:36 +02:00
parent 461ac51552
commit f0ac85d6fa
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
2 changed files with 30 additions and 11 deletions

View file

@ -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;

View file

@ -0,0 +1,3 @@
_: {
home-manager.users.moritz.programs.nixvim.plugins.lazydev.enable = true;
}