From 91d973e6b4c3ddd96ed669b407a67dfd22cfce1a Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Sun, 31 Oct 2021 18:33:17 +0200 Subject: [PATCH] fix: move lua enviroment config --- .luarc.json | 5 +++++ README.md | 3 +-- lua/config/lspconfig.lua | 38 +++++++++++++++++++------------------- 3 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 .luarc.json diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..6c8fa37 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.runtime.version": "LuaJIT", + "Lua.diagnostics.globals": ["vim", "packer_plugins"] +} diff --git a/README.md b/README.md index 8c43f64..ffbc5e2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ ## Requirements * ripgrep - for telescope -* [A patched font](https://www.nerdfonts.com/) - for dev icons -* [Sumenko language server](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)) +* [A patched font](https://www.nerdfonts.com/) - for icons diff --git a/lua/config/lspconfig.lua b/lua/config/lspconfig.lua index 761490b..1ee8228 100644 --- a/lua/config/lspconfig.lua +++ b/lua/config/lspconfig.lua @@ -5,25 +5,25 @@ M.flags = { debounce_text_changes = 150 } local general_settings = { } M.server_settings = { - sumneko_lua = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = vim.split(package.path, ';') - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim', 'packer_plugins'} - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true) - }, - telemetry = { enable = false } - } - } + -- sumneko_lua = { + -- Lua = { + -- runtime = { + -- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + -- version = 'LuaJIT', + -- -- Setup your lua path + -- path = vim.split(package.path, ';') + -- }, + -- diagnostics = { + -- -- Get the language server to recognize the `vim` global + -- globals = {'vim', 'packer_plugins'} + -- }, + -- workspace = { + -- -- Make the server aware of Neovim runtime files + -- library = vim.api.nvim_get_runtime_file("", true) + -- }, + -- telemetry = { enable = false } + -- } + -- } } -- Apply general settings for each server