packadd yegappan-lsp " Go language server call LspAddServer([#{ \ name: 'golang', \ filetype: ['go', 'gomod'], \ omnicompl: v:true, \ path: exepath('gopls'), \ args: ['serve'], \ syncInit: v:true \ }]) call LspAddServer([#{ \ name: 'ruby', \ filetype: ['ruby'], \ omnicompl: v:true, \ path: exepath('solargraph'), \ args: ['stdio'], \ syncInit: v:true \ }]) call LspOptionsSet(#{ \ aleSupport: v:true, \ autoComplete: v:false, \ omniComplete: v:true, \ completionMatcher: "fuzzy", \ }) function! s:on_lsp_attached() abort setlocal keywordprg=:LspHover " setlocal formatexpr=lsp#lsp#FormatExpr() nnoremap gd LspGotoDefinition nnoremap gd topleft LspGotoDefinition nnoremap rn :LspRename nnoremap gr :LspShowReferences autocmd! BufWritePre *.rs,*.go call execute('LspFormat') autocmd! BufRead *.go,*.rs setlocal tagfunc=lsp#lsp#TagFunc endfunction augroup lsp_attached au! autocmd User LspAttached call s:on_lsp_attached() augroup END