install lua-dev plugin

This commit is contained in:
2022-04-01 21:12:43 +03:00
parent ec2cbc59b0
commit e2e97320a0
2 changed files with 8 additions and 20 deletions

View File

@@ -23,6 +23,7 @@ require("packer").startup(function(use)
use({ "nvim-lua/popup.nvim" }) use({ "nvim-lua/popup.nvim" })
use({ "nvim-lua/plenary.nvim" }) use({ "nvim-lua/plenary.nvim" })
use({ "folke/lua-dev.nvim" })
-- Colorschemes go here -- Colorschemes go here
use({ "folke/tokyonight.nvim" }) use({ "folke/tokyonight.nvim" })

View File

@@ -60,27 +60,14 @@ lsp_installer.on_server_ready(function(server)
} }
if server.name == "sumneko_lua" then if server.name == "sumneko_lua" then
local runtime_path = vim.split(package.path, ";") local luadev = require("lua-dev").setup({
table.insert(runtime_path, "lua/?.lua") lspconfig = {
table.insert(runtime_path, "lua/?/init/lua") capabilities = capabilities,
on_attach = on_attach,
opts.settings = {
Lua = {
runtime = {
version = "LuaJIT",
path = runtime_path,
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
}, },
} })
opts = luadev
end end
if server.name == "jsonls" then if server.name == "jsonls" then