From 1da3d5e7229193cda5fbd0164ec8e4251abd2bb2 Mon Sep 17 00:00:00 2001 From: Tyler Davis Date: Fri, 3 Sep 2021 15:13:16 -0700 Subject: vim: split configs for neovim --- .vimrc | 70 ------------------------------------------------------------------ 1 file changed, 70 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 5e329e0..9fd8885 100644 --- a/.vimrc +++ b/.vimrc @@ -10,29 +10,6 @@ Plug 'buoto/gotests-vim' Plug 'rust-lang/rust.vim' Plug 'w0rp/ale' -if has('python3') - if has('nvim') - Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } - let $NVIM_TUI_ENABLE_TRUE_COLOR=1 - " Rust settings - " Collection of common configurations for the Nvim LSP client - Plug 'neovim/nvim-lspconfig' - " Extensions to built-in LSP, for example, providing type inlay hints - Plug 'nvim-lua/lsp_extensions.nvim' - " Autocompletion framework for built-in LSP - Plug 'nvim-lua/completion-nvim' - else - Plug 'Shougo/deoplete.nvim' - Plug 'roxma/nvim-yarp' - Plug 'roxma/vim-hug-neovim-rpc' - endif - let g:deoplete#enable_at_startup = 1 -endif - call plug#end() """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -361,56 +338,9 @@ au FileType go nmap k (go-doc) let g:rustfmt_autosave = 1 -if has('nvim') - " Rust LSP support for rust-analyzer -lua << EOF -local nvim_lsp = require'lspconfig' - -local on_attach = function(client) - require'completion'.on_attach(client) -end - --- Auto-imports -nvim_lsp.rust_analyzer.setup({ - on_attach=on_attach, - settings = { - ["rust-analyzer"] = { - assist = { - importGranularity = "module", - importPrefix = "by_self", - }, - cargo = { - loadOutDirsFromCheck = true - }, - procMacro = { - enable = true - }, - } - } -}) - --- Enable diagnostics -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = true, - signs = true, - update_in_insert = true, - } -) -EOF - " Set updatetime for CursorHold " 300ms of no cursor movement to trigger CursorHold set updatetime=300 -" Show diagnostic popup on cursor hold -autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics() - -" Enable type inlay hints -autocmd CursorMoved,InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost * -\ lua require'lsp_extensions'.inlay_hints{ prefix = '', highlight = "Comment", enabled = {"TypeHint", "ChainingHint", "ParameterHint"} } - - -endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- cgit v1.2.3