From efa422e91fb8b5d0cda5b00234c7682f24b6bf37 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Mon, 16 Oct 2023 23:42:49 +0800 Subject: Add ruby vim config --- .vim/after/plugin/lsp.vim | 8 ++++++++ .vim/after/plugin/minpac.vim | 1 + .vim/after/plugin/mucomplete.vim | 2 ++ 3 files changed, 11 insertions(+) (limited to '.vim') diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim index 63a9fd2..8a853e7 100644 --- a/.vim/after/plugin/lsp.vim +++ b/.vim/after/plugin/lsp.vim @@ -59,6 +59,14 @@ if executable('godot') \ }) endif +if executable('solargraph') + au User lsp_setup call lsp#register_server({ + \ 'name': 'solargraph', + \ 'cmd': {server_info->['solargraph', 'stdio']}, + \ 'allowlist': ['ruby'], + \ }) +endif + " https://github.com/mickael-menu/zk " if executable('zk') " au User lsp_setup call lsp#register_server({ diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index a6eb545..6165b2b 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -99,6 +99,7 @@ function! InitMinpac() abort call minpac#add('https://github.com/davidhalter/jedi-vim', {'type': 'opt'}) call minpac#add('https://github.com/rust-lang/rust.vim', {'type': 'start'}) call minpac#add('https://github.com/vim-ruby/vim-ruby', {'type': 'start'}) + call minpac#add('https://github.com/tpope/vim-rails', {'type': 'start'}) " misc call minpac#add('https://github.com/freitass/todo.txt-vim.git', {'type': 'opt'}) diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index 99b59c8..b955c14 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -23,4 +23,6 @@ let g:mucomplete#can_complete.cuda = { 'omni': s:cpp_cond } let s:ledger_cond = { t -> t =~# '\%(:\)$' } let g:mucomplete#can_complete.ledger = { 'omni': s:ledger_cond } +let g:mucomplete#can_complete.ruby = { 'omni': s:cpp_cond } + packadd vim-mucomplete -- cgit v1.2.3