From 442802c1470e252f57818bc41b0bf41ef9485907 Mon Sep 17 00:00:00 2001 From: Kent Smith Date: Fri, 18 Nov 2022 09:52:14 -0800 Subject: more fun vim plugins --- .vimrc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index a3db86d..e2c82d7 100644 --- a/.vimrc +++ b/.vimrc @@ -234,7 +234,7 @@ cmap w!! %!sudo tee > /dev/null % " This replicates the idea of closing a tab nmap bq :bp bd # -colorscheme base16-tomorrow-night +colorscheme base16-default-dark " Load all plugins now. " Plugins need to be added to runtimepath before helptags can be generated. @@ -258,7 +258,7 @@ function! s:on_lsp_buffer_enabled() abort nmap ]g (lsp-next-diagnostic) nmap K (lsp-hover) nnoremap lsp#scroll(+4) - nnoremap lsp#scroll(-4) + nnoremap lsp#scroll(-4) let g:lsp_format_sync_timeout = 1000 autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') @@ -271,3 +271,17 @@ augroup lsp_install " call s:on_lsp_buffer_enabled only for languages that has the server registered. autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() augroup END + +if executable('solargraph') + " gem install solargraph + au User lsp_setup call lsp#register_server({ + \ 'name': 'solargraph', + \ 'cmd': {server_info->[&shell, &shellcmdflag, 'solargraph stdio']}, + \ 'initialization_options': {"diagnostics": "true"}, + \ 'whitelist': ['ruby'], + \ }) +endif + +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? asyncomplete#close_popup() : "\" -- cgit v1.2.3