From 5b13d27758081c3d757ddcfdced3834ea5cdbe00 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sat, 19 Sep 2020 11:06:21 +0100 Subject: [PATCH] Adds nvim lsp support also removes some bindings I was experementing with --- .gitmodules | 6 ++++++ after/plugin/nvim-lsp.vim | 26 ++++++++++++++++++++++++++ bundle/deoplete-lsp | 1 + bundle/vim-tridactyl | 1 + vimrc | 27 +++++---------------------- 5 files changed, 39 insertions(+), 22 deletions(-) create mode 100644 after/plugin/nvim-lsp.vim create mode 160000 bundle/deoplete-lsp create mode 160000 bundle/vim-tridactyl diff --git a/.gitmodules b/.gitmodules index b0a0c13..ebb6405 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/after/plugin/nvim-lsp.vim b/after/plugin/nvim-lsp.vim new file mode 100644 index 0000000..9fd8dab --- /dev/null +++ b/after/plugin/nvim-lsp.vim @@ -0,0 +1,26 @@ +" Check that we are running inside nvim +if !has('nvim') + finish +endif + +lua < lua vim.lsp.buf.definition() + nnoremap ld lua vim.lsp.util.show_line_diagnostics() + nnoremap K lua vim.lsp.buf.hover() + nnoremap gd lua vim.lsp.buf.declaration() +endfunction + +if has('autocmd') + augroup JHLanguageClientAutocmds + autocmd! + autocmd FileType go,vim call s:ConfigureBuffer() + augroup END +endif + diff --git a/bundle/deoplete-lsp b/bundle/deoplete-lsp new file mode 160000 index 0000000..4fd2507 --- /dev/null +++ b/bundle/deoplete-lsp @@ -0,0 +1 @@ +Subproject commit 4fd2507dd295d9c114febabb0c9cf31da87df008 diff --git a/bundle/vim-tridactyl b/bundle/vim-tridactyl new file mode 160000 index 0000000..784794d --- /dev/null +++ b/bundle/vim-tridactyl @@ -0,0 +1 @@ +Subproject commit 784794dd8854b1eee2a9e718b8b1d941a20516b6 diff --git a/vimrc b/vimrc index 5efdd3d..ae9fb9d 100644 --- a/vimrc +++ b/vimrc @@ -176,6 +176,11 @@ nnoremap h = :FzfHelptags " Space is important at the end of this command nnoremap / = :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 " Fix previous spelling mistake in insert mode inoremap u[s1z=`]au -" 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 H H -vnoremap H H -nnoremap l L -vnoremap l L -nnoremap j J -vnoremap j J - -" Since H and L are now h/l, also do the same for M -nnoremap m M -vnoremap m M - function! s:make_email_list(lines) let l:emails = []