mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
efa45832ea
Problem: There is no easy way to configure the behavior of the default diagnostic "jump" mappings. For example, some users way want to show the floating window, and some may not (likewise, some way want to only move between warnings/errors, or disable the "wrap" parameter). Solution: Add a "jump" table to vim.diagnostic.config() that sets default values for vim.diagnostic.jump(). Alternatives: Users can override the default mappings to use the exact options to vim.diagnostic.jump() that they want, but this has a couple issues: - While the default mappings are not complicated, they are also not trivial, so overriding them requires users to understand implementation details (specifically things like setting "count" properly). - If plugins want to change the default mappings, or configure the behavior in any way (e.g. floating window display), it becomes even harder for users to tweak specific behavior. vim.diagnostic.config() already works quite well as the "entry point" for tuning knobs with diagnostic UI elements, so this fits in nicely and composes well with existing mental models and idioms. |
||
---|---|---|
.. | ||
autoload | ||
colors | ||
compiler | ||
doc | ||
ftplugin | ||
indent | ||
keymap | ||
lua | ||
macros | ||
pack/dist/opt | ||
plugin | ||
queries | ||
spell | ||
syntax | ||
tools | ||
tutor | ||
CMakeLists.txt | ||
delmenu.vim | ||
filetype.lua | ||
ftoff.vim | ||
ftplugin.vim | ||
ftplugof.vim | ||
indent.vim | ||
indoff.vim | ||
macmap.vim | ||
makemenu.vim | ||
menu.vim | ||
mswin.vim | ||
neovim.ico | ||
nvim.appdata.xml | ||
nvim.desktop | ||
nvim.png | ||
optwin.vim | ||
synmenu.vim |