mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
docs: fix typos (#18866)
docs: fix typos and similarly insignificant changes Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: kanreki <32443233+kanreki@users.noreply.github.com>
This commit is contained in:
@@ -99,7 +99,7 @@ To learn what capabilities are available you can run the following command in
|
|||||||
a buffer with a started LSP client:
|
a buffer with a started LSP client:
|
||||||
|
|
||||||
>
|
>
|
||||||
:lua =vim.lsp.get_active_clients()[1].server_capabilties
|
:lua =vim.lsp.get_active_clients()[1].server_capabilities
|
||||||
<
|
<
|
||||||
|
|
||||||
Full list of features provided by default can be found in |lsp-buf|.
|
Full list of features provided by default can be found in |lsp-buf|.
|
||||||
|
@@ -291,7 +291,7 @@ The Lua print() function redirects its output to the Nvim message area, with
|
|||||||
arguments separated by " " (space) instead of "\t" (tab).
|
arguments separated by " " (space) instead of "\t" (tab).
|
||||||
|
|
||||||
*:lua*
|
*:lua*
|
||||||
:[range]lua {chunk}
|
:lua {chunk}
|
||||||
Executes Lua chunk {chunk}.
|
Executes Lua chunk {chunk}.
|
||||||
If {chunk} starts with "=" the rest of the chunk is
|
If {chunk} starts with "=" the rest of the chunk is
|
||||||
evaluated as an expression and printed. `:lua =expr`
|
evaluated as an expression and printed. `:lua =expr`
|
||||||
@@ -304,7 +304,7 @@ arguments separated by " " (space) instead of "\t" (tab).
|
|||||||
:lua =jit.version
|
:lua =jit.version
|
||||||
<
|
<
|
||||||
*:lua-heredoc*
|
*:lua-heredoc*
|
||||||
:[range]lua << [endmarker]
|
:lua << [endmarker]
|
||||||
{script}
|
{script}
|
||||||
{endmarker}
|
{endmarker}
|
||||||
Executes Lua script {script} from within Vimscript.
|
Executes Lua script {script} from within Vimscript.
|
||||||
@@ -345,7 +345,7 @@ arguments separated by " " (space) instead of "\t" (tab).
|
|||||||
:luado if bp:match(line) then return "-->\t" .. line end
|
:luado if bp:match(line) then return "-->\t" .. line end
|
||||||
<
|
<
|
||||||
*:luafile*
|
*:luafile*
|
||||||
:[range]luafile {file}
|
:luafile {file}
|
||||||
Execute Lua script in {file}.
|
Execute Lua script in {file}.
|
||||||
The whole argument is used as the filename (like
|
The whole argument is used as the filename (like
|
||||||
|:edit|), spaces do not need to be escaped.
|
|:edit|), spaces do not need to be escaped.
|
||||||
|
@@ -708,7 +708,7 @@ local function on_code_action_results(results, ctx, options)
|
|||||||
end
|
end
|
||||||
local found = false
|
local found = false
|
||||||
for _, o in ipairs(options.context.only) do
|
for _, o in ipairs(options.context.only) do
|
||||||
-- action kinds are hierachical with . as a separator: when requesting only
|
-- action kinds are hierarchical with . as a separator: when requesting only
|
||||||
-- 'quickfix' this filter allows both 'quickfix' and 'quickfix.foo', for example
|
-- 'quickfix' this filter allows both 'quickfix' and 'quickfix.foo', for example
|
||||||
if a.kind:find('^' .. o .. '$') or a.kind:find('^' .. o .. '%.') then
|
if a.kind:find('^' .. o .. '$') or a.kind:find('^' .. o .. '%.') then
|
||||||
found = true
|
found = true
|
||||||
|
@@ -650,7 +650,7 @@ static bool string_iswhite(String str)
|
|||||||
// Found a non-whitespace character
|
// Found a non-whitespace character
|
||||||
return false;
|
return false;
|
||||||
} else if (str.data[i] == NUL) {
|
} else if (str.data[i] == NUL) {
|
||||||
// Terminate at first occurence of a NUL character
|
// Terminate at first occurrence of a NUL character
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -709,7 +709,7 @@ EXTERN typebuf_T typebuf INIT(= { NULL, NULL, 0, 0, 0, 0, 0, 0, 0 });
|
|||||||
EXTERN int ex_normal_busy INIT(= 0); // recursiveness of ex_normal()
|
EXTERN int ex_normal_busy INIT(= 0); // recursiveness of ex_normal()
|
||||||
EXTERN int ex_normal_lock INIT(= 0); // forbid use of ex_normal()
|
EXTERN int ex_normal_lock INIT(= 0); // forbid use of ex_normal()
|
||||||
EXTERN int ignore_script INIT(= false); // ignore script input
|
EXTERN int ignore_script INIT(= false); // ignore script input
|
||||||
EXTERN int stop_insert_mode; // for ":stopinsert" and 'insertmode'
|
EXTERN int stop_insert_mode; // for ":stopinsert"
|
||||||
EXTERN bool KeyTyped; // true if user typed current char
|
EXTERN bool KeyTyped; // true if user typed current char
|
||||||
EXTERN int KeyStuffed; // true if current char from stuffbuf
|
EXTERN int KeyStuffed; // true if current char from stuffbuf
|
||||||
EXTERN int maptick INIT(= 0); // tick for each non-mapped char
|
EXTERN int maptick INIT(= 0); // tick for each non-mapped char
|
||||||
|
@@ -529,7 +529,7 @@ void time_to_bytes(time_t time_, uint8_t buf[8])
|
|||||||
void arena_start(Arena *arena, ArenaMem *reuse_blk)
|
void arena_start(Arena *arena, ArenaMem *reuse_blk)
|
||||||
{
|
{
|
||||||
if (reuse_blk && *reuse_blk) {
|
if (reuse_blk && *reuse_blk) {
|
||||||
arena->cur_blk = (char *)*reuse_blk;
|
arena->cur_blk = (char *)(*reuse_blk);
|
||||||
*reuse_blk = NULL;
|
*reuse_blk = NULL;
|
||||||
} else {
|
} else {
|
||||||
arena->cur_blk = xmalloc(ARENA_BLOCK_SIZE);
|
arena->cur_blk = xmalloc(ARENA_BLOCK_SIZE);
|
||||||
|
@@ -453,7 +453,6 @@ static int add_menu_path(const char *const menu_path, vimmenu_T *menuarg, const
|
|||||||
if (c == Ctrl_C) {
|
if (c == Ctrl_C) {
|
||||||
int len = (int)STRLEN(menu->strings[i]);
|
int len = (int)STRLEN(menu->strings[i]);
|
||||||
|
|
||||||
// Append CTRL-\ CTRL-G to obey 'insertmode'.
|
|
||||||
menu->strings[i][len] = Ctrl_BSL;
|
menu->strings[i][len] = Ctrl_BSL;
|
||||||
menu->strings[i][len + 1] = Ctrl_G;
|
menu->strings[i][len + 1] = Ctrl_G;
|
||||||
menu->strings[i][len + 2] = NUL;
|
menu->strings[i][len + 2] = NUL;
|
||||||
|
@@ -998,9 +998,8 @@ static int normal_execute(VimState *state, int key)
|
|||||||
// In Select mode, typed text replaces the selection.
|
// In Select mode, typed text replaces the selection.
|
||||||
if (VIsual_active && VIsual_select && (vim_isprintc(s->c)
|
if (VIsual_active && VIsual_select && (vim_isprintc(s->c)
|
||||||
|| s->c == NL || s->c == CAR || s->c == K_KENTER)) {
|
|| s->c == NL || s->c == CAR || s->c == K_KENTER)) {
|
||||||
// Fake a "c"hange command. When "restart_edit" is set (e.g., because
|
// Fake a "c"hange command.
|
||||||
// 'insertmode' is set) fake a "d"elete command, Insert mode will
|
// When "restart_edit" is set fake a "d"elete command, Insert mode will restart automatically.
|
||||||
// restart automatically.
|
|
||||||
// Insert the typed character in the typeahead buffer, so that it can
|
// Insert the typed character in the typeahead buffer, so that it can
|
||||||
// be mapped in Insert mode. Required for ":lmap" to work.
|
// be mapped in Insert mode. Required for ":lmap" to work.
|
||||||
int len = ins_char_typebuf(vgetc_char, vgetc_mod_mask);
|
int len = ins_char_typebuf(vgetc_char, vgetc_mod_mask);
|
||||||
@@ -6772,8 +6771,6 @@ static void nv_esc(cmdarg_T *cap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't reset "restart_edit" when 'insertmode' is set, it won't be
|
|
||||||
// set again below when halfway through a mapping.
|
|
||||||
restart_edit = 0;
|
restart_edit = 0;
|
||||||
|
|
||||||
if (cmdwin_type != 0) {
|
if (cmdwin_type != 0) {
|
||||||
|
@@ -6666,9 +6666,8 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
|||||||
CancelRedo();
|
CancelRedo();
|
||||||
} else {
|
} else {
|
||||||
// This is a new edit command, not a restart. Need to
|
// This is a new edit command, not a restart. Need to
|
||||||
// remember it to make 'insertmode' work with mappings for
|
// remember it to make i_CTRL-O work with mappings for
|
||||||
// Visual mode. But do this only once and not when typed and
|
// Visual mode. But do this only once and not when typed.
|
||||||
// 'insertmode' isn't set.
|
|
||||||
if (!KeyTyped) {
|
if (!KeyTyped) {
|
||||||
restart_edit_save = restart_edit;
|
restart_edit_save = restart_edit;
|
||||||
} else {
|
} else {
|
||||||
@@ -6760,7 +6759,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
|
|||||||
CancelRedo();
|
CancelRedo();
|
||||||
} else {
|
} else {
|
||||||
// This is a new edit command, not a restart. Need to
|
// This is a new edit command, not a restart. Need to
|
||||||
// remember it to make 'insertmode' work with mappings for
|
// remember it to make i_CTRL-O work with mappings for
|
||||||
// Visual mode. But do this only once.
|
// Visual mode. But do this only once.
|
||||||
restart_edit_save = restart_edit;
|
restart_edit_save = restart_edit;
|
||||||
restart_edit = 0;
|
restart_edit = 0;
|
||||||
|
@@ -4593,7 +4593,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char *errbuf,
|
|||||||
} else if (pp == &curwin->w_p_nuw) {
|
} else if (pp == &curwin->w_p_nuw) {
|
||||||
curwin->w_nrwidth_line_count = 0;
|
curwin->w_nrwidth_line_count = 0;
|
||||||
} else if (pp == &curwin->w_p_winbl && value != old_value) {
|
} else if (pp == &curwin->w_p_winbl && value != old_value) {
|
||||||
// 'floatblend'
|
// 'winblend'
|
||||||
curwin->w_p_winbl = MAX(MIN(curwin->w_p_winbl, 100), 0);
|
curwin->w_p_winbl = MAX(MIN(curwin->w_p_winbl, 100), 0);
|
||||||
curwin->w_hl_needs_update = true;
|
curwin->w_hl_needs_update = true;
|
||||||
check_blending(curwin);
|
check_blending(curwin);
|
||||||
|
Reference in New Issue
Block a user