diff options
author | Tyler Davis <tydavis@gmail.com> | 2021-09-03 15:13:16 -0700 |
---|---|---|
committer | Tyler Davis <tydavis@gmail.com> | 2021-09-03 15:13:16 -0700 |
commit | 1da3d5e7229193cda5fbd0164ec8e4251abd2bb2 (patch) | |
tree | c3eea4fe23d280b51caa3a3639738f24e659ae6f /.vimrc | |
parent | 37fcbdad20b365d7d031781a095d3e4a2e79abf7 (diff) | |
download | dotfiles-1da3d5e7229193cda5fbd0164ec8e4251abd2bb2.tar.gz dotfiles-1da3d5e7229193cda5fbd0164ec8e4251abd2bb2.zip |
vim: split configs for neovim
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 70 |
1 files changed, 0 insertions, 70 deletions
@@ -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 <Leader>k <Plug>(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 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |