From 384ec3801c8282af7292d28a264f589250368161 Mon Sep 17 00:00:00 2001 From: Thomas Gideon Date: Thu, 16 May 2019 11:47:38 -0400 Subject: [PATCH] Get rust support working again --- init.vim | 1 + lsp.vim | 16 ++++++---------- ncm2.vim | 6 ++++++ plug.vim | 17 +++-------------- 4 files changed, 16 insertions(+), 24 deletions(-) create mode 100644 ncm2.vim diff --git a/init.vim b/init.vim index 17bd512..2ee840e 100644 --- a/init.vim +++ b/init.vim @@ -9,6 +9,7 @@ let mapleader = "\" let oldwd = getcwd() exec "cd " . vimrc_git source plug.vim +source ncm2.vim source airline.vim source syntastic.vim source fzf.vim diff --git a/lsp.vim b/lsp.vim index 46e728a..88d6900 100644 --- a/lsp.vim +++ b/lsp.vim @@ -1,10 +1,6 @@ -set hidden - -let g:LanguageClient_serverCommands = { - \ 'rust': ['rls'], - \ } - -nnoremap K :call LanguageClient_textDocument_hover() -nnoremap gd :call LanguageClient_textDocument_definition() -nnoremap :call LanguageClient_textDocument_rename() -nnoremap S :call LanguageClient_textDocument_documentSymbol() +au User lsp_setup call lsp#register_server({ + \ 'name': 'rls', + \ 'cmd': {server_info->['rustup', 'run', 'stable', 'rls']}, + \ 'workspace_config': {'rust': {'clippy_preference': 'on'}}, + \ 'whitelist': ['rust'], + \ }) diff --git a/ncm2.vim b/ncm2.vim new file mode 100644 index 0000000..bbcf02c --- /dev/null +++ b/ncm2.vim @@ -0,0 +1,6 @@ +" enable ncm2 for all buffers +autocmd BufEnter * call ncm2#enable_for_buffer() + +" IMPORTANT: :help Ncm2PopupOpen for more information +set completeopt=noinsert,menuone,noselect + diff --git a/plug.vim b/plug.vim index b638846..d26f488 100644 --- a/plug.vim +++ b/plug.vim @@ -40,25 +40,14 @@ Plug 'ncm2/ncm2-racer' Plug 'vim-scripts/groovy.vim' Plug 'vim-scripts/groovyindent-unix' " LSP -Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh'} +Plug 'prabirshrestha/async.vim' +Plug 'prabirshrestha/vim-lsp' +Plug 'roxma/nvim-yarp' " auto format all the things " https://github.com/Chiel92/vim-autoformat Plug 'Chiel92/vim-autoformat' " auto-completion framework Plug 'ncm2/ncm2' -" breeze dark color scheme, to match KDE -" Plug cannot actually install this colorscheme, clone and link autoload and -" colors manually -"Plug 'fneu/breezy' -" run npm i -g typescript tslint typescript-formatter so that these plugins have the tools they need -" typescript syntax support and other settings -Plug 'leafgarland/typescript-vim' -" plug into tsserver -Plug 'Quramy/tsuquyomi' -" Smart indenting for JS and TS -Plug 'jason0x43/vim-js-indent' -" Installs and builds vimproc (required to launch tsserver) -Plug 'Shougo/vimproc.vim', {'do': 'make'} " All of your Plugins must be added before the following line call plug#end() " required