Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

weilbith/nvim-lsp-diamove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!!!DEPRACTED!!!

With the development of NeoVim all features of this plugin have become part of the core. Please read the commit message for version f75be5e to get further details.


NeoVim Language Server Diagnostic Movements

Add the missing navigation commands for the LSP diagnostics in a buffer. This is an addition to the already existing :cabove, :cbelow, :labove and :lbelow commands (which act on the quickfix and location list). In addition the diagnostic movements are more secure and precise.

Installation

Install the plugin with your favorite manager tool. Here is an example using dein.vim:

call dein#add('weilbith/nvim-lsp-diamove', {
      \ 'on_cmd': ['Dabove', 'Dbelow'],
      \ })

It is recommended to use the nvim-lspconfig plugin to attach the language clients to your buffers.

Usage

This plugin provides two the commands :Dabove and :Dbelow. They are mapped to the convenient keys combos [d and ]d (note that this can be disabled). All commands and mappings can be prefixed with a count (e.g. 3[d).

Please make sure that your buffer has an LSP client attached and the server is supporting diagnostics. NeoVim enables the pushing of diagnostics per default.

Comparison & Design Decisions

This plugin attempts to be minimalistic. Therefore it does not customize the callback function for the diagnostics. Rather it reuses the published vim.lsp.util.diagnostics_by_buf table. The only advanced logic is the correct sort order of the diagnostic list to guarantee precise jumps. This is for example not the case for :cabove etc. If you search for a plugin with more features to customize the diagnostic behavior, checkout the diagnostic-nvim plugin. But be aware that such plugin re-rewrites/overwrites the LSP callback completely (not extending it, at the current state) and thereby may not profit by future updates of NeoVim.

About

Navigation for LSP diagnostics in NeoVim

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published