summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/ftplugin/help.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-10vim-patch:72cefe6: runtime(help): support highlighting groups in translated ↵zeertzjq1
syntax doc (#38922) closes: vim/vim#19942 https://github.com/vim/vim/commit/72cefe6b72c92b5f3686ee297277a2940cbb702f Also include a blank line change from https://github.com/vim/vim/commit/9d9381fb2804c426f88cd9b30650b94fc500d6bb Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-23fix(lua): drop support for boolean `buf` in `vim.keymap` #38432skewb1k1
Problem: `vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely used `integer?` values, `true` -> `0` and `false` -> `nil`. This conversion is unnecessary and can be handled at call sites. Solution: As a follow-up to deprecating the `buffer` option, drop support for boolean values for the new `buf` option. The deprecated `buffer` continues to support booleans for backward compatibility.
2026-03-21feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360skewb1k1
The `buffer` option remains functional but is now undocumented. Providing both will raise an error. Since providing `buf` was disallowed before, there is no code that will break due to using `buffer` alongside `buf`.
2026-03-13refactor(treesitter)!: get_parser return nil on error #37276nikolightsaber1
2026-02-23refactor(gen): let Hugo build html docs #37972Yochem van Rosmalen1
Problem: The html and css of the website's documentation pages are defined in long strings in gen_help_html.lua, making it hard to maintain and improve them. E.g. adding in headers that state the documentation is for nightly Nvim has been a long standing feature request. Solution: Move the inlined css and html (e.g. the <head>, <nav>, etc.) to Hugo. Now that the website is build with Hugo, we can use its templating system to generate the full html/css from the Tree-sitter tree: https://github.com/neovim/neovim.github.io/pull/437
2025-11-20fix(help): retry once if async parsing fails #36592Yochem van Rosmalen1
Problem: If the buffer changes during iteration of the query matches, `get_node_text()` may fail, showing an error to the user. Solution: Use `pcall` to not propogate the error to the user. Retry once if an error occurred.
2025-10-13fix(help): only set url for help files in $VIMRUNTIME #36165Yochem van Rosmalen1
Problem: Checking if the tag is nvim-owned (defined in a $VIMRUNTIME/doc/*.txt file) is too expensive for now without non-obvious workarounds Solution: Only set url extmarks for $VIMRUNTIME/doc/*.txt files. Closes: #36163
2025-10-12fix(help): wrong tag url in third-party help docs #36115Yochem van Rosmalen1
fix(help): only set url for nvim-owned tags Problem: 1. gx on |nonexistingtag| opens https://neovim.io/doc/user/helptag.html?nonexistingtag. 2. b:undo_ftplugin doesn't remove url extmarks. Solution: 1. Check if the tag is defined in a help file in $VIMRUNTIME. 2. Solution: clear namespace for buffer in b:undo_ftplugin.
2025-09-15feat(help): gx opens help tag in web browser #35778Yochem van Rosmalen1
Problem: `gx` does not work on tags in help buffers to open the documentation of that tag in the browser. Solution: Get the `optionlink`, `taglink` and `tag` TS nodes and set extmark "url" property. `gx` then discovers the extmark "url" and opens it.
2025-03-19fix(runtime): gO always says "Help TOC" #32971Justin M. Keyes1
Problem: gO always says "Help TOC". Solution: Use a generic title instead.
2025-03-18fix(help): remove runnable code virtual textChristian Clason1
Problem: Virtual text indicating runnable code examples in help files is intrusive and non-configurable (and often denotes actually non-working examples). Solution: Remove virtual text.
2025-02-22fix(runtime): avoid E31 in ftplugin (#32578)phanium1
fix: twice nunmap in ftplugin
2025-02-22feat(treesitter): table of contents for checkhealth, markdown (#32282)Christian Clason1
Problem: It's difficult to navigate large structured text files (vim help, checkhealth, Markdown). Solution: Support `gO` for table of contents and `]]`/`[[` for moving between headings for all these filetypes using treesitter queries. Refactor: colorization of highlight groups is moved to the `help` ftplugin while headings-related functionality is implemented in a private `vim.treesitter` module for possible future use for other filetypes.
2025-01-27docs(treesitter): fix TSNode:range() type signature #32224Riley Bruins1
Uses an overload to properly show the different return type based on the input parameter.
2025-01-15fix(docs): replace `yxx` mappings with `g==` #31947Evgeni Chasnovski1
Problem: `yx` uses "y" prefix, which shadows a builtin operator. Solution: Use `g=` (in the form of `g==` currently), drawing from precedent of CTRL-= and 'tpope/vim-scriptease'.
2025-01-14refactor: use nvim.foo.bar format for namespacesMaria José Solano1
2025-01-09feat(docs): "yxx" runs Lua/Vimscript code examples #31904Riley Bruins1
`yxx` in Normal mode over a Lua or Vimscript code block section will execute the code. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2024-09-27feat(defaults): pretty :help headings #30544Justin M. Keyes1
Problem: Headings in :help do not stand out visually. Solution: Define a non-standard `@markup.heading.1.delimiter` group and special-case it in `highlight_group.c`. FUTURE: This is a cheap workaround until we have #25718 which will enable: - fully driven by `vimdoc/highlights.scm` instead of using highlight tricks (`guibg=bg guifg=bg guisp=fg`) - better support of "cterm" ('notermguicolors')
2024-09-23fix(runtime): treat b:undo_ftplugin consistently in Lua ftplugins (#30473)zeertzjq1
- Don't assume b:undo_ftplugin is set when first modifying it. - Don't assume b:undo_ftplugin already contains some resetting.
2024-07-03fix(runtime): stop treesitter highlight in b:undo_ftplugin (#29533)zeertzjq1
It seems that nvim-treesitter stops treesitter highlight when changing filetype, so it makes sense for builtin ftplugins to do this as well. Use :call and v:lua here to allow separation with '|'.
2024-07-01fix(runtime): update b:undo_ftplugin in Lua runtime files (#29529)zeertzjq1
Related to #29506, but adding vim.treesitter.stop() to b:undo_ftplugin doesn't solve the problem yet.
2024-06-09feat(help): use treesitter for table of contentsChristian Clason1
Problem: Creating the table of contents for `gO` is complicated. Solution: Use treesitter instead.
2023-12-20docs: apply current colorscheme to default highlight groupsChristian Clason1
Problem: Not all default highlight groups show their actual colors. Solution: Refactor `vimhelp.lua` and apply it to all relevant lists (UI groups, syntax groups, treesitter groups, LSP groups, diagnostic groups).
2023-12-03feat(treesitter): highlight help files by default (#26347)Christian Clason1
2023-09-08feat(runtime): highlight hl groups in syntax.txt (#25050)zeertzjq1
- Add runtime/lua/vim/vimhelp.lua, which is a translation of Vim's runtime/import/dist/vimhelp.vim. - Unlike Vim, run the highlighting from an ftplugin file instead of a syntax file, so that it is run even if using treesitter.