summary refs log tree commit diff
path: root/.vim/lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-05-27 12:55:42 +0200
committerRobert Günzler <r@gnzler.io>2022-05-27 13:16:14 +0200
commitdb939639b1b537739aa9e9c593eeae53e62aa6f6 (patch)
treeb2511053c9a6e763a4469dac86d3666a066e4e2c /.vim/lua
parent927b36dfc6c72dc66717f7b5c36f18c79fbcddcd (diff)
vim: update lua lsp settings
Diffstat (limited to '.vim/lua')
-rw-r--r--.vim/lua/lsp.lua39
1 files changed, 33 insertions, 6 deletions
diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua
index efba1b1..215b269 100644
--- a/.vim/lua/lsp.lua
+++ b/.vim/lua/lsp.lua
@@ -165,14 +165,40 @@ local servers = {
       Lua = {
         runtime = {
           version = 'LuaJIT',
-          path = lua_runtime_path,
+          path = vim.split(package.path, ';'),
         },
         diagnostics = {
-          globals = { 'vim' },
+          globals = {
+            '_G',
+            'error',
+            'os',
+            'package',
+            'pairs', 'ipairs',
+            'pcall',
+            'require',
+            'string',
+            'table',
+            'type',
+            'vim',
+          },
+          neededFileStatus = {
+            ['code-style-check'] = 'Any',
+          }
+        },
+        format = {
+          enable =  true,
+          defaultConfig = {
+            indent_style = 'space',
+            indent_size = '2',
+          }
+        },
+        workspace = {
+          -- library = vim.api.nvim_get_runtime_file("", true),
+          library = {
+            [vim.env.VIMRUNTIME .. '/lua'] = true,
+            [vim.env.VIMRUNTIME .. '/lua/vim/lsp'] = true,
+          }
         },
-        -- workspace = {
-        --   library = vim.api.nvim_get_runtime_file('', true)
-        -- },
         telemetry = {
           enable = false,
         },
@@ -196,7 +222,8 @@ local servers = {
       '. /etc/profile.d/nvm.sh && typescript-language-server --stdio'
     },
   },
-  zls = { disabled = true },
+  zls = { disabled = true,
+  },
   zk = { disabled = true,
     root_dir = lsp.util.root_pattern('.zk'),
   },