feat: add lazydev

This commit is contained in:
Youwen Wu 2024-12-28 22:04:12 -08:00
parent 913e837b4e
commit 9129762127
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 29 additions and 6 deletions

View file

@ -174,6 +174,7 @@
tailwind-tools-nvim
typst-preview-nvim
lsp-progress-nvim
lazydev-nvim
];
};

View file

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

View file

@ -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 = {

View file

@ -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,
},
}