From bce8dd2348af3f15a6fe3c9cb91b5b7576c2bf99 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 4 Apr 2019 09:18:10 +0200 Subject: ma editors/vim: try out languageClient --- makefu/2configs/editor/vim.nix | 1 + makefu/2configs/editor/vimrc | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/makefu/2configs/editor/vim.nix b/makefu/2configs/editor/vim.nix index d14a611b4..8a58e44de 100644 --- a/makefu/2configs/editor/vim.nix +++ b/makefu/2configs/editor/vim.nix @@ -23,6 +23,7 @@ in { vimrcConfig.vam.pluginDictionaries = [ { names = [ "undotree" # "YouCompleteMe" + "LanguageClient-neovim" "vim-better-whitespace" ]; } # vim-nix handles indentation better but does not perform sanity { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } diff --git a/makefu/2configs/editor/vimrc b/makefu/2configs/editor/vimrc index 8cdab55db..96c505ba8 100644 --- a/makefu/2configs/editor/vimrc +++ b/makefu/2configs/editor/vimrc @@ -96,3 +96,14 @@ augroup Binary au BufWritePost *.bin if &bin | %!xxd au BufWritePost *.bin set nomod | endif augroup END + +let g:LanguageClient_serverCommands = { +\ 'python': ['pyls'] +\ } +nnoremap :call LanguageClient_contextMenu() +nnoremap gh :call LanguageClient_textDocument_hover() +nnoremap gd :call LanguageClient_textDocument_definition() +nnoremap gr :call LanguageClient_textDocument_references() +nnoremap gs :call LanguageClient_textDocument_documentSymbol() +nnoremap :call LanguageClient_textDocument_rename() +nnoremap gf :call LanguageClient_textDocument_formatting() -- cgit v1.2.3