From 3472105ad9cef06d7a3a032047bcbf06bc80fe26 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 4 Dec 2021 18:23:25 +0100 Subject: [PATCH] Update semantic token docs --- crates/ide/src/syntax_highlighting.rs | 6 ++++-- editors/code/package.json | 10 ++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 56e07da0b90..0741e1ffbfa 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -57,9 +57,11 @@ pub struct HlRange { // - For items: // + // [horizontal] +// attribute:: Emitted for attribute macros. // enum:: Emitted for enums. // function:: Emitted for free-standing functions. -// macro:: Emitted for macros. +// derive:: Emitted for derive macros. +// macro:: Emitted for function-like macros. // method:: Emitted for associated functions, also knowns as methods. // namespace:: Emitted for modules. // struct:: Emitted for structs. @@ -90,6 +92,7 @@ pub struct HlRange { // + // [horizontal] // punctuation:: Emitted for general punctuation. +// attributeBracket:: Emitted for attribute invocation brackets, that is the `#[` and `]` tokens. // angle:: Emitted for `<>` angle brackets. // brace:: Emitted for `{}` braces. // bracket:: Emitted for `[]` brackets. @@ -102,7 +105,6 @@ pub struct HlRange { // //- // // [horizontal] -// attribute:: Emitted for the `#[` `]` tokens. // builtinAttribute:: Emitted for names to builtin attributes in attribute path, the `repr` in `#[repr(u8)]` for example. // builtinType:: Emitted for builtin types like `u32`, `str` and `f32`. // comment:: Emitted for comments. diff --git a/editors/code/package.json b/editors/code/package.json index 5cad1752ccc..f4d85d6abfa 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1126,6 +1126,11 @@ "id": "attribute", "description": "Style for attributes" }, + { + "id": "attributeBracket", + "description": "Style for attribute invocation brackets, that is the `#[` and `]` tokens", + "superType": "punctuation" + }, { "id": "bitwise", "description": "Style for bitwise operators", @@ -1180,6 +1185,11 @@ "id": "constParameter", "description": "Style for const generics" }, + { + "id": "derive", + "description": "Style for derives", + "superType": "attribute" + }, { "id": "dot", "description": "Style for .",