dotfiles/vim/.vim/plugin/lsp.vim
2026-03-29 00:03:55 +01:00

22 lines
681 B
VimL

let g:polyglot_disabled = ['tpp']
if executable('clangd')
au User lsp_setup call lsp#register_server({
\ 'name': 'clangd',
\ 'cmd': ['clangd'],
\ 'allowlist': ['c', 'cpp', 'objc', 'objcpp'],
\ })
endif
let g:lsp_async_completion = 1
let g:asyncomplete_auto_popup = 1
let g:asyncomplete_auto_completeopt = "menu"
inoremap <expr> <Tab> pumvisible() ? "<C-y>" : "\<Tab>"
let g:lsp_diagnostics_virtual_text_align = 'after'
let g:lsp_diagnostics_virtual_text_prefix = "• "
let g:lsp_diagnostics_float_cursor = 0
let g:lsp_document_code_action_signs_enabled = 0
nnoremap gd :LspDefinition<CR>
nnoremap gr :LspRename<CR>
nnoremap gh :LspHover<CR>