Skip to content

Commit 27f4b8e

Browse files
committed
enhance(main/neovim{,-nightly}): document has('termux') feature flag
1 parent f726d9d commit 27f4b8e

6 files changed

Lines changed: 55 additions & 15 deletions

File tree

packages/neovim-nightly/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, VIM License"
44
TERMUX_PKG_LICENSE_FILE="LICENSE.txt"
55
TERMUX_PKG_MAINTAINER="Joshua Kahn <tom@termux.dev>"
66
TERMUX_PKG_VERSION="0.12.0~dev-2496+gf1c82be1a1"
7+
TERMUX_PKG_REVISION=1
78
TERMUX_PKG_SRCURL="https://github.com/neovim/neovim/archive/${TERMUX_PKG_VERSION##*+g}.tar.gz"
89
TERMUX_PKG_SHA256=e8c27d7504fc1fd9c0086b0cc80fb933f25114e79a43324688dde7aa95aa833a
910
TERMUX_PKG_REPOLOGY_METADATA_VERSION="${TERMUX_PKG_VERSION%%~*}"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../neovim/has-termux.patch

packages/neovim-nightly/src-nvim-eval-funcs.c.patch

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/neovim/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0, VIM License"
44
TERMUX_PKG_LICENSE_FILE="LICENSE.txt"
55
TERMUX_PKG_MAINTAINER="Joshua Kahn <tom@termux.dev>"
66
TERMUX_PKG_VERSION="0.11.6"
7-
TERMUX_PKG_REVISION=2
7+
TERMUX_PKG_REVISION=3
88
TERMUX_PKG_SRCURL="https://github.com/neovim/neovim/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
99
TERMUX_PKG_SHA256=d1c8e3f484ed1e231fd5f48f53b7345b628e52263d5eef489bb8b73ca8d90fca
1010
TERMUX_PKG_DEPENDS="libandroid-support, libiconv, libmsgpack, libunibilium, libuv, libvterm (>= 1:0.3-0), lua51-lpeg, luajit, luv, tree-sitter, tree-sitter-parsers, utf8proc"

packages/neovim/has-termux.patch

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
The first two hunks of patch are applied directly to the pregenerated documentation files.
2+
This means it must be (re)created from the release tarballs if it needs to be regenerated!
3+
4+
Modifying `src/nvim/eval.lua` and then recreating the documentation files with `make doc`
5+
would in principle be possible as part of the `termux_step_host_build()` function.
6+
However as of time of writing, March 6. 2026 (Neovim version 0.11.6) I have not been able
7+
to successfully produce modified docs for Neovim at build time.
8+
9+
Please make sure to retain this header comment if you regenerating this patch.
10+
diff --git a/runtime/doc/vimfn.txt b/runtime/doc/vimfn.txt
11+
index 8f52e14..7c35094 100644
12+
--- a/runtime/doc/vimfn.txt
13+
+++ b/runtime/doc/vimfn.txt
14+
@@ -4624,6 +4624,10 @@ has({feature}) *has()*
15+
win32 Windows system (32 or 64 bit).
16+
win64 Windows system (64 bit).
17+
wsl WSL (Windows Subsystem for Linux) system.
18+
+ android Alias for has('termux')
19+
+ termux Termux environment (The *termux* and *android*
20+
+ feature flags are {included additionally}
21+
+ in Termux's Neovim package.)
22+
23+
*has-patch*
24+
3. Vim patch. For example the "patch123" feature means that
25+
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
26+
index 1a13885..491a48b 100644
27+
--- a/runtime/lua/vim/_meta/vimfn.lua
28+
+++ b/runtime/lua/vim/_meta/vimfn.lua
29+
@@ -4175,6 +4175,10 @@ function vim.fn.globpath(path, expr, nosuf, list, allinks) end
30+
--- win32 Windows system (32 or 64 bit).
31+
--- win64 Windows system (64 bit).
32+
--- wsl WSL (Windows Subsystem for Linux) system.
33+
+--- android Alias for has('termux')
34+
+--- termux Termux environment (The *termux* and *android*
35+
+--- feature flags are {included additionally}
36+
+--- in Termux's Neovim package.)
37+
---
38+
--- *has-patch*
39+
--- 3. Vim patch. For example the "patch123" feature means that
40+
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
41+
index 752b367..349b7c3 100644
42+
--- a/src/nvim/eval/funcs.c
43+
+++ b/src/nvim/eval/funcs.c
44+
@@ -3087,6 +3087,8 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
45+
#ifdef _WIN64
46+
"win64",
47+
#endif
48+
+ "android",
49+
+ "termux",
50+
#ifndef CASE_INSENSITIVE_FILENAME
51+
"fname_case",
52+
#endif

packages/neovim/src-nvim-eval-funcs.c.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)