mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Auto merge of #16808 - ShoyuVanilla:proc-macro-sem-token, r=Veykril
feat: Add proc macro semantic token type Closes #11529
This commit is contained in:
commit
2f872156fe
28 changed files with 56 additions and 14 deletions
|
@ -56,8 +56,8 @@ use hir_def::{
|
|||
AssocItemId, AssocItemLoc, AttrDefId, ConstId, ConstParamId, CrateRootModuleId, DefWithBodyId,
|
||||
EnumId, EnumVariantId, ExternCrateId, FunctionId, GenericDefId, GenericParamId, HasModule,
|
||||
ImplId, InTypeConstId, ItemContainerId, LifetimeParamId, LocalFieldId, Lookup, MacroExpander,
|
||||
MacroId, ModuleId, StaticId, StructId, TraitAliasId, TraitId, TupleId, TypeAliasId,
|
||||
TypeOrConstParamId, TypeParamId, UnionId,
|
||||
ModuleId, StaticId, StructId, TraitAliasId, TraitId, TupleId, TypeAliasId, TypeOrConstParamId,
|
||||
TypeParamId, UnionId,
|
||||
};
|
||||
use hir_expand::{attrs::collect_attrs, name::name, proc_macro::ProcMacroKind, MacroCallKind};
|
||||
use hir_ty::{
|
||||
|
@ -122,7 +122,7 @@ pub use {
|
|||
visibility::Visibility,
|
||||
// FIXME: This is here since some queries take it as input that are used
|
||||
// outside of hir.
|
||||
{AdtId, ModuleDefId},
|
||||
{AdtId, MacroId, ModuleDefId},
|
||||
},
|
||||
hir_expand::{
|
||||
attrs::{Attr, AttrId},
|
||||
|
|
|
@ -1236,6 +1236,11 @@ impl<'db> SemanticsImpl<'db> {
|
|||
sa.resolve_macro_call(self.db, macro_call)
|
||||
}
|
||||
|
||||
pub fn is_proc_macro_call(&self, macro_call: &ast::MacroCall) -> bool {
|
||||
self.resolve_macro_call(macro_call)
|
||||
.map_or(false, |m| matches!(m.id, MacroId::ProcMacroId(..)))
|
||||
}
|
||||
|
||||
pub fn is_unsafe_macro_call(&self, macro_call: &ast::MacroCall) -> bool {
|
||||
let sa = match self.analyze(macro_call.syntax()) {
|
||||
Some(it) => it,
|
||||
|
|
|
@ -369,6 +369,7 @@ impl CompletionItemKind {
|
|||
SymbolKind::LifetimeParam => "lt",
|
||||
SymbolKind::Local => "lc",
|
||||
SymbolKind::Macro => "ma",
|
||||
SymbolKind::ProcMacro => "pm",
|
||||
SymbolKind::Module => "md",
|
||||
SymbolKind::SelfParam => "sp",
|
||||
SymbolKind::SelfType => "sy",
|
||||
|
|
|
@ -348,6 +348,7 @@ pub enum SymbolKind {
|
|||
LifetimeParam,
|
||||
Local,
|
||||
Macro,
|
||||
ProcMacro,
|
||||
Module,
|
||||
SelfParam,
|
||||
SelfType,
|
||||
|
@ -366,9 +367,8 @@ pub enum SymbolKind {
|
|||
impl From<hir::MacroKind> for SymbolKind {
|
||||
fn from(it: hir::MacroKind) -> Self {
|
||||
match it {
|
||||
hir::MacroKind::Declarative | hir::MacroKind::BuiltIn | hir::MacroKind::ProcMacro => {
|
||||
SymbolKind::Macro
|
||||
}
|
||||
hir::MacroKind::Declarative | hir::MacroKind::BuiltIn => SymbolKind::Macro,
|
||||
hir::MacroKind::ProcMacro => SymbolKind::ProcMacro,
|
||||
hir::MacroKind::Derive => SymbolKind::Derive,
|
||||
hir::MacroKind::Attr => SymbolKind::Attribute,
|
||||
}
|
||||
|
@ -381,6 +381,7 @@ impl From<hir::ModuleDefId> for SymbolKind {
|
|||
hir::ModuleDefId::ConstId(..) => SymbolKind::Const,
|
||||
hir::ModuleDefId::EnumVariantId(..) => SymbolKind::Variant,
|
||||
hir::ModuleDefId::FunctionId(..) => SymbolKind::Function,
|
||||
hir::ModuleDefId::MacroId(hir::MacroId::ProcMacroId(..)) => SymbolKind::ProcMacro,
|
||||
hir::ModuleDefId::MacroId(..) => SymbolKind::Macro,
|
||||
hir::ModuleDefId::ModuleId(..) => SymbolKind::Module,
|
||||
hir::ModuleDefId::StaticId(..) => SymbolKind::Static,
|
||||
|
|
|
@ -1710,7 +1710,7 @@ use proc_macros::mirror;
|
|||
mirror$0! {}
|
||||
"#,
|
||||
expect![[r#"
|
||||
mirror Macro FileId(1) 1..77 22..28
|
||||
mirror ProcMacro FileId(1) 1..77 22..28
|
||||
|
||||
FileId(0) 26..32
|
||||
"#]],
|
||||
|
|
|
@ -248,6 +248,7 @@ fn traverse(
|
|||
// an attribute nested in a macro call will not emit `inside_attribute`
|
||||
let mut inside_attribute = false;
|
||||
let mut inside_macro_call = false;
|
||||
let mut inside_proc_macro_call = false;
|
||||
|
||||
// Walk all nodes, keeping track of whether we are inside a macro or not.
|
||||
// If in macro, expand it first and highlight the expanded code.
|
||||
|
@ -298,8 +299,9 @@ fn traverse(
|
|||
ast::Item::Fn(_) | ast::Item::Const(_) | ast::Item::Static(_) => {
|
||||
bindings_shadow_count.clear()
|
||||
}
|
||||
ast::Item::MacroCall(_) => {
|
||||
ast::Item::MacroCall(ref macro_call) => {
|
||||
inside_macro_call = true;
|
||||
inside_proc_macro_call = sema.is_proc_macro_call(macro_call);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
@ -344,6 +346,7 @@ fn traverse(
|
|||
}
|
||||
Some(ast::Item::MacroCall(_)) => {
|
||||
inside_macro_call = false;
|
||||
inside_proc_macro_call = false;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
@ -519,6 +522,9 @@ fn traverse(
|
|||
highlight |= HlMod::Attribute
|
||||
}
|
||||
if inside_macro_call && tt_level > 0 {
|
||||
if inside_proc_macro_call {
|
||||
highlight |= HlMod::ProcMacro
|
||||
}
|
||||
highlight |= HlMod::Macro
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -75,6 +75,7 @@ pub enum HlMod {
|
|||
Library,
|
||||
/// Used to differentiate individual elements within macro calls.
|
||||
Macro,
|
||||
ProcMacro,
|
||||
/// Mutable binding.
|
||||
Mutable,
|
||||
/// Used for public items.
|
||||
|
@ -146,6 +147,7 @@ impl HlTag {
|
|||
SymbolKind::LifetimeParam => "lifetime",
|
||||
SymbolKind::Local => "variable",
|
||||
SymbolKind::Macro => "macro",
|
||||
SymbolKind::ProcMacro => "proc_macro",
|
||||
SymbolKind::Module => "module",
|
||||
SymbolKind::SelfParam => "self_keyword",
|
||||
SymbolKind::SelfType => "self_type_keyword",
|
||||
|
@ -219,6 +221,7 @@ impl HlMod {
|
|||
HlMod::IntraDocLink,
|
||||
HlMod::Library,
|
||||
HlMod::Macro,
|
||||
HlMod::ProcMacro,
|
||||
HlMod::Mutable,
|
||||
HlMod::Public,
|
||||
HlMod::Reference,
|
||||
|
@ -243,6 +246,7 @@ impl HlMod {
|
|||
HlMod::IntraDocLink => "intra_doc_link",
|
||||
HlMod::Library => "library",
|
||||
HlMod::Macro => "macro",
|
||||
HlMod::ProcMacro => "proc_macro",
|
||||
HlMod::Mutable => "mutable",
|
||||
HlMod::Public => "public",
|
||||
HlMod::Reference => "reference",
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
@ -45,12 +46,12 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
</style>
|
||||
<pre><code><span class="keyword">use</span> <span class="module crate_root library">proc_macros</span><span class="operator">::</span><span class="brace">{</span><span class="function library">mirror</span><span class="comma">,</span> <span class="function library">identity</span><span class="comma">,</span> <span class="derive library">DeriveIdentity</span><span class="brace">}</span><span class="semicolon">;</span>
|
||||
|
||||
<span class="macro library">mirror</span><span class="macro_bang">!</span> <span class="brace macro">{</span>
|
||||
<span class="brace macro">{</span>
|
||||
<span class="comma macro">,</span><span class="builtin_type macro">i32</span> <span class="colon macro">:</span><span class="field declaration macro public">x</span> <span class="keyword macro">pub</span>
|
||||
<span class="comma macro">,</span><span class="builtin_type macro">i32</span> <span class="colon macro">:</span><span class="field declaration macro public">y</span> <span class="keyword macro">pub</span>
|
||||
<span class="brace macro">}</span> <span class="struct declaration macro">Foo</span> <span class="keyword macro">struct</span>
|
||||
<span class="brace macro">}</span>
|
||||
<span class="proc_macro library">mirror</span><span class="macro_bang">!</span> <span class="brace macro proc_macro">{</span>
|
||||
<span class="brace macro proc_macro">{</span>
|
||||
<span class="comma macro proc_macro">,</span><span class="builtin_type macro proc_macro">i32</span> <span class="colon macro proc_macro">:</span><span class="field declaration macro proc_macro public">x</span> <span class="keyword macro proc_macro">pub</span>
|
||||
<span class="comma macro proc_macro">,</span><span class="builtin_type macro proc_macro">i32</span> <span class="colon macro proc_macro">:</span><span class="field declaration macro proc_macro public">y</span> <span class="keyword macro proc_macro">pub</span>
|
||||
<span class="brace macro proc_macro">}</span> <span class="struct declaration macro proc_macro">Foo</span> <span class="keyword macro proc_macro">struct</span>
|
||||
<span class="brace macro proc_macro">}</span>
|
||||
<span class="keyword">macro_rules</span><span class="macro_bang">!</span> <span class="macro declaration">def_fn</span> <span class="brace">{</span>
|
||||
<span class="parenthesis">(</span><span class="punctuation">$</span><span class="parenthesis">(</span><span class="punctuation">$</span>tt<span class="colon">:</span>tt<span class="parenthesis">)</span><span class="punctuation">*</span><span class="parenthesis">)</span> <span class="operator">=</span><span class="angle">></span> <span class="brace">{</span><span class="punctuation">$</span><span class="parenthesis">(</span><span class="punctuation">$</span>tt<span class="parenthesis">)</span><span class="punctuation">*</span><span class="brace">}</span>
|
||||
<span class="brace">}</span>
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -29,6 +29,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
|
|||
.numeric_literal { color: #BFEBBF; }
|
||||
.bool_literal { color: #BFE6EB; }
|
||||
.macro { color: #94BFF3; }
|
||||
.proc_macro { color: #94BFF3; text-decoration: underline; }
|
||||
.derive { color: #94BFF3; font-style: italic; }
|
||||
.module { color: #AFD8AF; }
|
||||
.value_param { color: #DCDCCC; }
|
||||
|
|
|
@ -85,6 +85,7 @@ define_semantic_token_types![
|
|||
(LIFETIME, "lifetime"),
|
||||
(LOGICAL, "logical") => OPERATOR,
|
||||
(MACRO_BANG, "macroBang") => MACRO,
|
||||
(PROC_MACRO, "procMacro") => MACRO,
|
||||
(PARENTHESIS, "parenthesis"),
|
||||
(PUNCTUATION, "punctuation"),
|
||||
(SELF_KEYWORD, "selfKeyword") => KEYWORD,
|
||||
|
@ -143,6 +144,7 @@ define_semantic_token_modifiers![
|
|||
(INTRA_DOC_LINK, "intraDocLink"),
|
||||
(LIBRARY, "library"),
|
||||
(MACRO_MODIFIER, "macro"),
|
||||
(PROC_MACRO_MODIFIER, "proc_macro"),
|
||||
(MUTABLE, "mutable"),
|
||||
(PUBLIC, "public"),
|
||||
(REFERENCE, "reference"),
|
||||
|
|
|
@ -57,6 +57,7 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
|
|||
SymbolKind::Variant => lsp_types::SymbolKind::ENUM_MEMBER,
|
||||
SymbolKind::Trait | SymbolKind::TraitAlias => lsp_types::SymbolKind::INTERFACE,
|
||||
SymbolKind::Macro
|
||||
| SymbolKind::ProcMacro
|
||||
| SymbolKind::BuiltinAttr
|
||||
| SymbolKind::Attribute
|
||||
| SymbolKind::Derive
|
||||
|
@ -139,6 +140,7 @@ pub(crate) fn completion_item_kind(
|
|||
SymbolKind::LifetimeParam => lsp_types::CompletionItemKind::TYPE_PARAMETER,
|
||||
SymbolKind::Local => lsp_types::CompletionItemKind::VARIABLE,
|
||||
SymbolKind::Macro => lsp_types::CompletionItemKind::FUNCTION,
|
||||
SymbolKind::ProcMacro => lsp_types::CompletionItemKind::FUNCTION,
|
||||
SymbolKind::Module => lsp_types::CompletionItemKind::MODULE,
|
||||
SymbolKind::SelfParam => lsp_types::CompletionItemKind::VALUE,
|
||||
SymbolKind::SelfType => lsp_types::CompletionItemKind::TYPE_PARAMETER,
|
||||
|
@ -675,6 +677,7 @@ fn semantic_token_type_and_modifiers(
|
|||
SymbolKind::Trait => semantic_tokens::INTERFACE,
|
||||
SymbolKind::TraitAlias => semantic_tokens::INTERFACE,
|
||||
SymbolKind::Macro => semantic_tokens::MACRO,
|
||||
SymbolKind::ProcMacro => semantic_tokens::PROC_MACRO,
|
||||
SymbolKind::BuiltinAttr => semantic_tokens::BUILTIN_ATTRIBUTE,
|
||||
SymbolKind::ToolModule => semantic_tokens::TOOL_MODULE,
|
||||
},
|
||||
|
@ -728,6 +731,7 @@ fn semantic_token_type_and_modifiers(
|
|||
HlMod::IntraDocLink => semantic_tokens::INTRA_DOC_LINK,
|
||||
HlMod::Library => semantic_tokens::LIBRARY,
|
||||
HlMod::Macro => semantic_tokens::MACRO_MODIFIER,
|
||||
HlMod::ProcMacro => semantic_tokens::PROC_MACRO_MODIFIER,
|
||||
HlMod::Mutable => semantic_tokens::MUTABLE,
|
||||
HlMod::Public => semantic_tokens::PUBLIC,
|
||||
HlMod::Reference => semantic_tokens::REFERENCE,
|
||||
|
|
Loading…
Reference in a new issue