nvim: init.vim: Remove LSP
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
dc3e702d6c
commit
a68283c2de
1 changed files with 0 additions and 74 deletions
|
@ -52,10 +52,6 @@ Plug 'wlangstroth/vim-racket'
|
||||||
Plug 'neovimhaskell/haskell-vim', { 'for': [ 'haskell', 'cabal' ] }
|
Plug 'neovimhaskell/haskell-vim', { 'for': [ 'haskell', 'cabal' ] }
|
||||||
Plug 'parsonsmatt/intero-neovim'
|
Plug 'parsonsmatt/intero-neovim'
|
||||||
Plug 'neomake/neomake'
|
Plug 'neomake/neomake'
|
||||||
Plug 'autozimu/LanguageClient-neovim' , {
|
|
||||||
\ 'branch' : 'next',
|
|
||||||
\ 'do' : './install.sh'
|
|
||||||
\ }
|
|
||||||
" For Nix
|
" For Nix
|
||||||
Plug 'LnL7/vim-nix', { 'for': 'nix' }
|
Plug 'LnL7/vim-nix', { 'for': 'nix' }
|
||||||
" For autocompletion
|
" For autocompletion
|
||||||
|
@ -182,50 +178,6 @@ noremap <Down> <NOP>
|
||||||
noremap <Left> <NOP>
|
noremap <Left> <NOP>
|
||||||
noremap <Right> <NOP>
|
noremap <Right> <NOP>
|
||||||
|
|
||||||
nnoremap <Leader>ld :call LanguageClient#textDocument_definition()<CR>
|
|
||||||
nnoremap <Leader>lr :call LanguageClient#textDocument_rename()<CR>
|
|
||||||
nnoremap <Leader>lf :call LanguageClient#textDocument_formatting()<CR>
|
|
||||||
nnoremap <Leader>lt :call LanguageClient#textDocument_typeDefinition()<CR>
|
|
||||||
nnoremap <Leader>lx :call LanguageClient#textDocument_references()<CR>
|
|
||||||
nnoremap <Leader>la :call LanguageClient_workspace_applyEdit()<CR>
|
|
||||||
nnoremap <Leader>lc :call LanguageClient#textDocument_completion()<CR>
|
|
||||||
nnoremap <Leader>lh :call LanguageClient#textDocument_hover()<CR>
|
|
||||||
nnoremap <Leader>ls :call LanguageClient_textDocument_documentSymbol()<CR>
|
|
||||||
nnoremap <Leader>lm :call LanguageClient_contextMenu()<CR>
|
|
||||||
nnoremap <Leader>la :call LanguageClient#textDocument_codeAction()<CR>
|
|
||||||
|
|
||||||
" https://github.com/autozimu/LanguageClient-neovim/issues/618
|
|
||||||
function! LspMaybeHover(is_running) abort
|
|
||||||
if a:is_running.result && g:LanguageClient_autoHoverAndHighlightStatus
|
|
||||||
call LanguageClient_textDocument_hover()
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! LspMaybeHighlight(is_running) abort
|
|
||||||
if a:is_running.result && g:LanguageClient_autoHoverAndHighlightStatus
|
|
||||||
call LanguageClient#textDocument_documentHighlight()
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
augroup lsp_aucommands
|
|
||||||
au!
|
|
||||||
au CursorHold * call LanguageClient#isAlive(function('LspMaybeHover'))
|
|
||||||
au CursorMoved * call LanguageClient#isAlive(function('LspMaybeHighlight'))
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
let g:LanguageClient_autoHoverAndHighlightStatus = 0
|
|
||||||
|
|
||||||
function! ToggleLspAutoHoverAndHilight() abort
|
|
||||||
if g:LanguageClient_autoHoverAndHighlightStatus
|
|
||||||
let g:LanguageClient_autoHoverAndHighlightStatus = 0
|
|
||||||
call LanguageClient#clearDocumentHighlight()
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
let g:LanguageClient_autoHoverAndHighlightStatus = 1
|
|
||||||
end
|
|
||||||
endfunction
|
|
||||||
nnoremap <Leader>lg :call ToggleLspAutoHoverAndHilight()<CR>
|
|
||||||
|
|
||||||
augroup interoMaps
|
augroup interoMaps
|
||||||
au!
|
au!
|
||||||
" Maps for intero. Restrict to Haskell buffers so the bindings don't collide.
|
" Maps for intero. Restrict to Haskell buffers so the bindings don't collide.
|
||||||
|
@ -282,30 +234,6 @@ autocmd FileType scheme nnoremap <buffer> <Leader>re :normal mscpaF<cr>`s
|
||||||
" Evaluates the entire file.
|
" Evaluates the entire file.
|
||||||
autocmd FileType scheme nnoremap <buffer> <Leader>rf :normal msggcpG<cr>`s
|
autocmd FileType scheme nnoremap <buffer> <Leader>rf :normal msggcpG<cr>`s
|
||||||
|
|
||||||
" For Clojure
|
|
||||||
function! Expand(exp) abort
|
|
||||||
let l:result = expand(a:exp)
|
|
||||||
return l:result ==# '' ? '' : "file://" . l:result
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
nnoremap <silent> crcc :call LanguageClient#workspace_executeCommand('cycle-coll', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> crth :call LanguageClient#workspace_executeCommand('thread-first', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> crtt :call LanguageClient#workspace_executeCommand('thread-last', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> crtf :call LanguageClient#workspace_executeCommand('thread-first-all', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> crtl :call LanguageClient#workspace_executeCommand('thread-last-all', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> crml :call LanguageClient#workspace_executeCommand('move-to-let', [Expand('%:p'), line('.') - 1, col('.') - 1, input('Binding name: ')])<CR>
|
|
||||||
nnoremap <silent> cril :call LanguageClient#workspace_executeCommand('introduce-let', [Expand('%:p'), line('.') - 1, col('.') - 1, input('Binding name: ')])<CR>
|
|
||||||
nnoremap <silent> crel :call LanguageClient#workspace_executeCommand('expand-let', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
nnoremap <silent> cram :call LanguageClient#workspace_executeCommand('add-missing-libspec', [Expand('%:p'), line('.') - 1, col('.') - 1])<CR>
|
|
||||||
|
|
||||||
let g:LanguageClient_autoStart = 0
|
|
||||||
let g:LanguageClient_loggingFile = expand('$HOME/LC.log')
|
|
||||||
let g:LanguageClient_rootMarkers = ['stack.yaml']
|
|
||||||
let g:LanguageClient_serverCommands = {
|
|
||||||
\ 'haskell': ['$HOME/.local/bin/hie-wrapper'],
|
|
||||||
\ 'clojure': ['bash', '-c', 'clojure-lsp'],
|
|
||||||
\ }
|
|
||||||
|
|
||||||
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
|
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
|
||||||
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
|
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
|
||||||
let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
|
let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
|
||||||
|
@ -349,8 +277,6 @@ call deoplete#custom#source('_',
|
||||||
call deoplete#custom#option('sources', {
|
call deoplete#custom#option('sources', {
|
||||||
\ '_' : ['buffer', 'tag'],
|
\ '_' : ['buffer', 'tag'],
|
||||||
\ 'rust': ['racer'],
|
\ 'rust': ['racer'],
|
||||||
\ 'haskell': ['LanguageClient'],
|
|
||||||
\ 'clojure': ['LanguageClient'],
|
|
||||||
\})
|
\})
|
||||||
let g:deoplete#sources#rust#disable_keymap = 1
|
let g:deoplete#sources#rust#disable_keymap = 1
|
||||||
let g:deoplete#sources#rust#racer_binary=expand('$HOME/.cargo/bin/racer')
|
let g:deoplete#sources#rust#racer_binary=expand('$HOME/.cargo/bin/racer')
|
||||||
|
|
Loading…
Reference in a new issue