Add lua language server for LSP
This commit is contained in:
parent
69e14f0422
commit
6d39ae8ac1
4 changed files with 29 additions and 1 deletions
|
@ -65,7 +65,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
group = group
|
group = group
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "vhdl",
|
pattern = { "lua", "vhdl" },
|
||||||
command = "setlocal shiftwidth=2 tabstop=2 softtabstop=2",
|
command = "setlocal shiftwidth=2 tabstop=2 softtabstop=2",
|
||||||
group = group
|
group = group
|
||||||
})
|
})
|
||||||
|
|
23
roles/neovim/files/lua/lsp/lua.lua
Normal file
23
roles/neovim/files/lua/lsp/lua.lua
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
-- LSP Server for Lua
|
||||||
|
require'lspconfig'.sumneko_lua.setup {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
-- Get the language server to recognize the `vim` global
|
||||||
|
globals = {'vim'},
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- LSP Servers
|
||||||
|
require('lsp.lua')
|
||||||
|
|
||||||
-- NERDTree
|
-- NERDTree
|
||||||
vim.g.NERDTreeIgnore = { '^__pycache__$', '\\.pyc', '\\~$' }
|
vim.g.NERDTreeIgnore = { '^__pycache__$', '\\.pyc', '\\~$' }
|
||||||
vim.keymap.set('n', '<leader>ne', '<cmd>NERDTree<CR>', { remap = true })
|
vim.keymap.set('n', '<leader>ne', '<cmd>NERDTree<CR>', { remap = true })
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
- cmake
|
- cmake
|
||||||
- clang
|
- clang
|
||||||
- npm
|
- npm
|
||||||
|
- lua-language-server
|
||||||
when:
|
when:
|
||||||
ansible_facts['distribution'] == 'Archlinux'
|
ansible_facts['distribution'] == 'Archlinux'
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
- cmake
|
- cmake
|
||||||
- clang
|
- clang
|
||||||
- npm
|
- npm
|
||||||
|
- lua-language-server
|
||||||
when:
|
when:
|
||||||
ansible_facts['distribution'] == 'Debian'
|
ansible_facts['distribution'] == 'Debian'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue