neovim/runtime/lua/vim/treesitter
Christian Clason 6cfca21bac feat(treesitter): add @injection.filename
Problem: Injecting languages for file redirects (e.g., in bash) is not
possible.

Solution: Add `@injection.filename` capture that is piped through
`vim.filetype.match({ filename = node_text })`; the resulting filetype
(if not `nil`) is then resolved as a language (either directly or
through the list maintained via `vim.treesitter.language.register()`).

Note: `@injection.filename` is a non-standard capture introduced by
Helix; having two editors implement it makes it likely to be upstreamed.
2024-04-02 11:13:16 +02:00
..
_fold.lua revert: "feat(treesitter): add foldtext with treesitter highlighting" 2024-01-27 08:38:56 +08:00
_meta.lua refactor(treesitter): redesign query iterating 2024-03-19 14:24:59 +00:00
_query_linter.lua refactor(treesitter): redesign query iterating 2024-03-19 14:24:59 +00:00
_range.lua feat(treesitter)!: incremental injection parsing 2023-08-12 16:11:36 +01:00
dev.lua docs: improve/add documentation of Lua types 2024-03-01 23:02:18 +00:00
health.lua refactor: create function for deferred loading 2024-02-03 16:53:41 +01:00
highlighter.lua fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
language.lua feat!: remove deprecated functions 2024-03-09 10:54:24 +01:00
languagetree.lua feat(treesitter): add @injection.filename 2024-04-02 11:13:16 +02:00
query.lua fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00