helix/book/src
Michael Davis 86f10ae24c
Add a language to fix Rust highlights in format-args macros
This is a bit hacky. Injections cannot stack on each other like
highlights because layers can have their own injections. So this new
language `rust-format-args-macro` emulates that. It unconditionally
injects `rust-format-args` into all strings. Rust injects this new
language into known format-args macros like `println!`.

The downside is that this can cause false-positive highlights within
these macros for strings which happen to contain format-args syntax

    println!("Hello, {}!", "{}");
    //               ^ format args syntax
    //                      ^ not format args syntax, but highlighted
    //                        as if it were :(

This false-positive case is expected to be rare.

Injecting this fake language fixes regular non-string highlights in
macro invocations: macro invocations need to inject the entire token
tree and use `injection.include-children` for proper highlighting.
2025-07-13 12:01:18 -04:00
..
generated Add a language to fix Rust highlights in format-args macros 2025-07-13 12:01:18 -04:00
guides docs(guides/textobject): list `parameter.around` capture (#13470) 2025-05-05 09:20:57 -04:00
SUMMARY.md Book: Add a section with links to "Helix mode" in non-Helix software. (#12258) 2025-03-24 08:21:37 -05:00
building-from-source.md docs(building-from-source): suggest optimized install cmd as alternative (#13553) 2025-05-24 09:24:09 -05:00
command-line.md helix-view: expand primary selection line range in shell commands (#13840) 2025-06-30 09:44:55 -05:00
commands.md Add static commands to documentation (#11950) 2024-12-05 11:13:00 -06:00
configuration.md Add `:config-reload` to configuration docs (#11086) 2024-11-20 16:08:06 -06:00
ecosystem.md Book: Add a section with links to "Helix mode" in non-Helix software. (#12258) 2025-03-24 08:21:37 -05:00
editor.md Add ability to configure atomic saving (#13656) 2025-07-10 19:12:59 -04:00
from-vim.md Fix minor grammar issue in 'from-vim' docs (#6667) 2023-04-09 14:23:57 -05:00
install.md Update install instructions (#13079) 2025-03-11 08:41:35 -05:00
keymap.md Removed unnecessary apostrophe in keymap.md (#13551) 2025-05-17 07:43:27 -05:00
lang-support.md Fixed headings (# / ##) to match other docs (#11192) 2024-07-16 12:29:00 +09:00
languages.md feat: give formatters access to filename (#13429) 2025-04-28 17:34:05 -05:00
other-software.md Update other-software.md (#13360) 2025-04-16 07:58:26 -05:00
package-managers.md Generate a .deb file (#12453) 2025-01-16 17:37:53 -06:00
pickers.md docs: Eliminate improper use of "LSP" term 2024-12-03 18:29:44 -05:00
registers.md Improve the structure of the documentation (#10619) 2024-05-06 17:39:06 +02:00
remapping.md Update docs link to Commands.md in Remapping.md (#13284) 2025-04-07 11:08:09 -05:00
surround.md Improve the structure of the documentation (#10619) 2024-05-06 17:39:06 +02:00
syntax-aware-motions.md Fix multiple broken links in the documentation (#10953) 2024-06-18 10:43:36 +02:00
textobjects.md Fix multiple broken links in the documentation (#10953) 2024-06-18 10:43:36 +02:00
themes.md feat: Improved syntax highlighting for Gleam (#13807) 2025-06-21 12:24:19 -05:00
title-page.md book: add wiki links to the title page and install page (#3017) 2022-07-09 11:08:47 -05:00
usage.md docs: fix typo in usage.md (#12390) 2025-01-03 08:11:37 -06:00