diff options
author | yushyin <yushyin@saga> | 2020-12-14 03:12:41 +0100 |
---|---|---|
committer | yushyin <yushyin@saga> | 2020-12-14 03:12:41 +0100 |
commit | 79ce028bd7833e42a06455b3ac05a6b85db2cb6d (patch) | |
tree | b314fe4a26f381a988a3246b36a193f9c480085b /vim | |
parent | fdc82c50f86baff1c1fec2311aec6c81f49b1404 (diff) | |
download | dotfiles-igor-79ce028bd7833e42a06455b3ac05a6b85db2cb6d.tar.gz dotfiles-igor-79ce028bd7833e42a06455b3ac05a6b85db2cb6d.tar.xz |
Vim: Add texlab lsp server for LaTeX
Diffstat (limited to 'vim')
-rw-r--r-- | vim/files/vimrc | 19 |
1 files changed, 18 insertions, 1 deletions
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] <Nop> nmap <leader>d [Denite] - nnoremap [Denite]g :<C-u>Denite grep -auto-preview -split=no -no-empty<CR> + nnoremap [Denite]g :<C-u>Denite grep -auto-action=preview -split=no -no-empty<CR> nnoremap [Denite]f :<C-u>Denite file/rec -start-filter -split=no<CR> nnoremap [Denite]l :<C-u>Denite buffer file/old -split=no<CR> nnoremap [Denite]r :<C-u>Denite -resume -refresh<CR> @@ -61,6 +61,15 @@ if dein#tap('denite.nvim') nnoremap [Denite]gf :DeniteCursorWord file/rec<CR> nnoremap [Denite]gg :DeniteCursorWord grep<Cr> nnoremap [Denite]g/ :DeniteCursorWord line<Cr> + + function! s:denite_my_settings() abort + nnoremap <silent><buffer><expr> <CR> denite#do_map('do_action') + nnoremap <silent><buffer><expr> p denite#do_map('do_action', 'preview') + nnoremap <silent><buffer><expr> q denite#do_map('quit') + nnoremap <silent><buffer><expr> i denite#do_map('open_filter_buffer') + nnoremap <silent><buffer><expr> <Space> 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 |