Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to jump to custom text objects of injected languages. #479

Open
peri4n opened this issue Jul 30, 2023 · 0 comments
Open

Unable to jump to custom text objects of injected languages. #479

peri4n opened this issue Jul 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@peri4n
Copy link

peri4n commented Jul 30, 2023

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:

  1. Open a markdown file
  2. Create a custom capture like: (inline_link (link_text)@link.inner)@link.outer
  3. See that you can't jump to link.inner or link.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.

@peri4n peri4n added the bug Something isn't working label Jul 30, 2023
@peri4n peri4n changed the title Unable to jump to custom text objects from injected languages. Unable to jump to custom text objects of injected languages. Jul 30, 2023
liskin added a commit to liskin/dotfiles that referenced this issue Sep 19, 2024
liskin added a commit to liskin/dotfiles that referenced this issue Sep 19, 2024
Due to nvim-treesitter/nvim-treesitter-textobjects#479,
I can't use nvim-treesitter-textobjects, but this is actually quite
simple… :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant