docs: fix typos (#21427)

Co-authored-by: Gustavo Sampaio <gbritosampaio@gmail.com>
Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Tomas Nemec <nemi@skaut.cz>
This commit is contained in:
dundargoc 2023-01-04 00:38:48 +01:00 committed by GitHub
parent 5529b07316
commit 936e191fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 22 deletions

View File

@ -728,7 +728,7 @@ nvim_echo({chunks}, {history}, {*opts}) *nvim_echo()*
• {opts} Optional parameters. • {opts} Optional parameters.
• verbose: Message was printed as a result of 'verbose' • verbose: Message was printed as a result of 'verbose'
option if Nvim was invoked with -V3log_file, the message option if Nvim was invoked with -V3log_file, the message
will be redirected to the log_file and surpressed from will be redirected to the log_file and suppressed from
direct output. direct output.
nvim_err_write({str}) *nvim_err_write()* nvim_err_write({str}) *nvim_err_write()*
@ -2549,7 +2549,7 @@ nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {opts})
-- Create new extmark at line 1, column 1. -- Create new extmark at line 1, column 1.
local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {}) local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {})
-- Create new extmark at line 3, column 1. -- Create new extmark at line 3, column 1.
local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, {}) local m2 = a.nvim_buf_set_extmark(0, ns, 2, 0, {})
-- Get extmarks only from line 3. -- Get extmarks only from line 3.
local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {}) local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
-- Get all marks in this buffer + namespace. -- Get all marks in this buffer + namespace.

View File

@ -285,7 +285,7 @@ work:
Instead, you need to create an intermediate Lua table and change this: Instead, you need to create an intermediate Lua table and change this:
>lua >lua
local temp_table = vim.g.some_global_variable local temp_table = vim.g.some_global_variable
temp_table = keys = 400 temp_table.key2 = 400
vim.g.some_global_variable = temp_table vim.g.some_global_variable = temp_table
vim.pretty_print(vim.g.some_global_variable) vim.pretty_print(vim.g.some_global_variable)
--> { key1 = "value", key2 = 400 } --> { key1 = "value", key2 = 400 }
@ -408,7 +408,7 @@ mandatory arguments:
• {lhs} is a string with the key sequences that should trigger the mapping. • {lhs} is a string with the key sequences that should trigger the mapping.
An empty string is equivalent to |<Nop>|, which disables a key. An empty string is equivalent to |<Nop>|, which disables a key.
• {rhs} is either a string with a Vim command or a Lua function that should • {rhs} is either a string with a Vim command or a Lua function that should
be execucted when the {lhs} is entered. be executed when the {lhs} is entered.
Examples: Examples:
>lua >lua
@ -608,25 +608,25 @@ may be reloaded is
This is equivalent to the following Lua code: This is equivalent to the following Lua code:
>lua >lua
local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = true }) local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = true })
vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, {
pattern = '*.html', pattern = '*.html',
group = mygroup, group = mygroup,
cmd = 'set shiftwidth=4', command = 'set shiftwidth=4',
}) })
vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, {
pattern = '*.html', pattern = '*.html',
group = 'vimrc', -- equivalent to group=mygroup group = 'vimrc', -- equivalent to group=mygroup
cmd = 'set expandtab', command = 'set expandtab',
}) })
< <
Autocommand groups are unique for a given name, so you can reuse them, e.g., Autocommand groups are unique for a given name, so you can reuse them, e.g.,
in a different file: in a different file:
>lua >lua
local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = false }) local mygroup = vim.api.nvim_create_augroup('vimrc', { clear = false })
vim.api.nvim_create_autocmd( {'BufNewFile', 'BufRead' }, { vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, {
pattern = '*.html', pattern = '*.html',
group = mygroup, group = mygroup,
cmd = 'set shiftwidth=4', command = 'set shiftwidth=4',
}) })
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

View File

@ -60,7 +60,7 @@ The following new APIs or features were added.
• Added a |vim.lsp.codelens.clear()| function to clear codelenses. • Added a |vim.lsp.codelens.clear()| function to clear codelenses.
• |vim.inspect_pos()|, |vim.show_pos()| and |:Inspect| allow a user to get or show items • |vim.inspect_pos()|, |vim.show_pos()| and |:Inspect| allow a user to get or show items
at a given buffer postion. Currently this includes treesitter captures, at a given buffer position. Currently this includes treesitter captures,
semantic tokens, syntax groups and extmarks. semantic tokens, syntax groups and extmarks.
• Added support for semantic token highlighting to the LSP client. This • Added support for semantic token highlighting to the LSP client. This
@ -124,7 +124,7 @@ The following new APIs or features were added.
• |--remote-ui| option was added to connect to a remote instance and display • |--remote-ui| option was added to connect to a remote instance and display
in it in a |TUI| in the local terminal. This can be used run a headless nvim in it in a |TUI| in the local terminal. This can be used run a headless nvim
instance in the background and display its UI on demand, which previously instance in the background and display its UI on demand, which previously
only was possible usiing a external UI implementation. only was possible using an external UI implementation.
============================================================================== ==============================================================================
CHANGED FEATURES *news-changes* CHANGED FEATURES *news-changes*
@ -140,7 +140,7 @@ The following changes to existing APIs or features add new behavior.
Previously, the TUI could be disabled as a build time feature (+tui/-tui), Previously, the TUI could be disabled as a build time feature (+tui/-tui),
resulting in a nvim binary which only could be run headless or embedded resulting in a nvim binary which only could be run headless or embedded
in an external process. As of this version, TUI is always avalibale. in an external process. As of this version, TUI is always available.
============================================================================== ==============================================================================
REMOVED FEATURES *news-removed* REMOVED FEATURES *news-removed*

View File

@ -1265,7 +1265,7 @@ The .NET CLI compiler outputs both errors and warnings by default. The output
may be limited to include only errors, by setting the g:dotnet_errors_only may be limited to include only errors, by setting the g:dotnet_errors_only
variable to |v:true|. variable to |v:true|.
The associated project name is included in each error and warning. To supress The associated project name is included in each error and warning. To suppress
the project name, set the g:dotnet_show_project_file variable to |v:false|. the project name, set the g:dotnet_show_project_file variable to |v:false|.
Example: limit output to only display errors, and suppress the project name: > Example: limit output to only display errors, and suppress the project name: >

View File

@ -1,7 +1,7 @@
local M = {} local M = {}
local health = require('vim.health') local health = require('vim.health')
local suggest_faq = 'https://github.com/neovim/neovim/wiki/FAQ' local suggest_faq = 'https://github.com/neovim/neovim/wiki/Building-Neovim#optimized-builds'
local function check_runtime() local function check_runtime()
health.report_start('Runtime') health.report_start('Runtime')

View File

@ -271,7 +271,7 @@ ArrayOf(Integer) nvim_buf_get_extmark_by_id(Buffer buffer, Integer ns_id,
/// -- Create new extmark at line 1, column 1. /// -- Create new extmark at line 1, column 1.
/// local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {}) /// local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {})
/// -- Create new extmark at line 3, column 1. /// -- Create new extmark at line 3, column 1.
/// local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, {}) /// local m2 = a.nvim_buf_set_extmark(0, ns, 2, 0, {})
/// -- Get extmarks only from line 3. /// -- Get extmarks only from line 3.
/// local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {}) /// local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
/// -- Get all marks in this buffer + namespace. /// -- Get all marks in this buffer + namespace.

View File

@ -729,7 +729,7 @@ void nvim_set_vvar(String name, Object value, Error *err)
/// @param opts Optional parameters. /// @param opts Optional parameters.
/// - verbose: Message was printed as a result of 'verbose' option /// - verbose: Message was printed as a result of 'verbose' option
/// if Nvim was invoked with -V3log_file, the message will be /// if Nvim was invoked with -V3log_file, the message will be
/// redirected to the log_file and surpressed from direct output. /// redirected to the log_file and suppressed from direct output.
void nvim_echo(Array chunks, Boolean history, Dict(echo_opts) *opts, Error *err) void nvim_echo(Array chunks, Boolean history, Dict(echo_opts) *opts, Error *err)
FUNC_API_SINCE(7) FUNC_API_SINCE(7)
{ {

View File

@ -61,7 +61,7 @@ for i = 6, #arg do
functions[#functions + 1] = tmp[j] functions[#functions + 1] = tmp[j]
function_names[fn.name] = true function_names[fn.name] = true
if #fn.parameters >= 2 and fn.parameters[2][1] == 'Array' and fn.parameters[2][2] == 'uidata' then if #fn.parameters >= 2 and fn.parameters[2][1] == 'Array' and fn.parameters[2][2] == 'uidata' then
-- function recieves the "args" as a parameter -- function receives the "args" as a parameter
fn.receives_array_args = true fn.receives_array_args = true
-- remove the args parameter -- remove the args parameter
table.remove(fn.parameters, 2) table.remove(fn.parameters, 2)
@ -360,7 +360,7 @@ for i = 1, #functions do
if #args > 0 or fn.can_fail then if #args > 0 or fn.can_fail then
output:write('channel_id, ') output:write('channel_id, ')
if fn.receives_array_args then if fn.receives_array_args then
-- if the function recieves the array args, pass it the second argument -- if the function receives the array args, pass it the second argument
output:write('args, ') output:write('args, ')
end end
output:write(call_args) output:write(call_args)

View File

@ -5414,7 +5414,7 @@ static int check_window_scroll_resize(int *size_count, win_T **first_scroll_win,
int tot_skipcol = 0; int tot_skipcol = 0;
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
// Skip floating windows that do not have a snapshot (usually becuase they are newly-created), // Skip floating windows that do not have a snapshot (usually because they are newly-created),
// as unlike split windows, creating floating windows do not cause other windows to resize. // as unlike split windows, creating floating windows do not cause other windows to resize.
if (wp->w_floating && wp->w_last_topline == 0) { if (wp->w_floating && wp->w_last_topline == 0) {
wp->w_last_topline = wp->w_topline; wp->w_last_topline = wp->w_topline;

View File

@ -166,8 +166,8 @@ describe('memory usage', function()
local last = monitor_memory_usage(pid) local last = monitor_memory_usage(pid)
-- The usage may be a bit less than the last value, use 80%. -- The usage may be a bit less than the last value, use 80%.
-- Allow for 20% tolerance at the upper limit. That's very permissive, but -- Allow for 20% tolerance at the upper limit. That's very permissive, but
-- otherwise the test fails sometimes. On Sourcehut CI with FreeBSD we need to -- otherwise the test fails sometimes. On FreeBSD we need to be even much
-- be even much more permissive. -- more permissive.
local upper_multiplier = is_os('freebsd') and 19 or 12 local upper_multiplier = is_os('freebsd') and 19 or 12
local lower = before.last * 8 / 10 local lower = before.last * 8 / 10
local upper = load_adjust((after.max + (after.last - before.last)) * upper_multiplier / 10) local upper = load_adjust((after.max + (after.last - before.last)) * upper_multiplier / 10)