diff options
author | Kent Smith <kent.smith@andros.co> | 2022-11-18 09:52:14 -0800 |
---|---|---|
committer | Kent Smith <kent.smith@andros.co> | 2022-11-18 09:52:14 -0800 |
commit | 442802c1470e252f57818bc41b0bf41ef9485907 (patch) | |
tree | 27d4bdb8f56c8ed10bc110756e2a696fc6e3e575 | |
parent | fc004cdf8bb0a2af4cf265f7b44ee87d0086c9d0 (diff) | |
download | cfg-442802c1470e252f57818bc41b0bf41ef9485907.tar.gz cfg-442802c1470e252f57818bc41b0bf41ef9485907.tar.bz2 |
more fun vim plugins
-rw-r--r-- | .gitmodules | 18 | ||||
m--------- | .vim/pack/git-plugins/start/ale | 0 | ||||
m--------- | .vim/pack/git-plugins/start/dadbod | 0 | ||||
m--------- | .vim/pack/git-plugins/start/fugitive | 0 | ||||
m--------- | .vim/pack/git-plugins/start/vim-dotenv | 0 | ||||
m--------- | .vim/pack/git-plugins/start/vim-lsp-ale | 0 | ||||
m--------- | .vim/pack/git-plugins/start/vim-rhubarb | 0 | ||||
-rw-r--r-- | .vimrc | 18 |
8 files changed, 34 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules index 904ff1a..c853939 100644 --- a/.gitmodules +++ b/.gitmodules @@ -73,3 +73,21 @@ [submodule ".vim/pack/git-plugins/start/asyncomplete-lsp.vim"] path = .vim/pack/git-plugins/start/asyncomplete-lsp.vim url = https://github.com/prabirshrestha/asyncomplete-lsp.vim +[submodule ".vim/pack/git-plugins/start/fugitive"] + path = .vim/pack/git-plugins/start/fugitive + url = https://tpope.io/vim/fugitive.git +[submodule ".vim/pack/git-plugins/start/vim-rhubarb"] + path = .vim/pack/git-plugins/start/vim-rhubarb + url = https://github.com/tpope/vim-rhubarb.git +[submodule ".vim/pack/git-plugins/start/ale"] + path = .vim/pack/git-plugins/start/ale + url = https://github.com/dense-analysis/ale.git +[submodule ".vim/pack/git-plugins/start/vim-lsp-ale"] + path = .vim/pack/git-plugins/start/vim-lsp-ale + url = https://github.com/rhysd/vim-lsp-ale +[submodule ".vim/pack/git-plugins/start/dadbod"] + path = .vim/pack/git-plugins/start/dadbod + url = https://tpope.io/vim/dadbod.git +[submodule ".vim/pack/git-plugins/start/vim-dotenv"] + path = .vim/pack/git-plugins/start/vim-dotenv + url = https://github.com/tpope/vim-dotenv diff --git a/.vim/pack/git-plugins/start/ale b/.vim/pack/git-plugins/start/ale new file mode 160000 +Subproject f085227504076dff5224cbf10cb1bf83286188a diff --git a/.vim/pack/git-plugins/start/dadbod b/.vim/pack/git-plugins/start/dadbod new file mode 160000 +Subproject 87785156a7919f51409f3e6656ea2b3a9e0e8e9 diff --git a/.vim/pack/git-plugins/start/fugitive b/.vim/pack/git-plugins/start/fugitive new file mode 160000 +Subproject dd8107cabf5fe85df94d5eedcae52415e543f20 diff --git a/.vim/pack/git-plugins/start/vim-dotenv b/.vim/pack/git-plugins/start/vim-dotenv new file mode 160000 +Subproject 5c51cfcf8d87280d6414e03cd6b253eb70ecb80 diff --git a/.vim/pack/git-plugins/start/vim-lsp-ale b/.vim/pack/git-plugins/start/vim-lsp-ale new file mode 160000 +Subproject db0f9a8a33c0480988dc420cd2fba8a07743e4a diff --git a/.vim/pack/git-plugins/start/vim-rhubarb b/.vim/pack/git-plugins/start/vim-rhubarb new file mode 160000 +Subproject cad60fe382f3f501bbb28e113dfe8c0de6e77c7 @@ -234,7 +234,7 @@ cmap w!! %!sudo tee > /dev/null % " This replicates the idea of closing a tab nmap <leader>bq :bp <BAR> bd #<CR> -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 <buffer> ]g <plug>(lsp-next-diagnostic) nmap <buffer> K <plug>(lsp-hover) nnoremap <buffer> <expr><c-f> lsp#scroll(+4) - nnoremap <buffer> <expr><c-d> lsp#scroll(-4) + nnoremap <buffer> <expr><c-s> 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 <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" +inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" +inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>" |