1
0
Fork 0

neovim: coc-rust-analyzer

This commit is contained in:
Jeremy Kaplan 2021-06-04 19:07:42 -07:00
commit 54f8ab0b31
5 changed files with 20 additions and 12 deletions

View file

@ -1 +1,8 @@
{} {
"coc.preferences.formatOnSaveFiletypes": ["rust"],
"rust-analyzer.enable": false,
"rust-analyzer.diagnostics.enableExperimental": false,
"rust-analyzer.inlayHints.enable": false,
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.updates.channel": "nightly"
}

1
neovim/coc/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/list-extensions-history.json

View file

@ -1,5 +1,7 @@
{ {
"dependencies": { "dependencies": {
"coc-json": ">=1.3.4",
"coc-rls": ">=1.1.6",
"coc-rust-analyzer": ">=0.46.0" "coc-rust-analyzer": ">=0.46.0"
} }
} }

View file

@ -1 +1,5 @@
{} {
"coc-rust-analyzer|global": {
"release": "nightly 2021-06-05"
}
}

View file

@ -30,7 +30,6 @@ Plug 'keith/swift.vim'
Plug 'leafgarland/typescript-vim' Plug 'leafgarland/typescript-vim'
Plug 'ledger/vim-ledger' Plug 'ledger/vim-ledger'
Plug 'LnL7/vim-nix' Plug 'LnL7/vim-nix'
Plug 'ludovicchabant/vim-gutentags'
Plug 'MarcWeber/vim-addon-local-vimrc' Plug 'MarcWeber/vim-addon-local-vimrc'
Plug 'mxw/vim-jsx' Plug 'mxw/vim-jsx'
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
@ -145,7 +144,6 @@ map <silent> ;* :call fzf#run({
\ 'sink': function('RgHandler'), \ 'sink': function('RgHandler'),
\ 'options': '--multi', \ 'options': '--multi',
\})<CR> \})<CR>
map <silent> ;t :execute 'Tags '. expand('<cword>')<CR>
command ALEOff :let b:ale_fix_on_save = 0 command ALEOff :let b:ale_fix_on_save = 0
let g:ale_sign_error = '!' let g:ale_sign_error = '!'
@ -182,9 +180,6 @@ let g:ale_linters = {
\ 'rubocop', \ 'rubocop',
\ 'sorbet', \ 'sorbet',
\ ], \ ],
\ 'rust': [
\ 'cargo',
\ ],
\ 'sh': [ \ 'sh': [
\ 'shellcheck', \ 'shellcheck',
\ ], \ ],
@ -216,9 +211,6 @@ let g:ale_fixers = {
\ 'ruby': [ \ 'ruby': [
\ 'rubocop', \ 'rubocop',
\ ], \ ],
\ 'rust': [
\ 'rustfmt',
\ ],
\ 'scss': [ \ 'scss': [
\ 'prettier', \ 'prettier',
\ ], \ ],
@ -328,8 +320,6 @@ imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump) smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target) xmap <C-k> <Plug>(neosnippet_expand_target)
let g:gutentags_ctags_executable_rust = 'rusty-gutentags'
" CTRL-L usually clears and redraws the screen. Might as well use it to reset " CTRL-L usually clears and redraws the screen. Might as well use it to reset
" the colorscheme too! " the colorscheme too!
fun s:ResetScreen() fun s:ResetScreen()
@ -338,3 +328,7 @@ fun s:ResetScreen()
endfun endfun
command ResetScreen call s:ResetScreen() command ResetScreen call s:ResetScreen()
nnoremap <C-l> :ResetScreen<CR> nnoremap <C-l> :ResetScreen<CR>
nmap <silent> <Leader>j <Plug>(coc-diagnostic-next)
nmap <silent> <Leader>k <Plug>(coc-diagnostic-prev)
nmap <silent> <Leader>d <Plug>(coc-definition)