switch from neodev to lazydev
This commit is contained in:
@@ -15,6 +15,17 @@ return {
|
||||
'j-hui/fidget.nvim',
|
||||
'rafamadriz/friendly-snippets',
|
||||
{ 'towolf/vim-helm', ft = 'helm' },
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua', -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
config = function()
|
||||
@@ -107,6 +118,7 @@ return {
|
||||
|
||||
})
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local pythonLineLength = 95
|
||||
lspconfig.pylsp.setup {
|
||||
settings = {
|
||||
@@ -122,37 +134,8 @@ return {
|
||||
}
|
||||
lspconfig.ansiblels.setup {}
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
lspconfig.lua_ls.setup {}
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- '${3rd}/luv/library'
|
||||
-- '${3rd}/busted/library',
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file('', true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
}
|
||||
lspconfig.helm_ls.setup {
|
||||
settings = {
|
||||
['helm-ls'] = {
|
||||
@@ -162,6 +145,11 @@ return {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.yamlls.setup {
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.terraformls.setup {
|
||||
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
return {
|
||||
{ "folke/neodev.nvim", opts = {} }
|
||||
}
|
||||
Reference in New Issue
Block a user