summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
authorTyler Davis <tydavis@gmail.com>2022-01-07 16:03:45 +0000
committerTyler Davis <tydavis@gmail.com>2022-01-07 16:03:45 +0000
commitf6035d698ed6d4739f4cddb8de754ed007f62d7b (patch)
treef611207d26e3c4f566bac94478a42645b36091ab /.config/nvim
parent5987fe6dd8b5ff5b330e546986db689b0ccb013c (diff)
downloaddotfiles-f6035d698ed6d4739f4cddb8de754ed007f62d7b.tar.gz
dotfiles-f6035d698ed6d4739f4cddb8de754ed007f62d7b.zip
vim: LSP formatting
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.vim33
1 files changed, 23 insertions, 10 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 7a98ab4..dea37b2 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -16,11 +16,13 @@ Plug 'rust-lang/rust.vim'
" Autocomplete
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
-" LSP in status line
+" LSP
Plug 'nvim-lua/lsp-status.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/lsp_extensions.nvim'
Plug 'nvim-lua/completion-nvim'
+" Diagnostics in QuickFix/LocList
+Plug 'onsails/diaglist.nvim'
call plug#end()
@@ -39,9 +41,9 @@ filetype plugin on
set autoread
au FocusGained,BufEnter * checktime
-" :W sudo saves the file
+" :Ws sudo saves the file
" (useful for handling the permission-denied error)
-command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
+command! Ws execute 'w !sudo tee % > /dev/null' <bar> edit!
" Limit what can be done in the VIMRC
set secure
@@ -292,9 +294,24 @@ if has('persistent_undo')
set undofile
endif
-" This is using a deprecated call. Find a fix / alternative
-" Show diagnostic popup on cursor hold
-"autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics()
+" Put LSP stuff in the quickfix window
+"lua vim.diagnostic.setqflist()
+
+" Enable diagnostic list in qfix/loclist
+lua << EOF
+ require("diaglist").init({
+ -- optional settings
+ -- below are defaults
+
+ -- increase for noisy servers
+ debounce_ms = 50,
+
+ -- list in quickfix only diagnostics from clients
+ -- attached to a current buffer
+ -- if false, all buffers' clients diagnostics is collected
+ buf_clients_only = true,
+})
+EOF
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" -> ALE Settings
@@ -393,10 +410,6 @@ if has('nvim')
)
EOF
-" 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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""