Skip to content

julienvincent/neovim-ts-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Repro-Repo for Neovim Tree-Sitter issue

This is a reproduce repo for an issue I am running into with treesitter on neovim nightly.

This shows a test case for calling the TSNode:next_named_sibling() API on a node that has siblings. On neovim@0.10.2 this returns the sibling node as expected but returns nil on nightly.

Instructions

This uses Just to run (see the justfile).

Working Case

To run the working test-case you can run:

just test
# or
just test stable
# or any release version
just test v0.10.2

This should print something like:

Test output
========================================
Testing:        /Users/julienvincent/code/neovim-ts-repro/tests/ts-repro/ts_spec.lua
Success ||      treesitter-test should find a nodes named sibling

Success:        1
Failed :        0
Errors :        0
========================================

Failing Case

Now run this against nightly to see the failing case

just test nightly

You will see something like

Test output
========================================
Testing:        /Users/julienvincent/code/neovim-ts-repro/tests/ts-repro/ts_spec.lua
Fail    ||      treesitter-test should find a nodes named sibling
            ...nvincent/code/neovim-ts-repro/tests/ts-repro/ts_spec.lua:25: Expected objects to not be the same.
            Passed in:
            (nil)
            Did not expect:
            type nil

            stack traceback:
                ...nvincent/code/neovim-ts-repro/tests/ts-repro/ts_spec.lua:25: in function <...nvincent/code/neovim-ts-repro/tests/ts-repro/ts_spec.lua:4>


Success:        0
Failed :        1
Errors :        0
========================================

See ts_spec.lua for the code.


This project was extracted from https://github.com/julienvincent/nvim-paredit which is where this issue was originally discovered.

About

A repro-repo for a neovim treesitter issue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published