feat: use lua-dev instead of custom sumneko config

This commit is contained in:
Michael Mandl 2022-04-25 20:50:42 +02:00
parent 5f032adc7a
commit 2a4c3cc85b
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
2 changed files with 5 additions and 17 deletions

View file

@ -119,6 +119,9 @@ return require('packer').startup(function(use)
-- highlight current symbol -- highlight current symbol
"RRethy/vim-illuminate", "RRethy/vim-illuminate",
-- lua plugin development
"folke/lua-dev.nvim",
}, },
config = function() require('plugins.nvim-lsp-setup') end, config = function() require('plugins.nvim-lsp-setup') end,
} }

View file

@ -1,9 +1,3 @@
local utils = require("nvim-lsp-setup.utils")
local nvim_runtime_path = vim.split(package.path, ";")
table.insert(nvim_runtime_path, "lua/?.lua")
table.insert(nvim_runtime_path, "lua/?/init.lua")
require("nvim-lsp-setup").setup({ require("nvim-lsp-setup").setup({
default_mappings = false, default_mappings = false,
mappings = { mappings = {
@ -23,7 +17,7 @@ require("nvim-lsp-setup").setup({
["<C-n>"] = "lua vim.diagnostic.goto_next()", ["<C-n>"] = "lua vim.diagnostic.goto_next()",
}, },
on_attach = function(client) on_attach = function(client)
utils.format_on_save(client) require("nvim-lsp-setup.utils").format_on_save(client)
require("illuminate").on_attach(client) require("illuminate").on_attach(client)
end, end,
servers = { servers = {
@ -48,16 +42,7 @@ require("nvim-lsp-setup").setup({
}, },
}, },
}), }),
sumneko_lua = { sumneko_lua = require('lua-dev').setup({}),
settings = {
Lua = {
runtime = { version = "LuaJIT", path = nvim_runtime_path },
diagnostics = { globals = { "vim" } },
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
telemetry = { enable = false }
}
}
},
terraformls = {}, terraformls = {},
volar = {}, volar = {},
}, },