Add latex lsp config with texlab
This commit is contained in:
parent
d873db6299
commit
1783cb9d9f
3 changed files with 21 additions and 3 deletions
15
roles/neovim/files/lua/lsp/latex.lua
Normal file
15
roles/neovim/files/lua/lsp/latex.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- LSP Server for LaTeX
|
||||
require'lspconfig'.texlab.setup {
|
||||
on_attach = function()
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = 0, remap = false })
|
||||
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, { buffer = 0, remap = false })
|
||||
end,
|
||||
settings = {
|
||||
texlab = {
|
||||
chktex = {
|
||||
onEdit = true,
|
||||
onOpenAndSave = true
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
-- LSP Servers
|
||||
require('lsp.lua')
|
||||
require('lsp.bash')
|
||||
require('lsp.latex')
|
||||
require('lsp.lua')
|
||||
|
||||
-- Treesitter
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
- cmake
|
||||
- clang
|
||||
- npm
|
||||
- lua-language-server
|
||||
- bash-language-server
|
||||
- lua-language-server
|
||||
- texlab
|
||||
when:
|
||||
ansible_facts['distribution'] == 'Archlinux'
|
||||
|
||||
|
@ -38,8 +39,9 @@
|
|||
- cmake
|
||||
- clang
|
||||
- npm
|
||||
- lua-language-server
|
||||
- bash-language-server
|
||||
- lua-language-server
|
||||
- texlab
|
||||
when:
|
||||
ansible_facts['distribution'] == 'Debian'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue