diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-12-05 19:24:37 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-12-05 19:24:37 +0100 |
| commit | 4adc57a365aa52ff5d4509fb6b09fc54878d9342 (patch) | |
| tree | d902eeccaee9d0f7397e6f6fe6183f6f2ff96574 /config/nvim/lua | |
| parent | 6bb3fa958f775c9ff5769e2cb00ccaabe664fd99 (diff) | |
| download | dotfiles-4adc57a365aa52ff5d4509fb6b09fc54878d9342.tar.gz dotfiles-4adc57a365aa52ff5d4509fb6b09fc54878d9342.tar.bz2 dotfiles-4adc57a365aa52ff5d4509fb6b09fc54878d9342.zip | |
Added lua lsp
Diffstat (limited to 'config/nvim/lua')
| -rw-r--r-- | config/nvim/lua/plugins.lua | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index dca67fb..72ef03d 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -11,7 +11,7 @@ return require('packer').startup(function() -- nvim lsp configuration use { 'neovim/nvim-lspconfig', - ft = {'rust', 'python', 'c', 'cpp'}, + ft = {'rust', 'python', 'c', 'cpp', 'lua'}, config = function() local on_attach = function(client, bufnr) local opts = { noremap = true, silent = true } @@ -30,6 +30,31 @@ return require('packer').startup(function() lspconfig.pylsp.setup { on_attach = on_attach } -- rust_analyzer lspconfig.rust_analyzer.setup { on_attach = on_attach } + -- package lua-language-server on ArchLinux + lspconfig.sumneko_lua.setup { + on_attach = on_attach , + settings = { + 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'}, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = { + [vim.fn.expand('$VIMRUNTIME/lua')] = true, + [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, + }, + }, + } + }, + } vim.diagnostic.config { signs = false, update_in_insert = false, |
