summaryrefslogtreecommitdiff
path: root/after/lsp
diff options
context:
space:
mode:
authorBrahmajit Das <listout@listout.xyz>2025-06-04 04:00:08 +0530
committerBrahmajit Das <listout@listout.xyz>2025-06-04 04:00:08 +0530
commitdb3f564f83954337c2f7c37061a03757d4270490 (patch)
treefb409cc3931a21496ce3d2036118a0f1bff6687a /after/lsp
parentde88a28977d28ce83d4cfb636bffbd3bcfc35a21 (diff)
after: lsp: lua_ls: lua lsp settings and lsp configuration as suggested upstream for v0.11.0+
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Diffstat (limited to 'after/lsp')
-rw-r--r--after/lsp/lua_ls.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/after/lsp/lua_ls.lua b/after/lsp/lua_ls.lua
new file mode 100644
index 0000000..104ffbb
--- /dev/null
+++ b/after/lsp/lua_ls.lua
@@ -0,0 +1,22 @@
+return {
+ -- Command and arguments to start the server.
+ cmd = { 'lua-language-server' },
+ -- Filetypes to automatically attach to.
+ filetypes = { 'lua' },
+ -- Sets the "root directory" to the parent directory of the file in the
+ -- current buffer that contains either a ".luarc.json" or a
+ -- ".luarc.jsonc" file. Files that share a root directory will reuse
+ -- the connection to the same LSP server.
+ -- Nested lists indicate equal priority, see |vim.lsp.Config|.
+ root_markers = { { '.luarc.json', '.luarc.jsonc' }, '.git' },
+ -- Specific settings to send to the server. The schema for this is
+ -- defined by the server. For example the schema for lua-language-server
+ -- can be found here https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
+ settings = {
+ Lua = {
+ runtime = {
+ version = 'LuaJIT',
+ }
+ }
+ }
+}