mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
docs: misc (#33093)
Co-authored-by: Jx <JxJxxJxJ@github.com> Co-authored-by: Richard Dzenis <richard@dzenis.dev> Co-authored-by: Shixian Sheng <shixian_sheng-2@protonmail.com> Co-authored-by: Sourabh Kumar <sourabh7.tech@gmail.com> Co-authored-by: Yegor Yefremov <yegorslists@googlemail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
2
.github/workflows/notes.md
vendored
2
.github/workflows/notes.md
vendored
@ -36,7 +36,7 @@ Note: On Windows "Server" you may need to [install vcruntime140.dll](https://lea
|
|||||||
|
|
||||||
### Linux (x86_64)
|
### Linux (x86_64)
|
||||||
|
|
||||||
If your system does not have the [required glibc version](https://neovim.io/doc/user/support.html#supported-platforms), try the (unsupported) [builds for older glibc](https://github.com/neovim/neovim-releases).
|
If your system does not have the required glibc version, try the (unsupported) [builds for older glibc](https://github.com/neovim/neovim-releases).
|
||||||
|
|
||||||
#### AppImage
|
#### AppImage
|
||||||
|
|
||||||
|
2
BUILD.md
2
BUILD.md
@ -223,7 +223,7 @@ rebuild:
|
|||||||
|
|
||||||
## Third-party dependencies
|
## Third-party dependencies
|
||||||
|
|
||||||
Reference the [Debian package](https://packages.debian.org/sid/source/neovim) (or alternatively, the [Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/neovim.rb)) for the precise list of dependencies/versions.
|
Reference the [Debian package](https://packages.debian.org/sid/source/neovim) (or alternatively, the [Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/n/neovim.rb)) for the precise list of dependencies/versions.
|
||||||
|
|
||||||
To build the bundled dependencies using CMake:
|
To build the bundled dependencies using CMake:
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ Several Neovim GUIs are available from scoop (extras): [scoop.sh/#/apps?q=neovim
|
|||||||
|
|
||||||
- Add the `bin` folder (e.g. `C:\Program Files\nvim\bin`) to your PATH.
|
- Add the `bin` folder (e.g. `C:\Program Files\nvim\bin`) to your PATH.
|
||||||
- This makes it easy to run `nvim` from anywhere.
|
- This makes it easy to run `nvim` from anywhere.
|
||||||
- If `:set spell` does not work, create the `C:/Users/foo/AppData/Local/nvim/site/spell` folder.
|
- If `:set spell` does not work, create the `%LOCALAPPDATA%/nvim-data/site/spell` folder.
|
||||||
You can then copy your spell files over (for English, located
|
You can then copy your spell files over (for English, located
|
||||||
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.spl) and
|
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.spl) and
|
||||||
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.sug));
|
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.sug));
|
||||||
|
@ -81,7 +81,7 @@ When a (non-experimental) feature is slated to be removed it should:
|
|||||||
as described for Lua features.
|
as described for Lua features.
|
||||||
- `vim.deprecate(…, 'x.y.z')` where major version `x` is greater than the
|
- `vim.deprecate(…, 'x.y.z')` where major version `x` is greater than the
|
||||||
current Nvim major version, is always treated as _soft_ deprecation.
|
current Nvim major version, is always treated as _soft_ deprecation.
|
||||||
2. Be _hard_ deprecated in a following a release in which it was soft deprecated.
|
2. Be _hard_ deprecated in a release following the release in which it was soft deprecated.
|
||||||
- Use of the deprecated feature will still work but should issue a warning.
|
- Use of the deprecated feature will still work but should issue a warning.
|
||||||
- Features implemented in C will need bespoke implementations to communicate
|
- Features implemented in C will need bespoke implementations to communicate
|
||||||
to users that the feature is deprecated.
|
to users that the feature is deprecated.
|
||||||
|
@ -122,7 +122,6 @@ Let's assume you have the following directory structure:
|
|||||||
|-- syntax/
|
|-- syntax/
|
||||||
|-- init.vim
|
|-- init.vim
|
||||||
<
|
<
|
||||||
|
|
||||||
Then the following Lua code will load `myluamodule.lua`:
|
Then the following Lua code will load `myluamodule.lua`:
|
||||||
>lua
|
>lua
|
||||||
require("myluamodule")
|
require("myluamodule")
|
||||||
@ -135,7 +134,6 @@ Similarly, loading `other_modules/anothermodule.lua` is done via
|
|||||||
-- or
|
-- or
|
||||||
require('other_modules.anothermodule')
|
require('other_modules.anothermodule')
|
||||||
<
|
<
|
||||||
|
|
||||||
Note how "submodules" are just subdirectories; the `.` is equivalent to the
|
Note how "submodules" are just subdirectories; the `.` is equivalent to the
|
||||||
path separator `/` (even on Windows).
|
path separator `/` (even on Windows).
|
||||||
|
|
||||||
@ -531,7 +529,6 @@ Examples:
|
|||||||
callback = function() print("My Plugin Works!") end,
|
callback = function() print("My Plugin Works!") end,
|
||||||
})
|
})
|
||||||
<
|
<
|
||||||
|
|
||||||
Nvim will always call a Lua function with a single table containing information
|
Nvim will always call a Lua function with a single table containing information
|
||||||
about the triggered autocommand. The most useful keys are
|
about the triggered autocommand. The most useful keys are
|
||||||
• `match`: a string that matched the `pattern` (see |<amatch>|)
|
• `match`: a string that matched the `pattern` (see |<amatch>|)
|
||||||
|
@ -122,10 +122,6 @@ OPTIONS
|
|||||||
• Setting |hidden-options| now gives an error. In particular, setting
|
• Setting |hidden-options| now gives an error. In particular, setting
|
||||||
'noshellslash' is now only allowed on Windows.
|
'noshellslash' is now only allowed on Windows.
|
||||||
|
|
||||||
PLUGINS
|
|
||||||
|
|
||||||
• TODO
|
|
||||||
|
|
||||||
TREESITTER
|
TREESITTER
|
||||||
|
|
||||||
• |Query:iter_matches()| correctly returns all matching nodes in a match
|
• |Query:iter_matches()| correctly returns all matching nodes in a match
|
||||||
@ -139,12 +135,11 @@ TREESITTER
|
|||||||
if no languages are explicitly registered.
|
if no languages are explicitly registered.
|
||||||
• |vim.treesitter.language.add()| returns `true` if a parser was loaded
|
• |vim.treesitter.language.add()| returns `true` if a parser was loaded
|
||||||
successfully and `nil,errmsg` otherwise instead of throwing an error.
|
successfully and `nil,errmsg` otherwise instead of throwing an error.
|
||||||
• |vim.treesitter.get_parser()| and |vim.treesitter.start()| no longer parse
|
• |vim.treesitter.get_parser()| and |vim.treesitter.start()| no longer parse the
|
||||||
the tree before returning. Scripts must call |LanguageTree:parse()| explicitly. >lua
|
tree before returning. Scripts must call |LanguageTree:parse()| explicitly. >lua
|
||||||
local p = vim.treesitter.get_parser(0, 'c')
|
local p = vim.treesitter.get_parser(0, 'c')
|
||||||
p:parse()
|
p:parse()
|
||||||
• |vim.treesitter.get_parser()| expects its buffer to be loaded.
|
• |vim.treesitter.get_parser()| expects its buffer to be loaded.
|
||||||
<
|
|
||||||
|
|
||||||
TUI
|
TUI
|
||||||
|
|
||||||
@ -179,7 +174,6 @@ API
|
|||||||
aligned text that truncates before covering up buffer text.
|
aligned text that truncates before covering up buffer text.
|
||||||
• `virt_lines_overflow` field accepts value `scroll` to enable horizontal
|
• `virt_lines_overflow` field accepts value `scroll` to enable horizontal
|
||||||
scrolling for virtual lines with 'nowrap'.
|
scrolling for virtual lines with 'nowrap'.
|
||||||
• |vim.hl.range()| now has a optional `timeout` field which allows for a timed highlight
|
|
||||||
|
|
||||||
DEFAULTS
|
DEFAULTS
|
||||||
|
|
||||||
@ -245,8 +239,7 @@ EDITOR
|
|||||||
• |hl-ComplMatchIns| shows matched text of the currently inserted completion.
|
• |hl-ComplMatchIns| shows matched text of the currently inserted completion.
|
||||||
• |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup.
|
• |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup.
|
||||||
• |gO| now works in `help`, `checkhealth`, and `markdown` buffers.
|
• |gO| now works in `help`, `checkhealth`, and `markdown` buffers.
|
||||||
• Jump between sections in `help` and `checkhealth` buffers with `[[` and
|
• Jump between sections in `help` and `checkhealth` buffers with `[[` and `]]`.
|
||||||
`]]`.
|
|
||||||
|
|
||||||
EVENTS
|
EVENTS
|
||||||
|
|
||||||
@ -305,6 +298,8 @@ LUA
|
|||||||
• |vim.fs.relpath()| gets relative path compared to base path.
|
• |vim.fs.relpath()| gets relative path compared to base path.
|
||||||
• |vim.fs.dir()| and |vim.fs.find()| can now follow symbolic links,
|
• |vim.fs.dir()| and |vim.fs.find()| can now follow symbolic links,
|
||||||
the behavior can be turn on using the new `follow` option.
|
the behavior can be turn on using the new `follow` option.
|
||||||
|
• |vim.hl.range()| now has a optional `timeout` field which allows for a timed
|
||||||
|
highlight.
|
||||||
• |vim.text.indent()| indents/dedents text.
|
• |vim.text.indent()| indents/dedents text.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
@ -315,7 +310,7 @@ OPTIONS
|
|||||||
• 'messagesopt' configures |:messages| and |hit-enter| prompt.
|
• 'messagesopt' configures |:messages| and |hit-enter| prompt.
|
||||||
• 'tabclose' controls which tab page to focus when closing a tab page.
|
• 'tabclose' controls which tab page to focus when closing a tab page.
|
||||||
• 'eventignorewin' to persistently ignore events in a window.
|
• 'eventignorewin' to persistently ignore events in a window.
|
||||||
• 'winborder' sets the default border for |floating-windows|
|
• 'winborder' sets the default border for |floating-windows|.
|
||||||
|
|
||||||
PERFORMANCE
|
PERFORMANCE
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ EVENTS
|
|||||||
|
|
||||||
HIGHLIGHTS
|
HIGHLIGHTS
|
||||||
|
|
||||||
• |hl-DiffTextAdd| highlights added text within a changed line.
|
• todo
|
||||||
|
|
||||||
LSP
|
LSP
|
||||||
|
|
||||||
@ -125,6 +125,10 @@ EVENTS
|
|||||||
|
|
||||||
• todo
|
• todo
|
||||||
|
|
||||||
|
HIGHLIGHTS
|
||||||
|
|
||||||
|
• |hl-DiffTextAdd| highlights added text within a changed line.
|
||||||
|
|
||||||
LSP
|
LSP
|
||||||
|
|
||||||
• |vim.lsp.ClientConfig| gained `workspace_required`.
|
• |vim.lsp.ClientConfig| gained `workspace_required`.
|
||||||
@ -135,9 +139,11 @@ LUA
|
|||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
|
||||||
|
• 'autowriteall' writes all buffers upon receiving `SIGHUP`, `SIGQUIT` or `SIGTSTP`.
|
||||||
• 'completefuzzycollect' enables fuzzy collection of candidates for (some)
|
• 'completefuzzycollect' enables fuzzy collection of candidates for (some)
|
||||||
|ins-completion| modes.
|
|ins-completion| modes.
|
||||||
• 'autowriteall' write all buffers upon receiving `SIGHUP`, `SIGQUIT` or `SIGTSTP`.
|
• 'diffopt' `inline:` configures diff highlighting for changes within a line.
|
||||||
|
• 'pummaxwidth' sets maximum width for the completion popup menu.
|
||||||
• 'winborder' "bold" style.
|
• 'winborder' "bold" style.
|
||||||
• |g:clipboard| accepts a string name to force any builtin clipboard tool.
|
• |g:clipboard| accepts a string name to force any builtin clipboard tool.
|
||||||
|
|
||||||
|
2
src/cjson/lua_cjson.c
vendored
2
src/cjson/lua_cjson.c
vendored
@ -844,7 +844,7 @@ static void json_append_object(lua_State *l, json_encode_t *ctx,
|
|||||||
strbuf_append_char(json, '}');
|
strbuf_append_char(json, '}');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Serialise Lua data into JSON string. Return 1 if error an error happend, else 0 */
|
/* Serialise Lua data into JSON string. Return 1 if an error happened, else 0. */
|
||||||
static int json_append_data(lua_State *l, json_encode_t *ctx,
|
static int json_append_data(lua_State *l, json_encode_t *ctx,
|
||||||
int current_depth)
|
int current_depth)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user