Skip to content

refactor(core): Require Neovim 0.12 and align Treesitter handling#30

Merged
mhiro2 merged 1 commit intomainfrom
refactor/require-nvim-0.12
Apr 18, 2026
Merged

refactor(core): Require Neovim 0.12 and align Treesitter handling#30
mhiro2 merged 1 commit intomainfrom
refactor/require-nvim-0.12

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Apr 18, 2026

Summary

  • Require Neovim 0.12 as the minimum version in documentation
  • Fix Treesitter parser detection for Neovim 0.12 where get_parser() returns nil instead of raising an error
  • Remove pre-0.12 UTF-32 indexing compatibility code
  • Modernize API usage by switching quickfix opening to nvim_cmd()
  • Disable ShaDa writes in headless tests to prevent side effects

Changes

  • 293e82c : refactor(core): require Neovim 0.12 and align Treesitter handling
    • Updated README and help documentation to reflect Neovim 0.12 minimum requirement
    • Fixed Treesitter parser detection to handle nil return from get_parser() instead of error handling
    • Removed UTF-32 indexing compatibility branches that are no longer needed for 0.12+
    • Modernized quickfix opening by switching from vim.cmd() to nvim_cmd()
    • Updated symbol and grep tests to validate behavior under Neovim 0.12 constraints

Require Neovim 0.12 in the README and help docs to match
the new minimum version. Fix Treesitter parser detection
for Neovim 0.12, where get_parser() returns nil instead of
raising, and update symbol tests to cover the new behavior.

Drop pre-0.12 UTF-32 indexing compatibility branches, switch
quickfix opening to nvim_cmd(), and disable ShaDa writes in
headless tests.
@mhiro2 mhiro2 self-assigned this Apr 18, 2026
@mhiro2 mhiro2 added enhancement New feature or request refactor labels Apr 18, 2026
@github-actions
Copy link
Copy Markdown

Benchmark Results

nvim --headless -u NONE -c "lua dofile('bench/run.lua')" -c "qa!"

== bench.bench_reapply ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
reapply_all  slots=1 wins=1                         50          2.5          0.6         20.1
reapply_all  slots=1 wins=5                         50          6.0          3.4         18.5
reapply_all  slots=1 wins=10                        50         12.0          6.1         37.1
reapply_all  slots=1 wins=20                        50         14.0         11.8         28.9
reapply_all  slots=5 wins=1                         50          1.4          0.7         12.7
reapply_all  slots=5 wins=5                         50          6.1          3.9         13.1
reapply_all  slots=5 wins=10                        50         11.9          7.0         40.5
reapply_all  slots=5 wins=20                        50         15.6         13.6         21.1
reapply_all  slots=9 wins=1                         50          1.2          0.8          2.0
reapply_all  slots=9 wins=5                         50          8.7          4.2         31.4
reapply_all  slots=9 wins=10                        50          8.1          7.9          8.5
reapply_all  slots=9 wins=20                        50         26.5         16.2         86.1
---------------------------------------------------------------------------------------------

== bench.bench_apply ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
apply_slot_globally  wins=1                        100          4.6          3.9         23.2
apply_slot_globally  wins=5                        100         19.7         18.4         46.5
apply_slot_globally  wins=10                       100         44.3         37.3         93.2
apply_slot_globally  wins=20                       100         84.3         74.5        150.6
apply_slot_for_window  existing=0                  200          5.8          3.7         31.3
apply_slot_for_window  existing=5                  200          4.5          4.2         23.7
apply_slot_for_window  existing=9                  200          5.0          4.6         24.5
---------------------------------------------------------------------------------------------

== bench.bench_clear ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
clear_all_globally  slots=1 wins=1                  30         65.8         47.7        131.3
clear_all_globally  slots=1 wins=5                  30        151.5        130.4        279.4
clear_all_globally  slots=1 wins=10                 30        288.2        236.7        550.0
clear_all_globally  slots=5 wins=1                  30        100.4         72.7        203.6
clear_all_globally  slots=5 wins=5                  30        277.6        234.9        516.3
clear_all_globally  slots=5 wins=10                 30        484.2        433.0        837.9
clear_all_globally  slots=9 wins=1                  30        114.0         99.3        260.1
clear_all_globally  slots=9 wins=5                  30        410.2        349.4        644.9
clear_all_globally  slots=9 wins=10                 30        745.9        659.7        990.2
---------------------------------------------------------------------------------------------

== bench.bench_set_clear ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
set+clear cycle  wins=1                             50         31.1         13.6        282.6
set+clear cycle  wins=5                             50         50.9         37.0         86.8
set+clear cycle  wins=10                            50         72.5         66.7         94.8
---------------------------------------------------------------------------------------------

== bench.bench_jump ==---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
jump.next  slots=1                                 100         25.5          8.8         69.3
jump.next  slots=5                                 100       5081.8       4968.0       5477.8
jump.next  slots=9                                 100      15340.0      15133.9      16166.2
---------------------------------------------------------------------------------------------

== bench.bench_cword ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
apply_cword_for_window                             200          2.4          2.1         29.0
---------------------------------------------------------------------------------------------

== bench.bench_symbol ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
symbol: get_symbol (on identifier)                 200         12.0          4.1        194.7
symbol: get_symbol (on keyword)                    200         16.2          5.7         70.0
symbol: set+clear cycle (source=symbol)             50         28.1         17.1        117.2
symbol: set+clear cycle (source=cword)              50         14.9         13.0         40.4
---------------------------------------------------------------------------------------------

== SUMMARY ==
---------------------------------------------------------------------------------------------
Benchmark                                        Iters    Mean (us)     Min (us)     Max (us)
---------------------------------------------------------------------------------------------
reapply_all  slots=1 wins=1                         50          2.5          0.6         20.1
reapply_all  slots=1 wins=5                         50          6.0          3.4         18.5
reapply_all  slots=1 wins=10                        50         12.0          6.1         37.1
reapply_all  slots=1 wins=20                        50         14.0         11.8         28.9
reapply_all  slots=5 wins=1                         50          1.4          0.7         12.7
reapply_all  slots=5 wins=5                         50          6.1          3.9         13.1
reapply_all  slots=5 wins=10                        50         11.9          7.0         40.5
reapply_all  slots=5 wins=20                        50         15.6         13.6         21.1
reapply_all  slots=9 wins=1                         50          1.2          0.8          2.0
reapply_all  slots=9 wins=5                         50          8.7          4.2         31.4
reapply_all  slots=9 wins=10                        50          8.1          7.9          8.5
reapply_all  slots=9 wins=20                        50         26.5         16.2         86.1
apply_slot_globally  wins=1                        100          4.6          3.9         23.2
apply_slot_globally  wins=5                        100         19.7         18.4         46.5
apply_slot_globally  wins=10                       100         44.3         37.3         93.2
apply_slot_globally  wins=20                       100         84.3         74.5        150.6
apply_slot_for_window  existing=0                  200          5.8          3.7         31.3
apply_slot_for_window  existing=5                  200          4.5          4.2         23.7
apply_slot_for_window  existing=9                  200          5.0          4.6         24.5
clear_all_globally  slots=1 wins=1                  30         65.8         47.7        131.3
clear_all_globally  slots=1 wins=5                  30        151.5        130.4        279.4
clear_all_globally  slots=1 wins=10                 30        288.2        236.7        550.0
clear_all_globally  slots=5 wins=1                  30        100.4         72.7        203.6
clear_all_globally  slots=5 wins=5                  30        277.6        234.9        516.3
clear_all_globally  slots=5 wins=10                 30        484.2        433.0        837.9
clear_all_globally  slots=9 wins=1                  30        114.0         99.3        260.1
clear_all_globally  slots=9 wins=5                  30        410.2        349.4        644.9
clear_all_globally  slots=9 wins=10                 30        745.9        659.7        990.2
set+clear cycle  wins=1                             50         31.1         13.6        282.6
set+clear cycle  wins=5                             50         50.9         37.0         86.8
set+clear cycle  wins=10                            50         72.5         66.7         94.8
jump.next  slots=1                                 100         25.5          8.8         69.3
jump.next  slots=5                                 100       5081.8       4968.0       5477.8
jump.next  slots=9                                 100      15340.0      15133.9      16166.2
apply_cword_for_window                             200          2.4          2.1         29.0
symbol: get_symbol (on identifier)                 200         12.0          4.1        194.7
symbol: get_symbol (on keyword)                    200         16.2          5.7         70.0
symbol: set+clear cycle (source=symbol)             50         28.1         17.1        117.2
symbol: set+clear cycle (source=cword)              50         14.9         13.0         40.4
---------------------------------------------------------------------------------------------

@mhiro2 mhiro2 merged commit f18ce85 into main Apr 18, 2026
4 checks passed
@mhiro2 mhiro2 deleted the refactor/require-nvim-0.12 branch April 18, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant