Skip to content

Ad panics when using custom tree-sitter queries #76

Open
@Yappaholic

Description

Describe the bug

After configuring sources for ad on NixOS (I am using compiled grammars and queries from another project) I can't open files because the editor just panics.

To Reproduce

Steps to reproduce the behavior:

  1. Install grammars and queries
  2. Set the source paths and [[languages]] in config.toml
  3. Try to open files

Expected behavior

Editor opens files without panicking and with tree-sitter highlighting.

Versions & OS Details

  • OS: Linux
  • Distribution NixOS
  • OS Version 24.11
  • ad Version commit 5bdc021

Additional context

The error:

thread 'main' panicked at src/buffer/internal.rs:412:41:
slice index starts at 74 but ends at 4
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Full backtrace (not sure if needed):
stack backtrace:
0: 0x55a77a25d087 -
1: 0x55a77a1b0b7b -
2: 0x55a77a25f50e -
3: 0x55a77a28cde2 -
4: 0x55a77a28dce3 -
5: 0x55a77a25d4f5 -
6: 0x55a77a25d459 -
7: 0x55a77a28d294 -
8: 0x55a779f76522 -
9: 0x55a779f76356 -
10: 0x55a77a097bd1 -
11: 0x55a77a0da182 -
12: 0x55a77a0d7973 -
13: 0x55a779fd8b19 -
14: 0x55a779fa657e -
15: 0x55a779fdd14d -
16: 0x55a779fc52c3 -
17: 0x55a779fda97a -
18: 0x7f7ac12b727e - __libc_start_call_main
19: 0x7f7ac12b7339 - __libc_start_main_alias_2
20: 0x55a779f7e3f5 -
21: 0x0 -

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions