helix/helix-core/src
Timothy DeHerrera 9c6c63a2be
inject language based on file extension & shebang (#3970)
* inject language based on file extension

Nodes can now be captured with "injection.filename". If this capture
contains a valid file extension known to Helix, then the content will
be highlighted as that language.

* inject language by shebang

Nodes can now be captured with "injection.shebang". If this capture
contains a valid shebang line known to Helix, then the content will
be highlighted as the language the shebang calls for.

* add documentation for language injection

* nix: fix highlights

The `@` is now highlighted properly on either side of the function arg.

Also, extending the phases with `buildPhase = prev.buildPhase + ''''`
is now highlighted properly.

Fix highlighting of `''$` style escapes (requires tree-sitter-nix bump)

Fix `inherit` highlighting.

* simplify injection_for_match

Split out injection pair logic into its own method to make the overall
flow easier to follow.

Also transform the top-level function into a method on a
HighlightConfiguration.

* markdown: add shebang injection query
2023-04-28 18:21:34 +09:00
..
doc_formatter Feat: LSP Type Hints (#5934) 2023-03-11 11:32:14 +09:00
increment Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
auto_pairs.rs Fix erroneous indent between closers of auto-pairs (#5330) 2022-12-29 09:23:40 -06:00
chars.rs Temporarily turn on unicode-lines 2022-03-17 10:53:50 +09:00
comment.rs Prevent a panic when uncommenting a line with only a comment token (#5933) 2023-02-12 13:13:22 -06:00
config.rs Add support for local language configuration (#1249) 2022-04-18 12:10:51 +09:00
diagnostic.rs Feat: LSP Type Hints (#5934) 2023-03-11 11:32:14 +09:00
diff.rs delete outdated reference to cessen/ropey#25 (#4928) 2022-11-28 19:07:47 -06:00
doc_formatter.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
graphemes.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2023-02-01 02:03:19 +09:00
history.rs Fix transaction composition order in History::changes_since (#4981) 2022-12-03 12:09:08 +09:00
indent.rs Fix indentation level calculation for lines mixing tabs and spaces (#6278) 2023-03-12 12:12:06 -05:00
lib.rs add workspace config and manual LSP root management 2023-03-29 12:57:30 +09:00
line_ending.rs properly handle LSP position encoding (#5711) 2023-02-09 16:19:29 +09:00
macros.rs Split parts of helix-term into helix-view. 2020-09-21 18:24:16 +09:00
match_brackets.rs Fix match brackets comment (#1346) 2021-12-24 07:27:31 +05:30
movement.rs return early if soft wrap is invalid (#6856) 2023-04-23 08:24:17 -05:00
object.rs Fix edge-case in tree-sitter expand_selection selection command (#2877) 2022-06-25 13:12:30 -05:00
path.rs Canonicalize paths before stripping current dir as prefix (#6290) 2023-03-30 11:21:40 -05:00
position.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
register.rs feat(commands): add clear-register typable command (#5695) 2023-04-27 21:57:05 +02:00
search.rs Jump to the next number on the line before incrementing (#1778) 2022-04-01 22:14:37 +09:00
selection.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
shellwords.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
surround.rs Add test cases for existing pair matching logic. (#6027) 2023-03-08 11:10:55 +09:00
syntax.rs inject language based on file extension & shebang (#3970) 2023-04-28 18:21:34 +09:00
test.rs fix test::plain 2023-03-20 18:34:40 -05:00
text_annotations.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
textobject.rs fix test::plain 2023-03-20 18:34:40 -05:00
transaction.rs Add API to create a Transaction from potentially overlapping changes 2023-03-10 16:54:17 +09:00
wrap.rs Softwrapping improvements (#5893) 2023-03-08 11:02:11 +09:00