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 LspOptionsSet(#{ \ aleSupport: v:true, \ autoComplete: v:false, \ omniComplete: v:true, \ completionMatcher: "fuzzy", \ }) function! s:on_lsp_attached() abort setlocal tagfunc=lsp#lsp#TagFunc setlocal keywordprg=:LspHover " setlocal formatexpr=lsp#lsp#FormatExpr() nnoremap rn :LspRename nnoremap gr :LspShowReferences autocmd! BufWritePre *.rs,*.go call execute('LspFormat') endfunction augroup lsp_attached au! autocmd User LspAttached call s:on_lsp_attached() augroup END