Move away from providing completion with ExpandRTDir to ExpandGeneric
providing the function get_healthcheck_name which caches the results for
the current command line prompt.
It does the almost the same thing the Vim function 'get_healthcheck'
implemented in 'runtime/autoload/health.vim' does.
- Add tests for lua healthchecks (failure, success and submodules).
- Reword some of the test naming for improved logs readability.
- Modify render test to accomodate the changes of the health autoload function.
- Add test for :checkhealth completion of Lua healtchecks.
- Refactor health.vim to discover lua healthcheck in the runtime
directories lua/**/health{/init}.lua
- Support healthchecks for lua submodules e.g :checkhealth vim.lsp and
also support wildcard "*" at the end for all submodules
:checkhealth vim*
- Refactor health.vim to use variable scope instead of output capturing
- Create health.lua module to wrap report functions and future
extensibility.
- Move away from searching just in the runtimepath, use
`nvim_get_runtime_file` due to #15632
Example:
Plugin linter in rtp can declare it's checkhealts in lua module
`lua/linter/health{/init}.lua` that returns a table with a method
"check" that when executed calls the report functions provided by the
builtin lua module require("health").
The plugin also has a submodule `/lua/linter/providers` in which it
defines `/lua/linter/providers/health{/init}.lua`
This plugin healthcheck can now be run by the ex command:
`:checkhealth linter linter.providers`
Also calling all submodules can be done by:
`:checkhealth linter*
And "linter" and "linter.provider" would be discovered when:
`:checkhealth`
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.
feat(generators): HASHY McHASHFACE
Always make calls to `vim.diagnostic.set` call `vim.diagnostic.show`.
This creates an easier to reason about code path and is also less
surprising when users wish to override override `vim.diagnostic.show`
with custom behavior and `vim.diagnostic.set` is called with empty
diagnostics.
Functionally, the end result is the same: when `show` is called with an
empty diagnostics list, it just calls `hide` and then returns, which is
exactly what `reset` does right now.
win_set_buf can trigger autocmds if noautocmd=false. If they close the window,
code afterwards will dereference the freed win_T* wp pointer.
This interaction became possible after commit 1def3d1542.
The reason deleting curbuf crashes, and not the buf passed to
`nvim_open_win`, is because the float initially edits curbuf (`win_init`)
until it's later set to edit buf (windows from `:new` and `:split <buf>`
behave similiarly: approx. `:split`, then `:buffer <buf>`).
`do_buffer` closes windows when their edited buffer is deleted (unless
it's the only window; N/A for floats), so the float closes when curbuf
is deleted, so we need to check `win_valid` after `win_set_buf` too.
Closes#15548
N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the
window (including border). This line may also need change in this case (change
0 to -1):
This is most consistent and easiest to reason about, especially with GUIs whose
border do not need to have width/height of 1/1 in cell units.
Fix#15789
Problem:
Since 2f06413dfb#13042, "ESC+c" sequence is treated as "ESC c"
instead of "M-c" (ALT/META+c) when not mapped, aka "fallthrough"
behavior. But "isolated" (non-ALT/META) mappings to ESC and c were not
resolved. This behavior is especially confusing for the TUI.
Solution:
Resolve isolated ESC, c mappings when there is no M-c mapping.
Change ins_char_typebuf() to escape CSI, K_SPECIAL.
fixes#13086fixes#15869
fix(runtime): add compressed {&packpath}/start/*/pack/*[/after] representation to &rtp
by suggestion by at-tpope
Summary:
We can add XDG_DATA_DIR/nvim/site/pack/*/start/* (et al) as an unexpanded wildchar to &rtp which keeps it both short and explicit and still supporting globpath(&rtp, ...).
ref #15101