mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 18:02:13 +02:00
added neodev in order to increase the diagnostics availables for
neovim's lua functions & methods
This commit is contained in:
@@ -4,6 +4,7 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
"folke/neodev.nvim"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
@@ -120,27 +121,29 @@ return {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Needed in order to get more completion in Lua files for Vim/Neovim
|
||||||
|
require("neodev").setup()
|
||||||
|
|
||||||
local languageServers = {
|
local languageServers = {
|
||||||
lua_ls = {},
|
"lua_ls",
|
||||||
tsserver = {},
|
"tsserver",
|
||||||
volar = {},
|
"volar",
|
||||||
cssls = {},
|
"cssls",
|
||||||
cssmodules_ls = {},
|
"cssmodules_ls",
|
||||||
prismals = {},
|
"prismals",
|
||||||
yamlls = {},
|
"yamlls",
|
||||||
marksman = {},
|
"marksman",
|
||||||
eslint = {},
|
"eslint",
|
||||||
dockerls = {},
|
"dockerls",
|
||||||
rust_analyzer = {},
|
"rust_analyzer",
|
||||||
intelephense = {},
|
"intelephense",
|
||||||
elmls = {}
|
"elmls",
|
||||||
}
|
}
|
||||||
|
|
||||||
for languageServer, languageServerSettings in pairs(languageServers) do
|
for _, languageServerName in pairs(languageServers) do
|
||||||
lspconfig[languageServer].setup({
|
lspconfig[languageServerName].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach
|
||||||
settings = languageServerSettings
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user