From 79ce028bd7833e42a06455b3ac05a6b85db2cb6d Mon Sep 17 00:00:00 2001 From: yushyin Date: Mon, 14 Dec 2020 03:12:41 +0100 Subject: Vim: Add texlab lsp server for LaTeX --- vim/files/vimrc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'vim') diff --git a/vim/files/vimrc b/vim/files/vimrc index 07dd19a..888fd17 100644 --- a/vim/files/vimrc +++ b/vim/files/vimrc @@ -53,7 +53,7 @@ if dein#tap('denite.nvim') nnoremap [Denite] nmap d [Denite] - nnoremap [Denite]g :Denite grep -auto-preview -split=no -no-empty + nnoremap [Denite]g :Denite grep -auto-action=preview -split=no -no-empty nnoremap [Denite]f :Denite file/rec -start-filter -split=no nnoremap [Denite]l :Denite buffer file/old -split=no nnoremap [Denite]r :Denite -resume -refresh @@ -61,6 +61,15 @@ if dein#tap('denite.nvim') nnoremap [Denite]gf :DeniteCursorWord file/rec nnoremap [Denite]gg :DeniteCursorWord grep nnoremap [Denite]g/ :DeniteCursorWord line + + function! s:denite_my_settings() abort + nnoremap denite#do_map('do_action') + nnoremap p denite#do_map('do_action', 'preview') + nnoremap q denite#do_map('quit') + nnoremap i denite#do_map('open_filter_buffer') + nnoremap denite#do_map('toggle_select').'j' + endfunction + autocmd FileType denite call s:denite_my_settings() endif if dein#tap('vimfiler.vim') call s:hook_source() @@ -127,6 +136,14 @@ if dein#tap('vim-lsp') \ 'whitelist': ['haskell'], \ }) endif + if executable('texlab') + au User lsp_setup call lsp#register_server({ + \ 'name': 'texlab', + \ 'cmd': {server_info->['texlab']}, + \ 'whitelist': ['tex', 'plaintex'], + \ }) + + endif function! s:on_lsp_buffer_enabled() abort setl omnifunc=lsp#complete -- cgit v1.2.3-24-g4f1b