aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-09-06 20:21:18 -0600
committerGregory Anders <greg@gpanders.com>2021-09-15 14:09:47 -0600
commita5bbb932f9094098bd656d3f6be3c58344576709 (patch)
tree80f35362c9e94853e9e8898416120a3ede623362 /scripts/gen_vimdoc.py
parent6188926e00081ae4b1a33d5fd12692a6749a2144 (diff)
downloadrneovim-a5bbb932f9094098bd656d3f6be3c58344576709.tar.gz
rneovim-a5bbb932f9094098bd656d3f6be3c58344576709.tar.bz2
rneovim-a5bbb932f9094098bd656d3f6be3c58344576709.zip
refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP. LSP clients are now a specific case of a diagnostic producer, but the diagnostic subsystem is decoupled from the LSP subsystem (or will be, eventually). More discussion at [1]. [1]: https://github.com/neovim/neovim/pull/15585
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 320c44e860..68ee7bea0f 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -187,6 +187,23 @@ CONFIG = {
'module_override': {},
'append_only': [],
},
+ 'diagnostic': {
+ 'mode': 'lua',
+ 'filename': 'diagnostic.txt',
+ 'section_start_token': '*diagnostic-api*',
+ 'section_order': [
+ 'diagnostic.lua',
+ ],
+ 'files': os.path.join(base_dir, 'runtime/lua/vim/diagnostic.lua'),
+ 'file_patterns': '*.lua',
+ 'fn_name_prefix': '',
+ 'section_name': {'diagnostic.lua': 'diagnostic'},
+ 'section_fmt': lambda _: 'Lua module: vim.diagnostic',
+ 'helptag_fmt': lambda _: '*diagnostic-api*',
+ 'fn_helptag_fmt': lambda fstem, name: f'*vim.{fstem}.{name}()*',
+ 'module_override': {},
+ 'append_only': [],
+ },
'treesitter': {
'mode': 'lua',
'filename': 'treesitter.txt',