Switch to ALE for linting and LSP
This commit is contained in:
parent
35c8ecc590
commit
0794644280
2 changed files with 7 additions and 29 deletions
|
@ -79,7 +79,8 @@ hi link LspDiagSignWarningText Question
|
|||
|
||||
hi PMenu cterm=NONE ctermfg=7 ctermbg=5
|
||||
hi PMenuSel cterm=bold ctermfg=8 ctermbg=3
|
||||
hi LspDiagVirtualText cterm=bold ctermfg=0 ctermbg=13
|
||||
hi ALEVirtualTextError cterm=bold ctermfg=0 ctermbg=11
|
||||
hi ALEVirtualTextWarning cterm=bold ctermfg=0 ctermbg=11
|
||||
hi LspSigActiveParameter cterm=bold ctermfg=7 ctermbg=13
|
||||
|
||||
" Misc cleanup
|
||||
|
|
|
@ -18,7 +18,7 @@ Plug 'junegunn/fzf.vim'
|
|||
|
||||
Plug 'SirVer/ultisnips'
|
||||
|
||||
Plug 'yegappan/lsp'
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
Plug 'vim-pandoc/vim-pandoc-syntax'
|
||||
Plug 'quarto-dev/quarto-vim'
|
||||
|
@ -224,34 +224,11 @@ augroup END
|
|||
|
||||
" LSP and other completion
|
||||
|
||||
nnoremap za :LspDiag current<cr>
|
||||
nnoremap zn :LspDiag nextWrap<cr>
|
||||
nnoremap zN :LspDiag prevWrap<cr>
|
||||
let g:ale_completion_enabled = 1
|
||||
|
||||
augroup Lsp
|
||||
autocmd!
|
||||
|
||||
let lspOptions = #{ ultisnips: v:true }
|
||||
autocmd User LspSetup call LspOptionsSet(lspOptions)
|
||||
|
||||
let lspServers = [#{
|
||||
\ name: 'r',
|
||||
\ filetype: ['r', 'rmd', 'quarto'],
|
||||
\ path: '/usr/local/bin/R',
|
||||
\ args: ['-s', '-e languageserver::run()']
|
||||
\ }, #{
|
||||
\ name: 'ts',
|
||||
\ filetype: ['javascript', 'typescript', 'javascriptreact', 'typescriptreact'],
|
||||
\ path: '/opt/homebrew/bin/typescript-language-server',
|
||||
\ args: ['--stdio']
|
||||
\ }, #{
|
||||
\ name: 'elixir',
|
||||
\ filetype: ['elixir'],
|
||||
\ path: '/opt/homebrew/bin/elixir-ls'
|
||||
\ }]
|
||||
|
||||
autocmd User LspSetup call LspAddServer(lspServers)
|
||||
augroup END
|
||||
nnoremap za :ALEFirst<cr>
|
||||
nnoremap zn :ALENextWrap<cr>
|
||||
nnoremap zN :ALEPreviousWrap<cr>
|
||||
|
||||
" File Running
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue