Unable to jump to custom text objects of injected languages.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- markdown
- Domain
- tooling
Research direction
Reproduce the issue in a markdown file using the custom (inline_link (link_text)@link.inner)@link.outer capture, and review the reported :checkhealth nvim-treesitter output. The work is done when jumping to both captures works in an injected markdown language without changing the filetype.
Written by the indexing model from the issue text.
Description
Describe the bug
I am unable to jump to text objects from an injected language.
To be specific: Inside a markdown file I want to jump to an inline_link node.
From my understanding, the markdown treesitter grammar is split into markdown and markdown_inline.
I am able to jump to a custom capture with inline_link once I set the filetype to markdown_inline but this breaks my setup.
To Reproduce
Steps to reproduce the behavior:
- Open a markdown file
- Create a custom capture like:
(inline_link (link_text)@link.inner)@link.outer - See that you can't jump to
link.innerorlink.outer
Expected behavior
A clear and concise description of what you expected to happen.
Output of :checkhealth nvim-treesitter
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
- WARNING
tree-sitter executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
- WARNING
node executable not found (only needed for :TSInstallFromGrammar, not required for :TSInstall)
- OK
git executable found.
- OK
cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: gcc (GCC) 12.3.0
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "x86_64",
release = "6.1.37",
sysname = "Linux",
version = "#1-NixOS SMP PREEMPT_DYNAMIC Sat Jul 1 11:16:27 UTC 2023"
} ~
Parser/Features H L F I J
- ada ✓ ✓ ✓ . .
- agda ✓ . ✓ . .
- arduino ✓ ✓ ✓ ✓ ✓
- astro ✓ ✓ ✓ ✓ ✓
- awk ✓ . . . ✓
- bash ✓ ✓ ✓ . ✓
- bass ✓ ✓ ✓ ✓ ✓
- beancount ✓ . ✓ . .
- bibtex ✓ . ✓ ✓ .
- bicep ✓ ✓ ✓ ✓ ✓
- blueprint ✓ . . . .
- c ✓ ✓ ✓ ✓ ✓
- c_sharp ✓ ✓ ✓ . ✓
- capnp ✓ ✓ ✓ ✓ ✓
- chatito ✓ ✓ ✓ ✓ ✓
- clojure ✓ ✓ ✓ . ✓
- cmake ✓ . ✓ ✓ .
- comment ✓ . . . .
- commonlisp ✓ ✓ ✓ . .
- cooklang ✓ . . . .
- corn ✓ ✓ ✓ ✓ .
- cpon ✓ ✓ ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- cuda ✓ ✓ ✓ ✓ ✓
- cue ✓ ✓ ✓ ✓ ✓
- dart ✓ ✓ ✓ ✓ ✓
- devicetree ✓ ✓ ✓ ✓ ✓
- dhall ✓ . ✓ . ✓
- diff ✓ . . . .
- dockerfile ✓ . . . ✓
- dot ✓ . . . ✓
- ebnf ✓ . . . .
- eex ✓ . . . ✓
- elixir ✓ ✓ ✓ ✓ ✓
- elm ✓ . . . ✓
- elsa ✓ ✓ ✓ ✓ ✓
- elvish ✓ . . . ✓
- embedded_template ✓ . . . ✓
- erlang ✓ . ✓ . .
- fennel ✓ ✓ ✓ . ✓
- firrtl ✓ ✓ ✓ ✓ ✓
- fish ✓ ✓ ✓ ✓ ✓
- foam ✓ ✓ ✓ ✓ ✓
- fortran ✓ . ✓ ✓ .
- fsh ✓ . . . .
- func ✓ . . . .
- fusion ✓ ✓ ✓ ✓ .
- gdscript ✓ ✓ ✓ ✓ ✓
- git_config ✓ . . . .
- git_rebase ✓ . . . ✓
- gitattributes ✓ . . . ✓
- gitcommit ✓ . . . ✓
- gitignore ✓ . . . .
- gleam ✓ ✓ ✓ ✓ ✓
- glimmer ✓ ✓ ✓ ✓ .
- glsl ✓ ✓ ✓ ✓ ✓
- go ✓ ✓ ✓ ✓ ✓
- godot_resource ✓ ✓ ✓ . .
- gomod ✓ . . . ✓
- gosum ✓ . . . .
- gowork ✓ . . . ✓
- graphql ✓ . . ✓ ✓
- groovy ✓ . . . ✓
- hack ✓ . . . .
- hare ✓ ✓ ✓ ✓ ✓
- haskell ✓ . ✓ . ✓
- haskell_persistent ✓ . ✓ . .
- hcl ✓ . ✓ ✓ ✓
- heex ✓ ✓ ✓ ✓ ✓
- hjson ✓ ✓ ✓ ✓ ✓
- hlsl ✓ ✓ ✓ ✓ ✓
- hocon ✓ . . . ✓
- hoon ✓ ✓ ✓ . .
- html ✓ ✓ ✓ ✓ ✓
- htmldjango ✓ . ✓ ✓ ✓
- http ✓ . . . ✓
- ini ✓ . ✓ . .
- ispc ✓ ✓ ✓ ✓ ✓
- janet_simple ✓ ✓ ✓ . ✓
- java ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- jq ✓ . . . ✓
- jsdoc ✓ . . . .
- json ✓ ✓ ✓ ✓ .
- json5 ✓ . . . ✓
- jsonc ✓ ✓ ✓ ✓ ✓
- jsonnet ✓ . . . .
- julia ✓ ✓ ✓ ✓ ✓
- kdl ✓ ✓ ✓ ✓ ✓
- kotlin ✓ ✓ ✓ . ✓
- lalrpop ✓ ✓ . . ✓
- latex ✓ . ✓ . ✓
- ledger ✓ . ✓ ✓ ✓
- llvm ✓ . . . .
- lua ✓ ✓ ✓ ✓ ✓
- luadoc ✓ . . . .
- luap ✓ . . . .
- luau ✓ ✓ ✓ ✓ ✓
- m68k ✓ ✓ ✓ . ✓
- make ✓ . ✓ . ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- matlab ✓ ✓ ✓ ✓ ✓
- menhir ✓ . . . ✓
- mermaid ✓ . . . .
- meson ✓ . ✓ . ✓
- nickel ✓ . . ✓ .
- ninja ✓ . ✓ ✓ .
- nix ✓ ✓ ✓ . ✓
- norg . . . . .
- objc ✓ ✓ ✓ ✓ ✓
- ocaml ✓ ✓ ✓ ✓ ✓
- ocaml_interface ✓ ✓ ✓ ✓ ✓
- odin ✓ ✓ ✓ ✓ ✓
- org . . . . .
- pascal ✓ ✓ ✓ ✓ ✓
- passwd ✓ . . . .
- pem ✓ . ✓ . ✓
- perl ✓ . ✓ . ✓
- php ✓ ✓ ✓ ✓ ✓
- phpdoc ✓ . . . .
- pioasm ✓ . . . ✓
- po ✓ . ✓ . ✓
- poe_filter ✓ . ✓ ✓ ✓
- pony ✓ ✓ ✓ ✓ ✓
- prisma ✓ . . . .
- proto ✓ . ✓ . .
- prql ✓ . . . ✓
- pug ✓ . . . ✓
- puppet ✓ ✓ ✓ ✓ ✓
- python ✓ ✓ ✓ ✓ ✓
- ql ✓ ✓ ✓ ✓ ✓
- qmldir ✓ . . . ✓
- qmljs ✓ . ✓ . .
- query ✓ ✓ ✓ ✓ ✓
- r ✓ ✓ . ✓ ✓
- racket ✓ . ✓ . ✓
- rasi ✓ ✓ ✓ ✓ .
- regex ✓ . . . .
- rego ✓ . . . ✓
- rnoweb ✓ . ✓ . ✓
- ron ✓ ✓ ✓ ✓ ✓
- rst ✓ ✓ . . ✓
- ruby ✓ ✓ ✓ ✓ ✓
- rust ✓ ✓ ✓ ✓ ✓
- scala ✓ ✓ ✓ . ✓
- scheme ✓ . ✓ . ✓
- scss ✓ . ✓ ✓ .
- slint ✓ . . ✓ .
- smali ✓ ✓ ✓ ✓ ✓
- smithy ✓ . . . .
- solidity ✓ . . . .
- sparql ✓ ✓ ✓ ✓ ✓
- sql ✓ . . ✓ ✓
- squirrel ✓ ✓ ✓ ✓ ✓
- starlark ✓ ✓ ✓ ✓ ✓
- supercollider ✓ ✓ ✓ ✓ ✓
- surface ✓ . ✓ ✓ ✓
- svelte ✓ . ✓ ✓ ✓
- sxhkdrc ✓ . ✓ . ✓
- t32 ✓ ✓ ✓ ✓ ✓
- tablegen ✓ ✓ ✓ ✓ ✓
- terraform ✓ . ✓ ✓ ✓
- thrift ✓ ✓ ✓ ✓ ✓
- tiger ✓ ✓ ✓ ✓ ✓
- tlaplus ✓ ✓ ✓ . ✓
- todotxt ✓ . . . .
- toml ✓ ✓ ✓ ✓ ✓
- tsx ✓ ✓ ✓ ✓ ✓
- turtle ✓ ✓ ✓ ✓ ✓
- twig ✓ . . . ✓
- typescript ✓ ✓ ✓ ✓ ✓
- ungrammar ✓ ✓ ✓ ✓ ✓
- usd ✓ ✓ ✓ ✓ .
- uxntal ✓ ✓ ✓ ✓ ✓
- v ✓ ✓ ✓ ✓ ✓
- vala ✓ . ✓ . .
- verilog ✓ ✓ ✓ . ✓
- vhs ✓ . . . .
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- vue ✓ . ✓ ✓ ✓
- wgsl ✓ . ✓ ✓ .
- wgsl_bevy ✓ . ✓ ✓ .
- yaml ✓ ✓ ✓ ✓ ✓
- yang ✓ . ✓ ✓ ✓
- yuck ✓ ✓ ✓ ✓ ✓
- zig ✓ . ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang}
Output of nvim --version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/nix/store/ypc27qm8i9vp96yh1wk5aq3giibyi1f4-neovim-unwrapped-0.9.1/share/nvim
"
Additional context
Add any other context about the problem here.
- Dominant language
- Tree-sitter Query
- Stars
- 2.8k
- Forks
- 271
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-treesitter/nvim-treesitter-textobjects
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 42/100
nvim-treesitter/nvim-treesitter-textobjects#890 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in nvim-treesitter/nvim-treesitter-textobjects
Similar issues
-
comp/cron P2 sweeper:risk-automation type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#117792 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bancolombia/sentinel#20 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
alunduil/woodland-generators#669 ·