docs: also change "vimL" and "viml" to "Vimscript" (#24414)

This commit is contained in:
zeertzjq
2023-07-21 16:30:05 +08:00
committed by GitHub
parent 58f9486144
commit ca9f4a7cb1
6 changed files with 13 additions and 11 deletions

View File

@@ -1674,8 +1674,8 @@ nvim_parse_expression({expr}, {flags}, {highlight})
stringified without "kExprNode" prefix. stringified without "kExprNode" prefix.
• "start": a pair [line, column] describing where node is • "start": a pair [line, column] describing where node is
"started" where "line" is always 0 (will not be 0 if you will be "started" where "line" is always 0 (will not be 0 if you will be
using nvim_parse_viml() on e.g. ":let", but that is not present using this API on e.g. ":let", but that is not present yet).
yet). Both elements are Integers. Both elements are Integers.
• "len": “length” of the node. This and "start" are there for • "len": “length” of the node. This and "start" are there for
debugging purposes primary (debugging parser and providing debug debugging purposes primary (debugging parser and providing debug
information). information).
@@ -2108,8 +2108,8 @@ nvim_buf_call({buffer}, {fun}) *nvim_buf_call()*
a temporary scratch window (called the "autocmd window" for historical a temporary scratch window (called the "autocmd window" for historical
reasons) will be used. reasons) will be used.
This is useful e.g. to call vimL functions that only work with the current This is useful e.g. to call Vimscript functions that only work with the
buffer/window currently, like |termopen()|. current buffer/window currently, like |termopen()|.
Attributes: ~ Attributes: ~
Lua |vim.api| only Lua |vim.api| only

View File

@@ -34,6 +34,8 @@ local spell_dict = {
neovim = 'Nvim', neovim = 'Nvim',
lua = 'Lua', lua = 'Lua',
VimL = 'Vimscript', VimL = 'Vimscript',
vimL = 'Vimscript',
viml = 'Vimscript',
} }
local language = nil local language = nil

View File

@@ -1250,8 +1250,8 @@ ArrayOf(Integer, 2) nvim_buf_get_mark(Buffer buffer, String name, Error *err)
/// Otherwise a temporary scratch window (called the "autocmd window" for /// Otherwise a temporary scratch window (called the "autocmd window" for
/// historical reasons) will be used. /// historical reasons) will be used.
/// ///
/// This is useful e.g. to call vimL functions that only work with the current /// This is useful e.g. to call Vimscript functions that only work with the
/// buffer/window currently, like |termopen()|. /// current buffer/window currently, like |termopen()|.
/// ///
/// @param buffer Buffer handle, or 0 for current buffer /// @param buffer Buffer handle, or 0 for current buffer
/// @param fun Function to call inside the buffer (currently Lua callable /// @param fun Function to call inside the buffer (currently Lua callable

View File

@@ -402,7 +402,7 @@ typedef kvec_withinit_t(ExprASTConvStackItem, 16) ExprASTConvStack;
/// stringified without "kExprNode" prefix. /// stringified without "kExprNode" prefix.
/// - "start": a pair [line, column] describing where node is "started" /// - "start": a pair [line, column] describing where node is "started"
/// where "line" is always 0 (will not be 0 if you will be /// where "line" is always 0 (will not be 0 if you will be
/// using nvim_parse_viml() on e.g. ":let", but that is not /// using this API on e.g. ":let", but that is not
/// present yet). Both elements are Integers. /// present yet). Both elements are Integers.
/// - "len": “length” of the node. This and "start" are there for /// - "len": “length” of the node. This and "start" are there for
/// debugging purposes primary (debugging parser and providing /// debugging purposes primary (debugging parser and providing

View File

@@ -1139,7 +1139,7 @@ static bool viml_func_is_fast(const char *name)
if (fdef) { if (fdef) {
return fdef->fast; return fdef->fast;
} }
// Not a vimL function // Not a Vimscript function
return false; return false;
} }
@@ -1149,7 +1149,7 @@ int nlua_call(lua_State *lstate)
size_t name_len; size_t name_len;
const char *name = luaL_checklstring(lstate, 1, &name_len); const char *name = luaL_checklstring(lstate, 1, &name_len);
if (!nlua_is_deferred_safe() && !viml_func_is_fast(name)) { if (!nlua_is_deferred_safe() && !viml_func_is_fast(name)) {
return luaL_error(lstate, e_luv_api_disabled, "vimL function"); return luaL_error(lstate, e_luv_api_disabled, "Vimscript function");
} }
int nargs = lua_gettop(lstate) - 1; int nargs = lua_gettop(lstate) - 1;

View File

@@ -276,7 +276,7 @@ describe('lua stdlib', function()
| |
]]} ]]}
-- nvim_command causes a vimL exception, check that it is properly caught -- nvim_command causes a Vimscript exception, check that it is properly caught
-- and propagated as an error message in async contexts.. #10809 -- and propagated as an error message in async contexts.. #10809
exec_lua([[ exec_lua([[
vim.schedule(function() vim.schedule(function()
@@ -831,7 +831,7 @@ describe('lua stdlib', function()
it('vim.call, vim.fn', function() it('vim.call, vim.fn', function()
eq(true, exec_lua([[return vim.call('sin', 0.0) == 0.0 ]])) eq(true, exec_lua([[return vim.call('sin', 0.0) == 0.0 ]]))
eq(true, exec_lua([[return vim.fn.sin(0.0) == 0.0 ]])) eq(true, exec_lua([[return vim.fn.sin(0.0) == 0.0 ]]))
-- compat: nvim_call_function uses "special" value for vimL float -- compat: nvim_call_function uses "special" value for Vimscript float
eq(false, exec_lua([[return vim.api.nvim_call_function('sin', {0.0}) == 0.0 ]])) eq(false, exec_lua([[return vim.api.nvim_call_function('sin', {0.0}) == 0.0 ]]))
exec([[ exec([[