diff --git a/flake.nix b/flake.nix index 2909765..a937846 100644 --- a/flake.nix +++ b/flake.nix @@ -174,6 +174,7 @@ tailwind-tools-nvim typst-preview-nvim lsp-progress-nvim + lazydev-nvim ]; }; diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 6d51ff8..1cb763c 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -18,13 +18,16 @@ M.setup = function() version = "LuaJIT", }, diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { "vim", "nixCats", "MiniBufremove" }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), + globals = { "nixCats" }, }, + -- unfortunately we won't get nixCats autocomplete with this option + -- off, but lazydev will be much faster + -- + -- workspace = { + -- -- Make the server aware of Neovim runtime files + -- library = vim.api.nvim_get_runtime_file("", true), + -- -- library = + -- }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { enable = false, diff --git a/lua/plugins/blink-cmp.lua b/lua/plugins/blink-cmp.lua index 350f4cc..64fe34b 100644 --- a/lua/plugins/blink-cmp.lua +++ b/lua/plugins/blink-cmp.lua @@ -19,11 +19,19 @@ return { }, sources = { default = { "lsp", "path", "snippets", "buffer" }, + per_filetype = { + lua = { "lazydev", "lsp", "path", "snippets", "buffer" }, + }, providers = { ripgrep = { module = "blink-ripgrep", name = "Ripgrep", }, + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + score_offset = 100, + }, }, }, completion = { diff --git a/lua/plugins/lz-spec.lua b/lua/plugins/lz-spec.lua index 24b6b0d..73d8a2b 100644 --- a/lua/plugins/lz-spec.lua +++ b/lua/plugins/lz-spec.lua @@ -73,6 +73,10 @@ return { -- handled by statusline lsp_progress = { enable = false }, }) + + MiniNotify.make_notify({ + ERROR = { duration = 6000 }, + }) end, }, { @@ -264,4 +268,11 @@ return { end, }, { "blink-ripgrep", lazy = true }, + { + "lazydev.nvim", + filetypes = { "lua" }, + after = function() + require("lazydev").setup() + end, + }, }