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 tailwind-tools-nvim
typst-preview-nvim typst-preview-nvim
lsp-progress-nvim lsp-progress-nvim
lazydev-nvim
]; ];
}; };

View file

@ -18,13 +18,16 @@ M.setup = function()
version = "LuaJIT", version = "LuaJIT",
}, },
diagnostics = { diagnostics = {
-- Get the language server to recognize the `vim` global globals = { "nixCats" },
globals = { "vim", "nixCats", "MiniBufremove" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
}, },
-- 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 -- Do not send telemetry data containing a randomized but unique identifier
telemetry = { telemetry = {
enable = false, enable = false,

View file

@ -19,11 +19,19 @@ return {
}, },
sources = { sources = {
default = { "lsp", "path", "snippets", "buffer" }, default = { "lsp", "path", "snippets", "buffer" },
per_filetype = {
lua = { "lazydev", "lsp", "path", "snippets", "buffer" },
},
providers = { providers = {
ripgrep = { ripgrep = {
module = "blink-ripgrep", module = "blink-ripgrep",
name = "Ripgrep", name = "Ripgrep",
}, },
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
}, },
}, },
completion = { completion = {

View file

@ -73,6 +73,10 @@ return {
-- handled by statusline -- handled by statusline
lsp_progress = { enable = false }, lsp_progress = { enable = false },
}) })
MiniNotify.make_notify({
ERROR = { duration = 6000 },
})
end, end,
}, },
{ {
@ -264,4 +268,11 @@ return {
end, end,
}, },
{ "blink-ripgrep", lazy = true }, { "blink-ripgrep", lazy = true },
{
"lazydev.nvim",
filetypes = { "lua" },
after = function()
require("lazydev").setup()
end,
},
} }