Adds nvim lsp support
also removes some bindings I was experementing with
This commit is contained in:
parent
6693029e0c
commit
5b13d27758
5 changed files with 39 additions and 22 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -96,3 +96,9 @@
|
|||
[submodule "bundle/nvim-lspconfig"]
|
||||
path = bundle/nvim-lspconfig
|
||||
url = https://github.com/neovim/nvim-lspconfig/
|
||||
[submodule "bundle/deoplete-lsp"]
|
||||
path = bundle/deoplete-lsp
|
||||
url = https://github.com/Shougo/deoplete-lsp
|
||||
[submodule "bundle/vim-tridactyl"]
|
||||
path = bundle/vim-tridactyl
|
||||
url = https://github.com/tridactyl/vim-tridactyl
|
||||
|
|
26
after/plugin/nvim-lsp.vim
Normal file
26
after/plugin/nvim-lsp.vim
Normal file
|
@ -0,0 +1,26 @@
|
|||
" Check that we are running inside nvim
|
||||
if !has('nvim')
|
||||
finish
|
||||
endif
|
||||
|
||||
lua <<EOF
|
||||
-- Go Language Server
|
||||
require'nvim_lsp'.gopls.setup{}
|
||||
-- Vim Language Server
|
||||
require'nvim_lsp'.vimls.setup{}
|
||||
EOF
|
||||
|
||||
function! s:ConfigureBuffer()
|
||||
nnoremap <buffer> <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR>
|
||||
nnoremap <buffer> <silent> <Leader>ld <cmd>lua vim.lsp.util.show_line_diagnostics()<CR>
|
||||
nnoremap <buffer> <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
||||
nnoremap <buffer> <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
|
||||
endfunction
|
||||
|
||||
if has('autocmd')
|
||||
augroup JHLanguageClientAutocmds
|
||||
autocmd!
|
||||
autocmd FileType go,vim call s:ConfigureBuffer()
|
||||
augroup END
|
||||
endif
|
||||
|
1
bundle/deoplete-lsp
Submodule
1
bundle/deoplete-lsp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4fd2507dd295d9c114febabb0c9cf31da87df008
|
1
bundle/vim-tridactyl
Submodule
1
bundle/vim-tridactyl
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 784794dd8854b1eee2a9e718b8b1d941a20516b6
|
27
vimrc
27
vimrc
|
@ -176,6 +176,11 @@ nnoremap <leader>h = :FzfHelptags<cr>
|
|||
" Space is important at the end of this command
|
||||
nnoremap <leader>/ = :FzfRg
|
||||
|
||||
" go vim
|
||||
"
|
||||
let g:go_def_mapping_enabled = 0
|
||||
|
||||
|
||||
" deoplete
|
||||
|
||||
" If I am running neovim, I want deoplete to start
|
||||
|
@ -318,28 +323,6 @@ inoremap jj <Esc>
|
|||
" Fix previous spelling mistake in insert mode
|
||||
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
|
||||
" Makes capital hjkl work as extream versions
|
||||
nnoremap H ^
|
||||
vnoremap H ^
|
||||
nnoremap L $
|
||||
vnoremap L $
|
||||
nnoremap J 5j
|
||||
vnoremap J 5j
|
||||
nnoremap K 5k
|
||||
vnoremap K 5k
|
||||
|
||||
" Get back old functionality using leader
|
||||
nnoremap <leader>H H
|
||||
vnoremap <leader>H H
|
||||
nnoremap <leader>l L
|
||||
vnoremap <leader>l L
|
||||
nnoremap <leader>j J
|
||||
vnoremap <leader>j J
|
||||
|
||||
" Since H and L are now <leader> h/l, also do the same for M
|
||||
nnoremap <leader>m M
|
||||
vnoremap <leader>m M
|
||||
|
||||
|
||||
function! s:make_email_list(lines)
|
||||
let l:emails = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue