chore: fix typos (#16816)

Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
dundargoc 2022-01-04 19:07:40 +01:00 committed by GitHub
parent d6f0c9539c
commit 0b0c4f7dfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 38 additions and 35 deletions

View File

@ -171,7 +171,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup commom environment variables
- name: Setup common environment variables
run: ./.github/workflows/env.sh ${{ matrix.flavor }}
- name: Install apt packages

View File

@ -45,7 +45,7 @@ start with a TCP/IP socket instead, use |--listen| with a TCP-style address: >
More endpoints can be started with |serverstart()|.
Note that localhost TCP sockets are generally less secure than named pipes,
and can lead to vunerabilities like remote code execution.
and can lead to vulnerabilities like remote code execution.
Connecting to the socket is the easiest way a programmer can test the API,
which can be done through any msgpack-rpc client library or full-featured
@ -198,7 +198,7 @@ any of these approaches:
2. Start Nvim with |--api-info|. Useful for statically-compiled clients.
Example (requires Python "pyyaml" and "msgpack-python" modules): >
nvim --api-info | python -c 'import msgpack, sys, yaml; print yaml.dump(msgpack.unpackb(sys.stdin.read()))'
nvim --api-info | python -c 'import msgpack, sys, yaml; yaml.dump(msgpack.unpackb(sys.stdin.buffer.read()), sys.stdout)'
<
3. Use the |api_info()| Vimscript function. >
:lua print(vim.inspect(vim.fn.api_info()))
@ -468,7 +468,7 @@ extmark position and enter some text, the extmark migrates forward. >
f o o z|b a r line (| = cursor)
4 extmark (after typing "z")
If an extmark is on the last index of a line and you inputsa newline at that
If an extmark is on the last index of a line and you inputs a newline at that
point, the extmark will accordingly migrate to the next line: >
f o o z b a r| line (| = cursor)
@ -674,7 +674,7 @@ nvim_add_user_command({name}, {command}, {*opts})
string options listed in |:command-complete|,
the "complete" key also accepts a Lua function
which works like the "customlist" completion
mode |:command-complete-customlist|.
mode |:command-completion-customlist|.
nvim_call_atomic({calls}) *nvim_call_atomic()*
Calls many API methods atomically.

View File

@ -44,7 +44,7 @@ functions like |chansend()| consume channel ids.
2. Reading and writing raw bytes *channel-bytes*
Channels opened by Vimscript functions operate with raw bytes by default. For
a job channel using RPC, bytes can still be read over its stderr. Similarily,
a job channel using RPC, bytes can still be read over its stderr. Similarly,
only bytes can be written to Nvim's own stderr.
*channel-callback*

View File

@ -105,7 +105,7 @@ in eval.c:
- eval_call_provider(name, method, arguments, discard): calls
provider#{name}#Call with the method and arguments. If discard is true, any
value returned by the provider will be discarded and and empty value be
value returned by the provider will be discarded and empty value will be
returned.
- eval_has_provider(name): Checks the `g:loaded_{name}_provider` variable
which must be set to 2 by the provider script to indicate that it is

View File

@ -60,7 +60,7 @@ The example will:
return nil
end
local dir = bufname
-- Just in case our algo is buggy, don't infinite loop.
-- Just in case our algorithm is buggy, don't infinite loop.
for _ = 1, 100 do
local did_change
dir, did_change = dirname(dir)

View File

@ -274,7 +274,7 @@ arguments separated by " " (space) instead of "\t" (tab).
lua << EOF
local linenr = vim.api.nvim_win_get_cursor(0)[1]
local curline = vim.api.nvim_buf_get_lines(
0, linenr, linenr + 1, false)[1]
0, linenr - 1, linenr, false)[1]
print(string.format("Current line [%d] has %d bytes",
linenr, #curline))
EOF

View File

@ -133,7 +133,7 @@ capabilities as if they had been in the terminfo definition.
If terminfo does not (yet) have this flag, Nvim will fall back to $TERM and
other environment variables. It will add constructed "setrgbf" and "setrgbb"
capabilities in the case of the the "rxvt", "linux", "st", "tmux", and "iterm"
capabilities in the case of the "rxvt", "linux", "st", "tmux", and "iterm"
terminal types, or when Konsole, genuine Xterm, a libvte terminal emulator
version 0.36 or later, or a terminal emulator that sets the COLORTERM
environment variable to "truecolor" is detected.

View File

@ -210,7 +210,7 @@ Here is a list of built-in predicates :
<
`match?` *ts-predicate-match?*
`vim-match?` *ts-predicate-vim-match?*
This will match if the provived vim regex matches the text
This will match if the provided vim regex matches the text
corresponding to a node : >
((identifier) @constant (#match? @constant "^[A-Z_]+$"))
< Note: the `^` and `$` anchors will respectively match the

View File

@ -897,7 +897,7 @@ function lsp.start_client(config)
client.initialized = true
uninitialized_clients[client_id] = nil
client.workspace_folders = workspace_folders
-- TODO(mjlbach): Backwards compatbility, to be removed in 0.7
-- TODO(mjlbach): Backwards compatibility, to be removed in 0.7
client.workspaceFolders = client.workspace_folders
client.server_capabilities = assert(result.capabilities, "initialize result doesn't contain capabilities")
-- These are the cleaned up capabilities we use for dynamically deciding

View File

@ -453,7 +453,7 @@ end
--- Send request to the server to resolve document highlights for the current
--- text document position. This request can be triggered by a key mapping or
--- by events such as `CursorHold`, eg:
--- by events such as `CursorHold`, e.g.:
---
--- <pre>
--- autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()

View File

@ -298,7 +298,7 @@ end
---@private
-- rangelength depends on the offset encoding
-- bytes for utf-8 (clangd with extenion)
-- bytes for utf-8 (clangd with extension)
-- codepoints for utf-16
-- codeunits for utf-32
-- Line endings count here as 2 chars for \r\n (dos), 1 char for \n (unix), and 1 char for \r (mac)

View File

@ -77,7 +77,7 @@ end
--- Determines whether this tree is valid.
--- If the tree is invalid, `parse()` must be called
--- to get the an updated tree.
--- to get the updated tree.
function LanguageTree:is_valid()
return self._valid
end

View File

@ -383,7 +383,7 @@ error:
/// @param str String to be converted.
/// @param from_part Legacy Vim parameter. Usually true.
/// @param do_lt Also translate <lt>. Ignored if `special` is false.
/// @param special Replace |keycodes|, e.g. <CR> becomes a "\n" char.
/// @param special Replace |keycodes|, e.g. <CR> becomes a "\r" char.
/// @see replace_termcodes
/// @see cpoptions
String nvim_replace_termcodes(String str, Boolean from_part, Boolean do_lt, Boolean special)
@ -1163,7 +1163,7 @@ static void term_close(void *data)
/// Send data to channel `id`. For a job, it writes it to the
/// stdin of the process. For the stdio channel |channel-stdio|,
/// it writes to Nvim's stdout. For an internal terminal instance
/// (|nvim_open_term()|) it writes directly to terimal output.
/// (|nvim_open_term()|) it writes directly to terminal output.
/// See |channel-bytes| for more information.
///
/// This function writes raw data, not RPC messages. If the channel
@ -2394,11 +2394,14 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
/// - mods: (string) Command modifiers, if any |<mods>|
/// @param opts Optional command attributes. See |command-attributes| for more details. To use
/// boolean attributes (such as |:command-bang| or |:command-bar|) set the value to
/// "true". When using a Lua function for {command} you can also provide a "desc"
/// key that will be displayed when listing commands. In addition to the string
/// options listed in |:command-complete|, the "complete" key also accepts a Lua
/// function which works like the "customlist" completion mode
/// |:command-complete-customlist|.
/// "true". In addition to the string options listed in |:command-complete|, the
/// "complete" key also accepts a Lua function which works like the "customlist"
/// completion mode |:command-completion-customlist|.
///
/// Additional parameters.
/// - desc: (string) Used for listing the command when a Lua function is used for
/// {command}.
/// - force: (boolean) Override any previous definition.
/// @param[out] err Error details, if any.
void nvim_add_user_command(String name, Object command, Dict(user_command) *opts, Error *err)
FUNC_API_SINCE(9)

View File

@ -411,7 +411,7 @@ return {
},
{
full_name='compatible', abbreviation='cp',
short_desc=N_("No description"),
short_desc=N_("No description"),
type='bool', scope={'global'},
redraw={'all_windows'},
varname='p_force_off',
@ -665,14 +665,14 @@ return {
},
{
full_name='edcompatible', abbreviation='ed',
short_desc=N_("No description"),
short_desc=N_("No description"),
type='bool', scope={'global'},
varname='p_force_off',
defaults={if_true=false}
},
{
full_name='emoji', abbreviation='emo',
short_desc=N_("No description"),
short_desc=N_("No description"),
type='bool', scope={'global'},
redraw={'all_windows', 'ui_option'},
varname='p_emoji',
@ -1184,7 +1184,7 @@ return {
},
{
full_name='inccommand', abbreviation='icm',
short_desc=N_("Live preview of substitution"),
short_desc=N_("Live preview of substitution"),
type='string', scope={'global'},
redraw={'all_windows'},
varname='p_icm',
@ -2499,7 +2499,7 @@ return {
},
{
full_name='termencoding', abbreviation='tenc',
short_desc=N_("Terminal encodig"),
short_desc=N_("Terminal encoding"),
type='string', scope={'global'},
defaults={if_true=""}
},
@ -2622,7 +2622,7 @@ return {
},
{
full_name='ttyfast', abbreviation='tf',
short_desc=N_("No description"),
short_desc=N_("No description"),
type='bool', scope={'global'},
no_mkrc=true,
varname='p_force_on',

View File

@ -1536,7 +1536,7 @@ static inline void east_set_error(const ParserState *const pstate, ExprASTError
/* TODO(ZyX-I): Extend syntax to allow ${expr}. This is needed to */ \
/* handle environment variables like those bash uses for */ \
/* `export -f`: their names consist not only of alphanumeric */ \
/* characetrs. */ \
/* characters. */ \
case kExprNodeComplexIdentifier: \
case kExprNodePlainIdentifier: \
case kExprNodeCurlyBracesIdentifier: { \

View File

@ -57,7 +57,7 @@ typedef enum {
} LexExprTokenType;
typedef enum {
kExprCmpEqual, ///< Equality, unequality.
kExprCmpEqual, ///< Equality, inequality.
kExprCmpMatches, ///< Matches regex, not matches regex.
kExprCmpGreater, ///< `>` or `<=`
kExprCmpGreaterOrEqual, ///< `>=` or `<`.

View File

@ -463,7 +463,7 @@ describe('vim_str2nr()', function()
test_vim_str2nr("1'2'3'4", flags, {len = 7, num = 1234, unum = 1234, pre = 0}, 0)
-- counter-intuitive, but like Vim, strict=true should partially accept
-- these: (' and - are not alpha-numeric)
-- these: (' and - are not alphanumeric)
test_vim_str2nr("7''331", flags, {len = 1, num = 7, unum = 7, pre = 0}, 0)
test_vim_str2nr("123'x4", flags, {len = 3, num = 123, unum = 123, pre = 0}, 0)
test_vim_str2nr("1337'", flags, {len = 4, num = 1337, unum = 1337, pre = 0}, 0)

View File

@ -18,7 +18,7 @@ local growsize = 95
-- constructing a class wrapper around garray. It could for example associate
-- ga_clear_strings to the underlying garray cdata if the garray is a string
-- array. But for now I estimate that that kind of magic might make testing
-- less "transparant" (i.e.: the interface would become quite different as to
-- less "transparent" (i.e.: the interface would become quite different as to
-- how one would use it from C.
-- accessors

View File

@ -191,7 +191,7 @@ describe('env.c', function()
if ffi.abi('64bit') then
-- couldn't use a bigger number because it gets converted to
-- double somewere, should be big enough anyway
-- double somewhere, should be big enough anyway
-- maxuint64 = ffi.new 'size_t', 18446744073709551615
local maxuint64 = ffi.new('size_t', 18446744073709000000)
eq(NULL, cimp.os_getenvname_at_index(maxuint64))

View File

@ -1029,7 +1029,7 @@ describe('fs.c', function()
itp('returns the correct blocksize of a file', function()
local path = 'unit-test-directory/test.file'
-- there is a bug in luafilesystem where
-- `lfs.attributes path, 'blksize'` returns the worng value:
-- `lfs.attributes path, 'blksize'` returns the wrong value:
-- https://github.com/keplerproject/luafilesystem/pull/44
-- using this workaround for now:
local blksize = lfs.attributes(path).blksize
@ -1038,7 +1038,7 @@ describe('fs.c', function()
if blksize then
eq(blksize, fs.os_fileinfo_blocksize(info))
else
-- luafs dosn't support blksize on windows
-- luafs doesn't support blksize on windows
-- libuv on windows returns a constant value as blocksize
-- checking for this constant value should be enough
eq(2048, fs.os_fileinfo_blocksize(info))