mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 22:35:33 +00:00
feat(help): super K (":help!") guesses tag at cursor #36205
Problem:
`K` in help files may fail in some noisy text. Example:
(`fun(config: vim.lsp.ClientConfig): boolean`)
^cursor
Solution:
- `:help!` (bang, no args) activates DWIM behavior: tries `<cWORD>`,
then trims punctuation until a valid tag is found.
- Set `keywordprg=:help!` by default.
- Does not affect `CTRL-]`, that is still fully "tags" based.
This commit is contained in:
@@ -17,7 +17,7 @@ let b:undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc< comme
|
||||
|
||||
setl comments= cms=
|
||||
|
||||
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=s:HelpComplete
|
||||
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help! omnifunc=s:HelpComplete
|
||||
let &l:iskeyword='!-~,^*,^|,^",192-255'
|
||||
if has("conceal")
|
||||
setlocal cole=2 cocu=nc
|
||||
|
||||
Reference in New Issue
Block a user