Unnamed repository; edit this file 'description' to name the repository.
Add 'definition.field' to tags queries
This is kind exposed in LSP syntax symbol pickers, for struct members
in Rust for example.
| -rw-r--r-- | book/src/guides/tags.md | 1 | ||||
| -rw-r--r-- | helix-term/src/commands/syntax.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/book/src/guides/tags.md b/book/src/guides/tags.md index 2fb08bed..7c7207a6 100644 --- a/book/src/guides/tags.md +++ b/book/src/guides/tags.md @@ -20,6 +20,7 @@ The following [captures][tree-sitter-captures] are recognized: | `definition.class` | | `definition.constant` | | `definition.enum` | +| `definition.field` | | `definition.function` | | `definition.interface` | | `definition.macro` | diff --git a/helix-term/src/commands/syntax.rs b/helix-term/src/commands/syntax.rs index 5070ec45..1fed4754 100644 --- a/helix-term/src/commands/syntax.rs +++ b/helix-term/src/commands/syntax.rs @@ -40,6 +40,7 @@ enum TagKind { Class, Constant, Enum, + Field, Function, Interface, Macro, @@ -55,6 +56,7 @@ impl TagKind { Self::Class => "class", Self::Constant => "constant", Self::Enum => "enum", + Self::Field => "field", Self::Function => "function", Self::Interface => "interface", Self::Macro => "macro", @@ -70,6 +72,7 @@ impl TagKind { "class" => Some(TagKind::Class), "constant" => Some(TagKind::Constant), "enum" => Some(TagKind::Enum), + "field" => Some(TagKind::Field), "function" => Some(TagKind::Function), "interface" => Some(TagKind::Interface), "macro" => Some(TagKind::Macro), |