vim lsp settings

master
Jordan Orelli 7 months ago
parent 6c9c8f9204
commit eeebba1ce3

@ -1,4 +1,4 @@
set expandtab
set shiftwidth=2
set tabstop=2
set omnifunc=ale#completion#OmniFunc
" set omnifunc=ale#completion#OmniFunc

70
vimrc

@ -39,6 +39,8 @@ call plug#begin()
Plug 'jparise/vim-graphql'
call plug#end()
packadd lsp
" enable the filetype plugin
filetype plugin indent on
" ---------------------------------------------------------------------------}}}
@ -215,7 +217,6 @@ if has("autocmd")
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType python set omnifunc=ale#completion#OmniFunc
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType rust set omnifunc=ale#completion#OmniFunc
endif
@ -392,7 +393,6 @@ tnoremap <F1> <C-\><C-n>:bnext!<CR>
nnoremap <F2> :term ++curwin<CR>
nnoremap <F3> :belo term<CR>
let g:terminal_ansi_colors = [
\ '#929292',
\ '#e27373',
@ -473,17 +473,65 @@ let g:SuperTabClosePreviewOnPopupClose = 1
" ---------------------------------------------------------------------------}}}
" lsp -----------------------------------------------------------------------{{{
call LspOptionsSet(#{
\ aleSupport: v:false,
\ autoComplete: v:false,
\ autoHighlight: v:false,
\ autoHighlightDiags: v:true,
\ autoPopulateDiags: v:false,
\ completionMatcher: 'case',
\ completionMatcherValue: 1,
\ diagSignErrorText: 'E>',
\ diagSignHintText: 'H>',
\ diagSignInfoText: 'I>',
\ diagSignWarningText: 'W>',
\ echoSignature: v:false,
\ hideDisabledCodeActions: v:false,
\ highlightDiagInline: v:true,
\ hoverInPreview: v:false,
\ ignoreMissingServer: v:false,
\ keepFocusInDiags: v:true,
\ keepFocusInReferences: v:true,
\ completionTextEdit: v:true,
\ diagVirtualTextAlign: 'above',
\ diagVirtualTextWrap: 'default',
\ noNewlineInCompletion: v:false,
\ omniComplete: v:null,
\ outlineOnRight: v:false,
\ outlineWinSize: 20,
\ semanticHighlight: v:true,
\ showDiagInBalloon: v:true,
\ showDiagInPopup: v:true,
\ showDiagOnStatusLine: v:false,
\ showDiagWithSign: v:true,
\ showDiagWithVirtualText: v:false,
\ showInlayHints: v:false,
\ showSignature: v:true,
\ snippetSupport: v:false,
\ ultisnipsSupport: v:false,
\ useBufferCompletion: v:false,
\ usePopupInCodeAction: v:false,
\ useQuickfixForLocations: v:false,
\ vsnipSupport: v:false,
\ bufferCompletionTimeout: 100,
\ customCompletionKinds: v:false,
\ completionKinds: {},
\ filterCompletionDuplicates: v:false,
\ })
" this is not portable at all and I hate it and dunno how to fix it yet
" call LspAddServer([#{name: 'pyright',
" \ filetype: 'python',
" \ path: '/Users/jordan.orelli/.nix-profile/bin/pyright-langserver',
" \ args: ['--stdio'],
" \ workspaceConfig: #{
" \ python: #{
" \ pythonPath: '/usr/local/bin/python3'
" \ }}
" \ }])
call LspAddServer([#{name: 'pyright',
\ filetype: 'python',
\ path: '/Users/jordan.orelli/.nix-profile/bin/pyright-langserver',
\ args: ['--stdio'],
\ workspaceConfig: #{
\ python: #{
\ pythonPath: '/usr/local/bin/python3'
\ }}
\ }])
nmap <C-]> :LspGotoDefinition<CR>
nmap <S-K> :LspHover<CR>
nmap <S-M> :LspDiagCurrent<CR>
" ---------------------------------------------------------------------------}}}
" ALE -----------------------------------------------------------------------{{{

Loading…
Cancel
Save