pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/editors/neovim
Module Name: pkgsrc
Committed By: leot
Date: Thu Jan 1 16:30:47 UTC 2026
Modified Files:
pkgsrc/editors/neovim: Makefile distinfo
pkgsrc/editors/neovim/patches:
patch-runtime_lua_vim_treesitter_languagetree.lua
Log Message:
neovim: Fully apply tree-sitter patch
The backport-33141.patch actually had two patches for languagetree.lua so
the intermediate languagetree.lua.orig was overwritten and only a patch was
applied and the set_timeout() function and other parts were still
accidentally used and not adapted.
Noticed via nvim-treesitter/nvim-treesitter v0.10.0 plugin.
PKGREVISION++
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/editors/neovim/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/editors/neovim/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/editors/neovim/Makefile
diff -u pkgsrc/editors/neovim/Makefile:1.20 pkgsrc/editors/neovim/Makefile:1.21
--- pkgsrc/editors/neovim/Makefile:1.20 Tue Dec 23 00:07:15 2025
+++ pkgsrc/editors/neovim/Makefile Thu Jan 1 16:30:47 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2025/12/23 00:07:15 wiz Exp $
+# $NetBSD: Makefile,v 1.21 2026/01/01 16:30:47 leot Exp $
DISTNAME= neovim-0.11.5
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_GITHUB:=neovim/}
GITHUB_TAG= v${PKGVERSION_NOREV}
Index: pkgsrc/editors/neovim/distinfo
diff -u pkgsrc/editors/neovim/distinfo:1.17 pkgsrc/editors/neovim/distinfo:1.18
--- pkgsrc/editors/neovim/distinfo:1.17 Tue Dec 23 00:07:15 2025
+++ pkgsrc/editors/neovim/distinfo Thu Jan 1 16:30:47 2026
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.17 2025/12/23 00:07:15 wiz Exp $
+$NetBSD: distinfo,v 1.18 2026/01/01 16:30:47 leot Exp $
BLAKE2s (neovim-0.11.5.tar.gz) = 390b8ce8037b77e5f99afb2ba99616d39a8989f3fb76b499763810eb292242fd
SHA512 (neovim-0.11.5.tar.gz) = 1b2bb241261eefd195275e28bb9ebe4102261d61d8b7fe38ccebad7131ccc38d29fae8494d511b4c440ad71ef95dc405a2ba6e98b5d47426f215c8137c8bc91f
Size (neovim-0.11.5.tar.gz) = 12979925 bytes
SHA1 (patch-runtime_lua_vim_treesitter___meta_misc.lua) = 1786ffc397926ae2587e82fba3959cb02e7b249c
-SHA1 (patch-runtime_lua_vim_treesitter_languagetree.lua) = acaecd3d21a57dfb99c7282d250266d72092ce88
+SHA1 (patch-runtime_lua_vim_treesitter_languagetree.lua) = b356fd420a72a3384e9170b53a02cf4780eaa92b
SHA1 (patch-src_nvim_lua_treesitter.c) = 776a7bf680fe00399ecbafdc3ce7323b312b3cdb
Index: pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua
diff -u pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua:1.1 pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua:1.2
--- pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua:1.1 Tue Dec 23 00:07:16 2025
+++ pkgsrc/editors/neovim/patches/patch-runtime_lua_vim_treesitter_languagetree.lua Thu Jan 1 16:30:47 2026
@@ -1,11 +1,87 @@
-$NetBSD: patch-runtime_lua_vim_treesitter_languagetree.lua,v 1.1 2025/12/23 00:07:16 wiz Exp $
+$NetBSD: patch-runtime_lua_vim_treesitter_languagetree.lua,v 1.2 2026/01/01 16:30:47 leot Exp $
Fix build with tree-sitter 0.26.
https://github.com/subnut/cports/blob/neovim-wasm/main/neovim/patches/backport-33141.patch
---- runtime/lua/vim/treesitter/languagetree.lua.orig 2025-12-23 00:02:36.443793560 +0000
+--- runtime/lua/vim/treesitter/languagetree.lua.orig 2026-01-01 16:19:26.136691938 +0000
+++ runtime/lua/vim/treesitter/languagetree.lua
-@@ -1010,7 +1010,7 @@ function LanguageTree:_get_injections(ra
+@@ -43,8 +43,10 @@
+ local query = require('vim.treesitter.query')
+ local language = require('vim.treesitter.language')
+ local Range = require('vim.treesitter._range')
++local hrtime = vim.uv.hrtime
+
+-local default_parse_timeout_ms = 3
++-- Parse in 3ms chunks.
++local default_parse_timeout_ns = 3 * 1000000
+
+ ---@type Range2
+ local entire_document_range = { 0, math.huge }
+@@ -198,16 +200,16 @@ function LanguageTree:_set_logger()
+ self._parser:_set_logger(log_lex, log_parse, self._logger)
+ end
+
+----Measure execution time of a function
++---Measure execution time of a function, in nanoseconds.
+ ---@generic R1, R2, R3
+ ---@param f fun(): R1, R2, R3
+ ---@return number, R1, R2, R3
+ local function tcall(f, ...)
+- local start = vim.uv.hrtime()
++ local start = hrtime()
+ ---@diagnostic disable-next-line
+ local r = { f(...) }
+ --- @type number
+- local duration = (vim.uv.hrtime() - start) / 1000000
++ local duration = hrtime() - start
+ --- @diagnostic disable-next-line: redundant-return-value
+ return duration, unpack(r)
+ end
+@@ -388,18 +390,29 @@ function LanguageTree:_parse_regions(ran
+ )
+ then
+ self._parser:set_included_ranges(ranges)
+- self._parser:set_timeout(thread_state.timeout and thread_state.timeout * 1000 or 0) -- ms -> micros
+
+- local parse_time, tree, tree_changes =
+- tcall(self._parser.parse, self._parser, self._trees[i], self._source, true)
++ local parse_time, tree, tree_changes = tcall(
++ self._parser.parse,
++ self._parser,
++ self._trees[i],
++ self._source,
++ true,
++ thread_state.timeout
++ )
+ while true do
+ if tree then
+ break
+ end
+ coroutine.yield(self._trees, false)
+
+- parse_time, tree, tree_changes =
+- tcall(self._parser.parse, self._parser, self._trees[i], self._source, true)
++ parse_time, tree, tree_changes = tcall(
++ self._parser.parse,
++ self._parser,
++ self._trees[i],
++ self._source,
++ true,
++ thread_state.timeout
++ )
+ end
+
+ self:_subtract_time(thread_state, parse_time)
+@@ -503,7 +516,7 @@ function LanguageTree:_async_parse(range
+ local buf = is_buffer_parser and vim.b[source] or nil
+ local ct = is_buffer_parser and buf.changedtick or nil
+ local total_parse_time = 0
+- local redrawtime = vim.o.redrawtime
++ local redrawtime = vim.o.redrawtime * 1000000
+
+ local thread_state = {} ---@type ParserThreadState
+
+@@ -997,7 +1010,7 @@ function LanguageTree:_get_injections(ra
---@type table<integer,vim.treesitter.languagetree.Injection>
local injections = {}
@@ -14,7 +90,7 @@ https://github.com/subnut/cports/blob/ne
local full_scan = range == true or self._injection_query.has_combined_injections
-@@ -1034,9 +1034,9 @@ function LanguageTree:_get_injections(ra
+@@ -1021,9 +1034,9 @@ function LanguageTree:_get_injections(ra
end
-- Check the current function duration against the timeout, if it exists.
Home |
Main Index |
Thread Index |
Old Index