diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/news.txt | 1 | ||||
-rw-r--r-- | runtime/ftplugin/help.lua | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index f5b41f38a6..e38707fa76 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -269,6 +269,7 @@ The following changes to existing APIs or features add new behavior. vim.g.query_lint_on = {} < • Enabled treesitter highlighting for treesitter query files. + • Enabled treesitter highlighting for help files. • The `workspace/didChangeWatchedFiles` LSP client capability is now enabled by default. diff --git a/runtime/ftplugin/help.lua b/runtime/ftplugin/help.lua index 4cc3386167..bf3408c2d9 100644 --- a/runtime/ftplugin/help.lua +++ b/runtime/ftplugin/help.lua @@ -1,3 +1,7 @@ +-- use treesitter over syntax (for highlighted code blocks) +vim.treesitter.start() + +-- add custom highlights for list in `:h highlight-groups` if vim.endswith(vim.fs.normalize(vim.api.nvim_buf_get_name(0)), '/doc/syntax.txt') then require('vim.vimhelp').highlight_groups() end |