mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
doc
- CMake features
This commit is contained in:
47
README.md
47
README.md
@@ -44,6 +44,15 @@ Features
|
|||||||
|
|
||||||
See [`:help nvim-features`][nvim-features] for the full list!
|
See [`:help nvim-features`][nvim-features] for the full list!
|
||||||
|
|
||||||
|
Install from package
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Pre-built packages for Windows, macOS, and Linux are found on the
|
||||||
|
[Releases](https://github.com/neovim/neovim/releases/) page.
|
||||||
|
|
||||||
|
Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo],
|
||||||
|
and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)!
|
||||||
|
|
||||||
Install from source
|
Install from source
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
@@ -55,26 +64,36 @@ To install to a non-default location, set `CMAKE_INSTALL_PREFIX`:
|
|||||||
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
|
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
|
||||||
make install
|
make install
|
||||||
|
|
||||||
To list all targets:
|
To skip bundled (`third-party/*`) dependencies:
|
||||||
|
|
||||||
cmake --build build --target help
|
1. Install the dependencies using a package manager.
|
||||||
|
```
|
||||||
|
sudo apt install gperf luajit luarocks libuv1-dev libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev libjemalloc-dev
|
||||||
|
sudo luarocks build mpack
|
||||||
|
sudo luarocks build lpeg
|
||||||
|
sudo luarocks build inspect
|
||||||
|
```
|
||||||
|
2. Build with `USE_BUNDLED=OFF`:
|
||||||
|
```
|
||||||
|
make CMAKE_BUILD_TYPE=RelWithDebInfo USE_BUNDLED=OFF
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
To skip "bundled" dependencies (`third-party/*`) define `USE_BUNDLED=NO`:
|
CMake features:
|
||||||
|
|
||||||
sudo apt install gperf libluajit-5.1-dev libunibilium-dev libmsgpack-dev libtermkey-dev libvterm-dev libjemalloc-dev
|
- List all build targets:
|
||||||
make USE_BUNDLED=NO
|
```
|
||||||
|
cmake --build build --target help
|
||||||
|
```
|
||||||
|
- Print all variable definitions:
|
||||||
|
```
|
||||||
|
cmake -LAH
|
||||||
|
```
|
||||||
|
- `build/CMakeCache.txt` contains the resolved values of all CMake variables.
|
||||||
|
- `build/compile_commands.json` shows the full compiler invocations for each translation unit.
|
||||||
|
|
||||||
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
|
See the [Building Neovim](https://github.com/neovim/neovim/wiki/Building-Neovim) wiki page for details.
|
||||||
|
|
||||||
Install from package
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
Pre-built packages for Windows, macOS, and Linux are found on the
|
|
||||||
[Releases](https://github.com/neovim/neovim/releases/) page.
|
|
||||||
|
|
||||||
Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo],
|
|
||||||
and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)!
|
|
||||||
|
|
||||||
Transitioning from Vim
|
Transitioning from Vim
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@@ -546,25 +546,24 @@ nvim_set_current_tabpage({tabpage}) *nvim_set_current_tabpage()*
|
|||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
|
|
||||||
nvim_create_namespace({name}) *nvim_create_namespace()*
|
nvim_create_namespace({name}) *nvim_create_namespace()*
|
||||||
create a new namespace, or get one with an exisiting name
|
Creates a new namespace, or gets an existing one
|
||||||
|
|
||||||
Namespaces are currently used for buffer highlighting and
|
Namespaces are used for buffer highlights and virtual text,
|
||||||
virtual text, see |nvim_buf_add_highlight| and
|
see |nvim_buf_add_highlight()| and
|
||||||
|nvim_buf_set_virtual_text|.
|
|nvim_buf_set_virtual_text()|.
|
||||||
|
|
||||||
Namespaces can have a name of be anonymous. If `name` is a
|
Namespaces can be named or anonymous. If `name` matches an
|
||||||
non-empty string, and a namespace already exists with that
|
existing namespace, the associated id is returned. If `name`
|
||||||
name,the existing namespace id is returned. If an empty string
|
is an empty string a new, anonymous namespace is created.
|
||||||
is used, a new anonymous namespace is returned.
|
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{name} Name of the namespace or empty string
|
{name} Namespace name or empty string
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
the namespace id
|
Namespace id
|
||||||
|
|
||||||
nvim_get_namespaces() *nvim_get_namespaces()*
|
nvim_get_namespaces() *nvim_get_namespaces()*
|
||||||
Get existing named namespaces
|
Gets existing, non-anonymous namespaces
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
dict that maps from names to namespace ids.
|
dict that maps from names to namespace ids.
|
||||||
|
@@ -137,6 +137,13 @@ DOCUMENTATION *dev-doc*
|
|||||||
"the user host terminal".
|
"the user host terminal".
|
||||||
- Use "tui-" to prefix help tags related to the host terminal, and "TUI"
|
- Use "tui-" to prefix help tags related to the host terminal, and "TUI"
|
||||||
in prose if possible.
|
in prose if possible.
|
||||||
|
- Docstrings: do not start parameter descriptions with "The" or "A" unless it
|
||||||
|
is critical to avoid ambiguity.
|
||||||
|
GOOD: >
|
||||||
|
/// @param dirname Path fragment before `pend`
|
||||||
|
< BAD: >
|
||||||
|
/// @param dirname The path fragment before `pend`
|
||||||
|
<
|
||||||
|
|
||||||
API *dev-api*
|
API *dev-api*
|
||||||
|
|
||||||
|
@@ -1886,8 +1886,6 @@ v:termresponse The escape sequence returned by the terminal for the DA
|
|||||||
|
|
||||||
*v:testing* *testing-variable*
|
*v:testing* *testing-variable*
|
||||||
v:testing Must be set before using `test_garbagecollect_now()`.
|
v:testing Must be set before using `test_garbagecollect_now()`.
|
||||||
Also, when set certain error messages won't be shown for 2
|
|
||||||
seconds. (e.g. "'dictionary' option is empty")
|
|
||||||
|
|
||||||
*v:this_session* *this_session-variable*
|
*v:this_session* *this_session-variable*
|
||||||
v:this_session Full filename of the last loaded or saved session file. See
|
v:this_session Full filename of the last loaded or saved session file. See
|
||||||
@@ -3822,8 +3820,7 @@ garbagecollect([{atexit}]) *garbagecollect()*
|
|||||||
|
|
||||||
The garbage collection is not done immediately but only when
|
The garbage collection is not done immediately but only when
|
||||||
it's safe to perform. This is when waiting for the user to
|
it's safe to perform. This is when waiting for the user to
|
||||||
type a character. To force garbage collection immediately use
|
type a character.
|
||||||
|test_garbagecollect_now()|.
|
|
||||||
|
|
||||||
get({list}, {idx} [, {default}]) *get()*
|
get({list}, {idx} [, {default}]) *get()*
|
||||||
Get item {idx} from |List| {list}. When this item is not
|
Get item {idx} from |List| {list}. When this item is not
|
||||||
@@ -7904,7 +7901,7 @@ termopen({cmd}[, {opts}]) {Nvim} *termopen()*
|
|||||||
See |terminal| for more information.
|
See |terminal| for more information.
|
||||||
|
|
||||||
test_garbagecollect_now() *test_garbagecollect_now()*
|
test_garbagecollect_now() *test_garbagecollect_now()*
|
||||||
Like garbagecollect(), but executed right away. This must
|
Like |garbagecollect()|, but executed right away. This must
|
||||||
only be called directly to avoid any structure to exist
|
only be called directly to avoid any structure to exist
|
||||||
internally, and |v:testing| must have been set before calling
|
internally, and |v:testing| must have been set before calling
|
||||||
any function.
|
any function.
|
||||||
|
@@ -722,26 +722,5 @@ You can test what Python version is available with: >
|
|||||||
echo 'there is Python 3.x'
|
echo 'there is Python 3.x'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Note however, that if Python 2 and 3 are both available, but not loaded,
|
|
||||||
these has() calls will try to load them.
|
|
||||||
|
|
||||||
To avoid loading the dynamic library, only check if Vim was compiled with
|
|
||||||
python support: >
|
|
||||||
if has('python_compiled')
|
|
||||||
echo 'compiled with Python 2.x support'
|
|
||||||
if has('python_dynamic')
|
|
||||||
echo 'Python 2.x dynamically loaded'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
if has('python3_compiled')
|
|
||||||
echo 'compiled with Python 3.x support'
|
|
||||||
if has('python3_dynamic')
|
|
||||||
echo 'Python 3.x dynamically loaded'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
This also tells you whether Python is dynamically loaded, which will fail if
|
|
||||||
the runtime library cannot be found.
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||||
|
@@ -218,8 +218,9 @@ g8 Print the hex values of the bytes used in the
|
|||||||
:sh[ell] Removed. |vim-differences| {Nvim}
|
:sh[ell] Removed. |vim-differences| {Nvim}
|
||||||
|
|
||||||
*:terminal* *:te*
|
*:terminal* *:te*
|
||||||
:te[rminal][!] [{cmd}] Execute {cmd} with 'shell' in a new |terminal-emulator|
|
:te[rminal][!] [{cmd}] Run {cmd} in a non-interactive 'shell' in a new
|
||||||
buffer. Without {cmd}, start an interactive 'shell'.
|
|terminal-emulator| buffer. Without {cmd}, start an
|
||||||
|
interactive 'shell'.
|
||||||
|
|
||||||
Type |i| to enter |Terminal-mode|, then keys are sent to
|
Type |i| to enter |Terminal-mode|, then keys are sent to
|
||||||
the job running in the terminal. Type <C-\><C-N> to
|
the job running in the terminal. Type <C-\><C-N> to
|
||||||
|
@@ -905,17 +905,17 @@ void nvim_set_current_tabpage(Tabpage tabpage, Error *err)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// create a new namespace, or get one with an exisiting name
|
/// Creates a new namespace, or gets an existing one
|
||||||
///
|
///
|
||||||
/// Namespaces are currently used for buffer highlighting and virtual text, see
|
/// Namespaces are used for buffer highlights and virtual text, see
|
||||||
/// |nvim_buf_add_highlight| and |nvim_buf_set_virtual_text|.
|
/// |nvim_buf_add_highlight()| and |nvim_buf_set_virtual_text()|.
|
||||||
///
|
///
|
||||||
/// Namespaces can have a name of be anonymous. If `name` is a non-empty string,
|
/// Namespaces can be named or anonymous. If `name` matches an existing
|
||||||
/// and a namespace already exists with that name,the existing namespace id is
|
/// namespace, the associated id is returned. If `name` is an empty string
|
||||||
/// returned. If an empty string is used, a new anonymous namespace is returned.
|
/// a new, anonymous namespace is created.
|
||||||
///
|
///
|
||||||
/// @param name Name of the namespace or empty string
|
/// @param name Namespace name or empty string
|
||||||
/// @return the namespace id
|
/// @return Namespace id
|
||||||
Integer nvim_create_namespace(String name)
|
Integer nvim_create_namespace(String name)
|
||||||
FUNC_API_SINCE(5)
|
FUNC_API_SINCE(5)
|
||||||
{
|
{
|
||||||
@@ -931,7 +931,7 @@ Integer nvim_create_namespace(String name)
|
|||||||
return (Integer)id;
|
return (Integer)id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get existing named namespaces
|
/// Gets existing, non-anonymous namespaces
|
||||||
///
|
///
|
||||||
/// @return dict that maps from names to namespace ids.
|
/// @return dict that maps from names to namespace ids.
|
||||||
Dictionary nvim_get_namespaces(void)
|
Dictionary nvim_get_namespaces(void)
|
||||||
|
@@ -205,7 +205,7 @@ Tests in `/test/unit` and `/test/functional` are divided into groups
|
|||||||
by the semantic component they are testing.
|
by the semantic component they are testing.
|
||||||
|
|
||||||
- _Unit tests_
|
- _Unit tests_
|
||||||
([test/unit](https://github.com/neovim/neovim/tree/master/test/unit)) should
|
([test/unit](https://github.com/neovim/neovim/tree/master/test/unit)) should
|
||||||
match 1-to-1 with the structure of `src/nvim/`, because they are testing
|
match 1-to-1 with the structure of `src/nvim/`, because they are testing
|
||||||
functions directly. E.g. unit-tests for `src/nvim/undo.c` should live in
|
functions directly. E.g. unit-tests for `src/nvim/undo.c` should live in
|
||||||
`test/unit/undo_spec.lua`.
|
`test/unit/undo_spec.lua`.
|
||||||
|
Reference in New Issue
Block a user