bug: LSP doesn't resolve snacks types #443
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Please don't open issues for user questions. check the lazydev docs if you're using that |
Beta Was this translation helpful? Give feedback.
-
EDIT checkout the other answer for a better way: #443 (comment)
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
vim.fn.stdpath 'data' .. '/lazy', -- I added this line
},
},
}, |
Beta Was this translation helpful? Give feedback.
-
Add the following lines at the top of the file where you intend to use ---@module 'snacks'
---@type snacks.Config
local config = {} If you want to make {
'folke/lazydev.nvim',
ft = 'lua',
cmd = 'LazyDev',
opts = {
library = {
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
{ path = 'snacks.nvim', words = { 'Snacks' } },
},
},
} |
Beta Was this translation helpful? Give feedback.
Add the following lines at the top of the file where you intend to use
snacks
types:If you want to make
snacks
types globally accessible usinglazydev
, refer to LazyVim#lazydevnvim: