diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-08 21:05:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 21:05:35 +0800 |
commit | d0d4160dd13fad952338b8582e2db8838172bbf1 (patch) | |
tree | 9ffe95bd28498db413fa45dad61ccb16d09cef5a /runtime/ftplugin | |
parent | cc3df63c3ba954962fc1b9ce0503a5379ef0c7d0 (diff) | |
download | rneovim-d0d4160dd13fad952338b8582e2db8838172bbf1.tar.gz rneovim-d0d4160dd13fad952338b8582e2db8838172bbf1.tar.bz2 rneovim-d0d4160dd13fad952338b8582e2db8838172bbf1.zip |
feat(runtime): highlight hl groups in syntax.txt (#25050)
- 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.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/help.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/ftplugin/help.lua b/runtime/ftplugin/help.lua new file mode 100644 index 0000000000..4cc3386167 --- /dev/null +++ b/runtime/ftplugin/help.lua @@ -0,0 +1,3 @@ +if vim.endswith(vim.fs.normalize(vim.api.nvim_buf_get_name(0)), '/doc/syntax.txt') then + require('vim.vimhelp').highlight_groups() +end |