Skip to content

Commit 0f0f06d

Browse files
justinmkkeevan
authored andcommitted
docs: misc neovim#24163
- Also delete old perl scripts which are not used since 8+ years ago. fix neovim#23251 fix neovim#27367 ref neovim#2252 (comment) Helped-by: Daniel Kongsgaard <[email protected]> Co-authored-by: Kevin Pham <[email protected]>
1 parent 28fb76a commit 0f0f06d

25 files changed

+222
-348
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# CMAKE REFERENCE
2-
# intro: https://codingnest.com/basic-cmake/
3-
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
4-
# pitfalls: https://izzys.casa/2019/02/everything-you-never-wanted-to-know-about-cmake/
2+
# - intro: https://codingnest.com/basic-cmake/
3+
# - best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
4+
# - pitfalls: https://izzys.casa/2019/02/everything-you-never-wanted-to-know-about-cmake/
5+
# - troubleshooting:
6+
# - variable_watch https://cmake.org/cmake/help/latest/command/variable_watch.html
57

68
# Version should match the tested CMAKE_URL in .github/workflows/build.yml.
79
cmake_minimum_required(VERSION 3.13)
@@ -167,6 +169,7 @@ endif()
167169

168170
option(ENABLE_ASAN_UBSAN "Enable Clang address & undefined behavior sanitizer for nvim binary." OFF)
169171
option(ENABLE_MSAN "Enable Clang memory sanitizer for nvim binary." OFF)
172+
# TSAN exists to test Luv threads.
170173
option(ENABLE_TSAN "Enable Clang thread sanitizer for nvim binary." OFF)
171174

172175
if((ENABLE_ASAN_UBSAN AND ENABLE_MSAN)

CONTRIBUTING.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,36 @@ a comment.
8282
### Commit messages
8383

8484
Follow the [conventional commits guidelines][conventional_commits] to *make reviews easier* and to make
85-
the VCS/git logs more valuable. The general structure of a commit message is:
86-
87-
```
88-
<type>([optional scope]): <description>
89-
90-
[optional body]
91-
92-
[optional footer(s)]
93-
```
85+
the VCS/git logs more valuable. The structure of a commit message is:
86+
87+
type(scope): subject
88+
89+
Problem:
90+
...
91+
92+
Solution:
93+
...
94+
95+
- Commit message **subject** (you can **ignore this for "fixup" commits** or any commits you expect to be squashed):
96+
- Prefix with a [_type_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):
97+
- `build ci docs feat fix perf refactor revert test vim-patch`
98+
- Append an optional `(scope)` such as `(lsp)`, `(treesitter)`, `(float)`, …
99+
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
100+
- Keep it short (under 72 characters).
101+
- Commit message **body** (detail):
102+
- Concisely describe the Problem/Solution in the commit **body**. [Describing the problem](https://lamport.azurewebsites.net/pubs/state-the-problem.pdf)
103+
_independently of the solution_ often leads to a better understanding for you, reviewers, and future readers.
104+
```
105+
Problem:
106+
107+
Solution:
108+
```
109+
- Indicate breaking API changes with "!" after the type, and a "BREAKING CHANGE" footer. Example:
110+
```
111+
refactor(provider)!: drop support for Python 2
94112

95-
- Prefix the commit subject with one of these [_types_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json):
96-
- `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `test`, `vim-patch`
97-
- You can **ignore this for "fixup" commits** or any commits you expect to be squashed.
98-
- Append optional scope to _type_ such as `(lsp)`, `(treesitter)`, `(float)`, …
99-
- _Description_ shouldn't start with a capital letter or end in a period.
100-
- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug."
101-
- Try to keep the first line under 72 characters.
102-
- A blank line must follow the subject.
103-
- Breaking API changes must be indicated by
104-
1. "!" after the type/scope, and
105-
2. a "BREAKING CHANGE" footer describing the change.
106-
Example:
107-
```
108-
refactor(provider)!: drop support for Python 2
109-
110-
BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported.
111-
```
113+
BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported.
114+
```
112115
113116
### News
114117

MAINTAIN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,14 @@ These dependencies are "vendored" (inlined), we must update the sources manually
165165
* `runtime/lua/coxpcall.lua`: coxpcall (only needed for PUC lua, builtin to luajit)
166166
* `src/termkey`: [libtermkey](https://github.com/neovim/libtermkey)
167167

168-
Non-technical dependencies
168+
Other dependencies
169169
--------------------------
170170

171171
* GitHub users:
172172
* https://github.com/marvim
173173
* https://github.com/nvim-winget
174+
* Org secrets/tokens:
175+
* `CODECOV_TOKEN`
174176
* Domain names (held in https://namecheap.com):
175177
* neovim.org
176178
* neovim.io

runtime/doc/api.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ Basic types ~
112112
Dictionary (msgpack: map)
113113
Object
114114
<
115-
Note: empty Array is accepted as a valid argument for Dictionary parameter.
115+
Note:
116+
- Empty Array is accepted as a valid Dictionary parameter.
117+
- Functions cannot cross RPC boundaries. But API functions (e.g.
118+
|nvim_create_autocmd()|) may support Lua function parameters for non-RPC
119+
invocations.
116120

117121
Special types (msgpack EXT) ~
118122

@@ -504,8 +508,9 @@ Extended marks (extmarks) represent buffer annotations that track text changes
504508
in the buffer. They can represent cursors, folds, misspelled words, anything
505509
that needs to track a logical location in the buffer over time. |api-indexing|
506510

507-
Extmark position works like "bar" cursor: it exists between characters. Thus,
508-
the maximum extmark index on a line is 1 more than the character index: >
511+
Extmark position works like a "vertical bar" cursor: it exists between
512+
characters. Thus, the maximum extmark index on a line is 1 more than the
513+
character index: >
509514
510515
f o o b a r line contents
511516
0 1 2 3 4 5 character positions (0-based)
@@ -3447,7 +3452,8 @@ nvim_create_autocmd({event}, {opts}) *nvim_create_autocmd()*
34473452
Vimscript function name, if string) called when the
34483453
event(s) is triggered. Lua callback can return a truthy
34493454
value (not `false` or `nil`) to delete the autocommand.
3450-
Receives a table argument with these keys:
3455+
Receives one argument, a table with these keys:
3456+
*event-args*
34513457
• id: (number) autocommand id
34523458
• event: (string) name of the triggered event
34533459
|autocmd-events|
@@ -3456,7 +3462,7 @@ nvim_create_autocmd({event}, {opts}) *nvim_create_autocmd()*
34563462
• buf: (number) expanded value of <abuf>
34573463
• file: (string) expanded value of <afile>
34583464
• data: (any) arbitrary data passed from
3459-
|nvim_exec_autocmds()|
3465+
|nvim_exec_autocmds()| *event-data*
34603466
• command (string) optional: Vim command to execute on event.
34613467
Cannot be used with {callback}
34623468
• once (boolean) optional: defaults to false. Run the

runtime/doc/autocmd.txt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -903,18 +903,18 @@ ShellFilterPost After executing a shell command with
903903
":{range}!cmd", ":w !cmd" or ":r !cmd".
904904
Can be used to check for any changed files.
905905
*SourcePre*
906-
SourcePre Before sourcing a vim/lua file. |:source|
906+
SourcePre Before sourcing a Vimscript/Lua file. |:source|
907907
<afile> is the name of the file being sourced.
908908
*SourcePost*
909-
SourcePost After sourcing a vim/lua file. |:source|
909+
SourcePost After sourcing a Vimscript/Lua file. |:source|
910910
<afile> is the name of the file being sourced.
911911
Not triggered when sourcing was interrupted.
912912
Also triggered after a SourceCmd autocommand
913913
was triggered.
914914
*SourceCmd*
915-
SourceCmd When sourcing a vim/lua file. |:source|
915+
SourceCmd When sourcing a Vimscript/Lua file. |:source|
916916
<afile> is the name of the file being sourced.
917-
The autocommand must source this file.
917+
The autocommand must source that file.
918918
|Cmd-event|
919919
*SpellFileMissing*
920920
SpellFileMissing When trying to load a spell checking file and
@@ -989,18 +989,16 @@ TermClose When a |terminal| job ends.
989989
Sets these |v:event| keys:
990990
status
991991
*TermRequest*
992-
TermRequest When a |terminal| job emits an OSC or DCS
993-
sequence. Sets |v:termrequest|. When used from
994-
Lua, the request string is included in the
995-
"data" field of the autocommand callback.
992+
TermRequest When a |:terminal| child process emits an OSC
993+
or DCS sequence. Sets |v:termrequest|. The
994+
|event-data| is the request string.
996995
*TermResponse*
997996
TermResponse When Nvim receives an OSC or DCS response from
998-
the terminal. Sets |v:termresponse|. When used
999-
from Lua, the response string is included in
1000-
the "data" field of the autocommand callback.
1001-
May be triggered halfway through another event
1002-
(file I/O, a shell command, or anything else
1003-
that takes time). Example: >lua
997+
the host terminal. Sets |v:termresponse|. The
998+
|event-data| is the response string. May be
999+
triggered during another event (file I/O,
1000+
a shell command, or anything else that takes
1001+
time). Example: >lua
10041002

10051003
-- Query the terminal palette for the RGB value of color 1
10061004
-- (red) using OSC 4

runtime/doc/deprecated.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ LSP FUNCTIONS
148148
`progress` of |vim.lsp.Client|
149149
- *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()|
150150
- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()|
151-
- *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| and
152-
|vim.split()| with {plain=true} instead.
151+
- *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| instead: >
152+
local keys = vim.split(section, '.', { plain = true })
153+
local vim.tbl_get(table, unpack(keys))
153154
- *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead.
154155
- *vim.lsp.util.try_trim_markdown_code_blocks()*
155156
- *vim.lsp.util.set_lines()*
@@ -217,8 +218,10 @@ UI EXTENSIONS
217218
by the Nvim core directly instead of the TUI.
218219

219220
VARIABLES
220-
- *b:terminal_job_pid* PID of the top-level process in a |:terminal|.
221-
Use `jobpid(&channel)` instead.
221+
- *b:terminal_job_pid* Use `jobpid(&channel)` instead.
222+
- *b:terminal_job_id* Use `&channel` instead. To access in non-current buffer:
223+
- Lua: `vim.bo[bufnr].channel`
224+
- Vimscript: `getbufvar(bufnr, '&channel')`
222225

223226

224227
vim:noet:tw=78:ts=8:ft=help:norl:

runtime/doc/develop.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ External UIs are expected to implement these common features:
532532
published in this event. See also "mouse_on", "mouse_off".
533533
- UIs generally should NOT set |$NVIM_APPNAME| (unless explicitly requested by
534534
the user).
535+
- Support the text decorations/attributes given by |ui-event-hl_attr_define|.
536+
The "url" attr should be presented as a clickable hyperlink.
535537

536538

537539
vim:tw=78:ts=8:sw=4:et:ft=help:norl:

runtime/doc/lsp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ options are not restored when the LSP client is stopped or detached.
6161
- |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or
6262
a custom keymap for `K` exists.
6363

64-
*crr* *v_crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r*
64+
*crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r*
6565
Some keymaps are created unconditionally when Nvim starts:
6666
- "crn" is mapped in Normal mode to |vim.lsp.buf.rename()|
6767
- "crr" is mapped in Normal mode to |vim.lsp.buf.code_action()|

runtime/doc/lua.txt

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -592,24 +592,13 @@ A subset of the `vim.*` API is available in threads. This includes:
592592
==============================================================================
593593
VIM.HIGHLIGHT *vim.highlight*
594594

595-
Nvim includes a function for highlighting a selection on yank.
596-
597-
To enable it, add the following to your `init.vim`: >vim
598-
au TextYankPost * silent! lua vim.highlight.on_yank()
599-
<
600-
601-
You can customize the highlight group and the duration of the highlight via: >vim
602-
au TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=150}
603-
<
595+
vim.highlight.on_yank({opts}) *vim.highlight.on_yank()*
596+
Highlight the yanked text during a |TextYankPost| event.
604597

605-
If you want to exclude visual selections from highlighting on yank, use: >vim
606-
au TextYankPost * silent! lua vim.highlight.on_yank {on_visual=false}
598+
Add the following to your `init.vim`: >vim
599+
autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup='Visual', timeout=300}
607600
<
608601

609-
610-
vim.highlight.on_yank({opts}) *vim.highlight.on_yank()*
611-
Highlight the yanked text
612-
613602
Parameters: ~
614603
{opts} (`table?`) Optional parameters
615604
• higroup highlight group for yanked region (default
@@ -4002,18 +3991,22 @@ Iter:flatten({depth}) *Iter:flatten()*
40023991
(`Iter`)
40033992

40043993
Iter:fold({init}, {f}) *Iter:fold()*
4005-
Folds ("reduces") an iterator into a single value.
3994+
Folds ("reduces") an iterator into a single value. *Iter:reduce()*
40063995

40073996
Examples: >lua
40083997
-- Create a new table with only even values
4009-
local t = { a = 1, b = 2, c = 3, d = 4 }
4010-
local it = vim.iter(t)
4011-
it:filter(function(k, v) return v % 2 == 0 end)
4012-
it:fold({}, function(t, k, v)
4013-
t[k] = v
4014-
return t
4015-
end)
4016-
-- { b = 2, d = 4 }
3998+
vim.iter({ a = 1, b = 2, c = 3, d = 4 })
3999+
:filter(function(k, v) return v % 2 == 0 end)
4000+
:fold({}, function(acc, k, v)
4001+
acc[k] = v
4002+
return acc
4003+
end) --> { b = 2, d = 4 }
4004+
4005+
-- Get the "maximum" item of an iterable.
4006+
vim.iter({ -99, -4, 3, 42, 0, 0, 7 })
4007+
:fold({}, function(acc, v)
4008+
acc.max = math.max(v, acc.max or v) return acc
4009+
end) --> { max = 42 }
40174010
<
40184011

40194012
Parameters: ~

runtime/doc/news.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
NVIM REFERENCE MANUAL
55

66

7-
Notable changes in Nvim 0.10 from 0.9 *news*
7+
Notable changes since Nvim 0.9 *news*
88

9-
For changes in Nvim 0.9, see |news-0.9|.
9+
For changes in the previous release, see |news-0.9|.
1010

1111
Type |gO| to see the table of contents.
1212

@@ -148,8 +148,10 @@ The following changes may require adaptations in user config or plugins.
148148
==============================================================================
149149
BREAKING CHANGES IN HEAD *news-breaking-dev*
150150

151-
The following breaking changes were made during the development cycle to
152-
unreleased features on Nvim HEAD.
151+
====== Remove this section before release. ======
152+
153+
The following changes to UNRELEASED features were made during the development
154+
cycle (Nvim HEAD, the "master" branch).
153155

154156
• Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
155157
https://github.com/neovim/neovim/pull/20750
@@ -225,6 +227,8 @@ The following new APIs and features were added.
225227
swapfile is owned by a running Nvim process, instead of prompting. If you
226228
always want the swapfile dialog, delete the default SwapExists handler:
227229
`autocmd! nvim_swapfile`. |default-autocmds|
230+
• Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively
231+
when deleting buffers, and avoids "invalid buffer" cases. #25461
228232

229233
• LSP
230234
• LSP method names are available in |vim.lsp.protocol.Methods|.
@@ -368,9 +372,10 @@ The following new APIs and features were added.
368372

369373
|vim.version.le()| and |vim.version.ge()| are added to |vim.version|.
370374

371-
|extmarks| can be associated with a URL and URLs are included as a new
372-
highlight attribute. The TUI will display URLs using the OSC 8 control
373-
sequence, enabling clickable text in supporting terminals.
375+
|extmarks| can set a "url" highlight attribute, so the text region can
376+
become a clickable hyperlink (assuming UI support). The TUI renders URLs
377+
using the OSC 8 control sequence, enabling clickable text in supporting
378+
terminals.
374379

375380
• Added |nvim_tabpage_set_win()| to set the current window of a tabpage.
376381

0 commit comments

Comments
 (0)