refactor: return function from lspconfig
This commit is contained in:
parent
43bb2bcc49
commit
e4ba4be689
2 changed files with 27 additions and 27 deletions
|
@ -1,28 +1,30 @@
|
||||||
local lspconfig = require("lspconfig")
|
return function()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
version = "LuaJIT",
|
version = "LuaJIT",
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global
|
||||||
globals = { "vim", "nixCats", "MiniBufremove" },
|
globals = { "vim", "nixCats", "MiniBufremove" },
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
-- Make the server aware of Neovim runtime files
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
},
|
},
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
})
|
|
||||||
|
|
||||||
lspconfig.nixd.setup({})
|
lspconfig.nixd.setup({})
|
||||||
lspconfig.marksman.setup({})
|
lspconfig.marksman.setup({})
|
||||||
lspconfig.tinymist.setup({})
|
lspconfig.tinymist.setup({})
|
||||||
|
end
|
||||||
|
|
|
@ -15,9 +15,7 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lspconfig",
|
"nvim-lspconfig",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
after = function()
|
after = require("lsp"),
|
||||||
require("lsp")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"which-key.nvim",
|
"which-key.nvim",
|
||||||
|
|
Loading…
Reference in a new issue