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 --- herbstluftwm/files/autostart | 4 ++++ vim/files/vimrc | 19 ++++++++++++++++++- zsh/.zprofile | 2 +- zsh/.zshrc | 4 +++- zsh/package.toml | 7 +++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 zsh/package.toml diff --git a/herbstluftwm/files/autostart b/herbstluftwm/files/autostart index fb26a3d..e4c106c 100755 --- a/herbstluftwm/files/autostart +++ b/herbstluftwm/files/autostart @@ -61,6 +61,10 @@ hc keybind $Mod-Control-Down resize down +$resizestep hc keybind $Mod-Control-Up resize up +$resizestep hc keybind $Mod-Control-Right resize right +$resizestep +# mediakeys + +hc keybind XF86AudioPlay spawn playerctl play-pause + # tags tag_names=( eins zwei drei vier ) tag_keys=( {1..9} 0 ) 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 diff --git a/zsh/.zprofile b/zsh/.zprofile index 0d2a4e3..b239aed 100644 --- a/zsh/.zprofile +++ b/zsh/.zprofile @@ -6,6 +6,6 @@ TEXMFCONFIG=~/.config/texlive TEXMFVAR=~/.cache/texlive export EDITOR VIMINIT TASKRC TEXMFHOME TEXMFCONFIG TEXMFVAR -eval "$(perl -I$HOME/.local/perl5/lib/perl5/ -Mlocal::lib=--deactivate-all,$HOME/.local/perl5)" +eval "$(api_ver=$(perl -MConfig -e'print $Config{api_version}') && perl -I$HOME/.local/perl5.${api_ver}/lib/perl5/ -Mlocal::lib=--deactivate-all,$HOME/.local/perl5.${api_ver})" [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx diff --git a/zsh/.zshrc b/zsh/.zshrc index ee48183..f74810d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -34,13 +34,15 @@ zstyle ':completion:*' use-perl on zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path $HOME/.cache/zsh/complcache zstyle ':completion:*:*:kill:*' command 'ps --forest -u$USER -o pid,%cpu,tty,cputime,cmd' -zstyle :compinstall filename "$HOME/.config/zsh/.zshrc" +zstyle :compinstall filename "$HOME/.zshrc" autoload -Uz compinit compinit -d $HOME/.cache/zsh/zcompdump # Misc typeset -U path path+=(~/.local/bin) +path+=(~/.ghcup/bin, ~/.cabal/bin) + REPORTTIME=2 PROMPT=": " RPROMPT="%1~" diff --git a/zsh/package.toml b/zsh/package.toml new file mode 100644 index 0000000..090d08e --- /dev/null +++ b/zsh/package.toml @@ -0,0 +1,7 @@ +[[files]] +source = './.zshrc' +dest = '~/.zshrc' + +[[files]] +source = './.zprofile' +dest = '~/.zprofile' -- cgit v1.2.3-24-g4f1b