diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 6eaa588..bd14ed0 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -1,28 +1,30 @@ -local lspconfig = require("lspconfig") +return function() + local lspconfig = require("lspconfig") -lspconfig.lua_ls.setup({ - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { "vim", "nixCats", "MiniBufremove" }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, + lspconfig.lua_ls.setup({ + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = "LuaJIT", + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { "vim", "nixCats", "MiniBufremove" }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, }, }, - }, -}) + }) -lspconfig.nixd.setup({}) -lspconfig.marksman.setup({}) -lspconfig.tinymist.setup({}) + lspconfig.nixd.setup({}) + lspconfig.marksman.setup({}) + lspconfig.tinymist.setup({}) +end diff --git a/lua/plugins/lz-spec.lua b/lua/plugins/lz-spec.lua index d2af0b0..99f9cd6 100644 --- a/lua/plugins/lz-spec.lua +++ b/lua/plugins/lz-spec.lua @@ -15,9 +15,7 @@ return { { "nvim-lspconfig", event = "BufEnter", - after = function() - require("lsp") - end, + after = require("lsp"), }, { "which-key.nvim",