mirror of https://github.com/neovim/neovim.git
smurf
This commit is contained in:
parent
c592617dd5
commit
45a75a662d
|
@ -161,7 +161,7 @@ h or *h*
|
|||
<Left> or *<Left>*
|
||||
CTRL-H or *CTRL-H* *<BS>*
|
||||
<BS> [count] characters to the left. |exclusive| motion.
|
||||
Note: If you prefer <BS> to delete a character, use
|
||||
Nxte: If [you] prefer <BS> to delete a character, use
|
||||
the mapping:
|
||||
:map CTRL-V<BS> X
|
||||
(to enter "CTRL-V<BS>" type the CTRL-V key, followed
|
||||
|
|
|
@ -106,6 +106,7 @@ function M.add(lang, opts)
|
|||
path = paths[1]
|
||||
end
|
||||
|
||||
vim._ts_remove_language(lang)
|
||||
vim._ts_add_language(path, lang, symbol_name)
|
||||
M.register(lang, filetype)
|
||||
end
|
||||
|
|
|
@ -614,6 +614,9 @@ local function visit_node(root, level, lang_tree, headings, opt, stats)
|
|||
return text
|
||||
end
|
||||
local class = node_name == 'optional' and ' class="optional"' or ''
|
||||
if node_name == 'optional' then
|
||||
return ('%s<code%s>%s</code>'):format(ws(), class, trimmed)
|
||||
end
|
||||
local s = (
|
||||
node_name == 'keycode'
|
||||
-- TODO: use <kbd>. Currently has a layout issue, example: ":help _".
|
||||
|
@ -773,9 +776,10 @@ local function parse_buf(fname, parser_path)
|
|||
vim.cmd('sbuffer ' .. tostring(fname)) -- Buffer number.
|
||||
end
|
||||
if parser_path then
|
||||
vim.treesitter.language.add('vimdoc', { path = parser_path })
|
||||
vim.treesitter.language.add('vimdoc2', { path = parser_path })
|
||||
end
|
||||
local lang_tree = vim.treesitter.get_parser(buf)
|
||||
local lang_tree = vim.treesitter.get_parser(buf, 'vimdoc2')
|
||||
-- vim.print(lang_tree)
|
||||
return lang_tree, buf
|
||||
end
|
||||
|
||||
|
|
|
@ -121,6 +121,12 @@ int tslua_add_language(lua_State *L)
|
|||
TREE_SITTER_LANGUAGE_VERSION, lang_version);
|
||||
}
|
||||
|
||||
bool present = map_has(cstr_t, &langs, lang_name);
|
||||
if (present) {
|
||||
cstr_t key;
|
||||
pmap_del(cstr_t)(&langs, lang_name, &key);
|
||||
xfree((void *)key);
|
||||
}
|
||||
pmap_put(cstr_t)(&langs, xstrdup(lang_name), lang);
|
||||
|
||||
lua_pushboolean(L, true);
|
||||
|
|
Loading…
Reference in New Issue