" Enable diagnostics highlighting let lspOpts = #{autoHighlightDiags: v:true} autocmd User LspSetup call LspOptionsSet(lspOpts) let lspServers = [ \ #{ \ name: 'rust-analyzer', \ filetype: ['rust'], \ path: 'rust-analyzer', \ args: [] \ } \ ] autocmd User LspSetup call LspAddServer(lspServers) " Key mappings nnoremap gd :LspGotoDefinition nnoremap gr :LspShowReferences nnoremap K :LspHover nnoremap gl :LspDiag current nnoremap nd :LspDiag next \| LspDiag current nnoremap pd :LspDiag prev \| LspDiag current inoremap " Set omnifunc for completion autocmd FileType php setlocal omnifunc=lsp#complete " Custom diagnostic sign characters autocmd User LspSetup call LspOptionsSet(#{ \ diagSignErrorText: '✘', \ diagSignWarningText: '▲', \ diagSignInfoText: '»', \ diagSignHintText: '⚑', \ })