From 3263b7383fdd14b6ce08860204ec022df0ddd5a0 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 2 Jun 2025 15:42:42 +0545 Subject: [PATCH] featur(lsp): add lua_ls configuration for Lua language server --- lsp/lua_ls.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lsp/lua_ls.lua diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua new file mode 100644 index 0000000..1db6fe0 --- /dev/null +++ b/lsp/lua_ls.lua @@ -0,0 +1,34 @@ +return { + cmd = { 'lua-language-server' }, + filetypes = { 'lua' }, + root_markers = { '.luarc.json', '.luarc.jsonc' }, + settings = { + Lua = { + diagnostics = { globals = { 'vim' } }, + telemetry = { enable = false }, + format = { + enable = true, + defaultConfig = { + align_continuous_assign_statement = false, + align_continuous_rect_table_field = false, + align_array_table = false, + }, + }, + runtime = { + version = 'LuaJIT', + path = { + 'lua/?.lua', + 'lua/?/init.lua', + }, + }, + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + -- vim.api.nvim_get_runtime_file('', true), + -- '${3rd}/busted/library' + }, + }, + }, + }, +}