Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package neovim for openSUSE:Factory checked in at 2025-12-29 15:16:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/neovim (Old) and /work/SRC/openSUSE:Factory/.neovim.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "neovim" Mon Dec 29 15:16:45 2025 rev:82 rq:1324588 version:0.11.5 Changes: -------- --- /work/SRC/openSUSE:Factory/neovim/neovim.changes 2025-11-07 18:24:26.000425839 +0100 +++ /work/SRC/openSUSE:Factory/.neovim.new.1928/neovim.changes 2025-12-29 15:17:28.728673457 +0100 @@ -1,0 +2,6 @@ +Sat Dec 27 15:39:47 UTC 2025 - Matej Cepl <[email protected]> + +- Add tree-sitter-system.lua for the registration of system-wide + installed tree-sitter parsers. + +------------------------------------------------------------------- New: ---- tree-sitter-system.lua ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ neovim.spec ++++++ --- /var/tmp/diff_new_pack.OuNfbQ/_old 2025-12-29 15:17:29.868720282 +0100 +++ /var/tmp/diff_new_pack.OuNfbQ/_new 2025-12-29 15:17:29.872720447 +0100 @@ -1,7 +1,6 @@ # # spec file for package neovim # -# Copyright (c) 2025 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties @@ -36,6 +35,7 @@ Source1: sysinit.vim Source3: suse-spec-template Source4: spec.vim +Source5: tree-sitter-system.lua Source10: https://github.com/neovim/deps/raw/06ef2b58b0876f8de1a3f5a710473dcd7afff251/opt/lua-dev-deps.tar.gz BuildRequires: cmake >= 3.16 BuildRequires: desktop-file-utils @@ -167,6 +167,9 @@ # vim/site directories for plugins shared with vim mkdir -p %{buildroot}%{_datadir}/vim/site/{after,after/syntax,autoload,colors,doc,ftdetect,plugin,syntax} +# universal loader for the system-wide tree-sitter parsers +install -Dm0644 %{SOURCE5} %{buildroot}%{_datadir}/nvim/runtime/after/plugin/tree-sitter-system.lua + %fdupes %{buildroot} %find_lang nvim ++++++ tree-sitter-system.lua ++++++ -- Universal loader for system Tree-sitter parsers with automatic filetype mapping -- Includes ABI check with detailed warning to :messages -- Drops safely into /usr/share/nvim/runtime/plugin/ local ok, ts_parsers = pcall(require, "nvim-treesitter.parsers") if not ok or not ts_parsers then return end local parser_dir = "/usr/share/nvim/runtime/parser" local uv = vim.loop -- Neovim Tree-sitter ABI local nvim_min_abi = vim.treesitter.abi or 14 -- fallback local nvim_max_abi = vim.treesitter.abi_max or 15 -- Helper: convert filename to Neovim-safe language name local function sanitize_langname(fname) local name = fname:match("(.+)%.so$") if not name then return nil end name = name:gsub("-", "_") return name end -- Helper: guess filetype from parser name local function guess_filetype(lang) local ft = lang ft = ft:gsub("_inline$", "") ft = ft:gsub("_sum$", "") ft = ft:gsub("%d+$", "") if ft == "vimdoc" then ft = "vim" end if ft == "tsx" then ft = "typescript.tsx" end if ft == "jinja2" then ft = "jinja" end return ft end -- Iterate over all .so files in parser_dir local handle = uv.fs_scandir(parser_dir) if not handle then return end while true do local name, _ = uv.fs_scandir_next(handle) if not name then break end if name:match("%.so$") then local lang = sanitize_langname(name) if lang then local configs = ts_parsers.get_parser_configs() if not configs[lang] then local parser_path = parser_dir .. "/" .. name configs[lang] = { install_info = { url = parser_path, files = { name }, }, filetype = guess_filetype(lang), } -- ABI check: attempt to load parser local loaded, parser = pcall(vim.treesitter.language.get_lang, lang) if not loaded or not parser then vim.schedule(function() vim.notify( string.format( "Tree-sitter parser '%s' at %s is ABI-incompatible (Neovim ABI: %d-%d).", lang, parser_path, nvim_min_abi, nvim_max_abi ), vim.log.levels.WARN ) end) end end end end end
