mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
Merge ae81de64d6
into deac7df80a
This commit is contained in:
commit
384f5cb1c7
7
.github/workflows/notes.md
vendored
7
.github/workflows/notes.md
vendored
@ -18,6 +18,8 @@ ${NVIM_VERSION}
|
||||
2. Run the MSI
|
||||
3. Run `nvim.exe` on your CLI of choice
|
||||
|
||||
Note: On Windows "Server" you may need to [install vcruntime140.dll](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170).
|
||||
|
||||
### macOS (x86_64)
|
||||
|
||||
1. Download **nvim-macos-x86_64.tar.gz**
|
||||
@ -34,11 +36,10 @@ ${NVIM_VERSION}
|
||||
|
||||
### Linux (x64)
|
||||
|
||||
Minimum glibc version to run these releases is 2.31. People requiring releases
|
||||
that work on older glibc versions can find them at
|
||||
https://github.com/neovim/neovim-releases.
|
||||
glibc 2.31 or newer is required. Or you may try the (unsupported) [builds for older glibc](https://github.com/neovim/neovim-releases).
|
||||
|
||||
#### AppImage
|
||||
|
||||
1. Download **nvim.appimage**
|
||||
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
|
||||
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
|
||||
|
@ -307,19 +307,25 @@ See also |dev-naming|.
|
||||
easier to inspect and print, and inherently compatible with all Lua plugins.
|
||||
(This guideline doesn't apply to opaque, non-data objects like `vim.cmd`.)
|
||||
- stdlib functions should follow these common patterns:
|
||||
- accept iterable instead of table
|
||||
- exception: in some cases iterable doesn't make sense, e.g. spair() sorts
|
||||
- Accept iterable instead of only table.
|
||||
- Exception: in some cases iterable doesn't make sense, e.g. spair() sorts
|
||||
the input by definition, so there is no reason for it to accept an
|
||||
iterable, because the input needs to be "reified"; it can't operate on
|
||||
a "stream".
|
||||
- return iterable instead of table
|
||||
- mimic the pairs() or ipairs() interface if the function is intended to be
|
||||
- Return iterable instead of table.
|
||||
- Mimic the pairs() or ipairs() interface if the function is intended to be
|
||||
used in a "for" loop.
|
||||
- when a result-or-error interface is needed, return `result|nil, nil|errmsg`: >
|
||||
---@return Foo|nil # Result object, or nil if not found.
|
||||
- When a result-or-error interface is needed, return `result|nil, nil|errmsg`: >
|
||||
|
||||
---@return Foo|nil # Result object, or nil if not found.
|
||||
---@return nil|string # Error message on failure, or nil on success.
|
||||
<
|
||||
- Examples: |vim.ui.open()| |io.open()| |luv-error-handling|
|
||||
- See also |lua-error-handling|
|
||||
- When to use this pattern: for functions where we explicitly "expect the
|
||||
unexpected", especially when communicating with the external world. For
|
||||
example, LSP requests must expect server errors, even if we did every
|
||||
thing right locally.
|
||||
|
||||
*dev-patterns*
|
||||
Interface conventions ~
|
||||
|
@ -67,7 +67,7 @@ See https://luajit.org/ext_profiler.html or the `p.lua` source for details: >
|
||||
==============================================================================
|
||||
LUA CONCEPTS AND IDIOMS *lua-concepts*
|
||||
|
||||
Lua is very simple: this means that, while there are some quirks, once you
|
||||
Lua is very simple, and _consistent_: while there are some quirks, once you
|
||||
internalize those quirks, everything works the same everywhere. Scopes
|
||||
(closures) in particular are very consistent, unlike JavaScript or most other
|
||||
languages.
|
||||
@ -85,6 +85,14 @@ https://www.lua.org/doc/cacm2018.pdf
|
||||
- Stackful coroutines enable cooperative multithreading, generators, and
|
||||
versatile control for both Lua and its host (Nvim).
|
||||
|
||||
*lua-error-handling*
|
||||
Lua functions may throw |lua-errors| for exceptional (unexpected) failures,
|
||||
which you can handle with |pcall()|. For "expected" failures, it's idiomatic
|
||||
to return `nil` which signals to the caller that errors are _expected_ and
|
||||
must be handled (See also |luv-error-handling|). When such a caller can't proceed, it's idiomatic to simply
|
||||
`assert()` the result: >lua
|
||||
local value = assert(fn())
|
||||
<
|
||||
*iterator*
|
||||
An iterator is just a function that can be called repeatedly to get the "next"
|
||||
value of a collection (or any other |iterable|). This interface is expected by
|
||||
|
@ -422,6 +422,10 @@ argument.
|
||||
Start |RPC| server on pipe or TCP address {addr}. Sets the
|
||||
primary listen address |v:servername| to {addr}. |serverstart()|
|
||||
|
||||
To start the server on-demand with systemd, use a systemd
|
||||
socket unit and associated service unit running: >
|
||||
systemd-socket-proxyd --exit-idle-time
|
||||
<
|
||||
==============================================================================
|
||||
Initialization *initialization* *startup*
|
||||
|
||||
|
@ -25,6 +25,9 @@ Note: Windows 10 "Version 1809" or later is required for |:terminal|. To check
|
||||
your Windows version, run the "winver" command and look for "Version xxxx"
|
||||
(NOT "OS Build").
|
||||
|
||||
Note: On Windows "Server" you may need to install vcruntime140.dll:
|
||||
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
|
||||
|
||||
Support types ~
|
||||
|
||||
* Tier 1: Officially supported and tested with CI. Any contributed patch
|
||||
|
@ -67,7 +67,7 @@ Defaults *nvim-defaults*
|
||||
- 'langremap' is disabled
|
||||
- 'laststatus' defaults to 2 (statusline is always shown)
|
||||
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
||||
- 'mouse' defaults to "nvi"
|
||||
- 'mouse' defaults to "nvi", see |default-mouse| for details
|
||||
- 'mousemodel' defaults to "popup_setpos"
|
||||
- 'nrformats' defaults to "bin,hex"
|
||||
- 'path' defaults to ".,,". The C ftplugin adds "/usr/include" if it exists.
|
||||
@ -101,12 +101,14 @@ Defaults *nvim-defaults*
|
||||
|
||||
DEFAULT MOUSE
|
||||
*default-mouse* *disable-mouse*
|
||||
By default the mouse is enabled, and <RightMouse> opens a |popup-menu| with
|
||||
standard actions ("Cut", "Copy", "Paste", …). Mouse is NOT enabled in
|
||||
|command-mode| or the |more-prompt|, so you can temporarily disable it just by
|
||||
typing ":".
|
||||
By default the mouse is enabled. This means |scroll-mouse-wheel| will scroll
|
||||
the window instead of moving the cursor; <LeftMouse> click places the cursor;
|
||||
and <RightMouse> click opens the default |popup-menu| with standard actions.
|
||||
|
||||
Mouse is NOT enabled in |command-mode| or the |more-prompt|, so you can
|
||||
temporarily disable it just by typing ":". Or if you want to partially or
|
||||
fully disable the mouse or popup-menu, do any of the following:
|
||||
|
||||
Or you can disable the popup-menu using any of the following:
|
||||
- Disable mouse completely by unsetting the 'mouse' option: >vim
|
||||
set mouse=
|
||||
- Change the 'mousemodel', so <RightMouse> extends selection instead of
|
||||
|
Loading…
Reference in New Issue
Block a user