From 9f0cfb7ad2120514ca8ffd21e08e3ddd0bfb34e9 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 14 Feb 2020 17:56:28 -0500 Subject: Teach the server about Semantic Tokens proposed LSP --- crates/ra_ide/src/lib.rs | 2 +- crates/ra_ide/src/syntax_highlighting.rs | 52 ++++++++++++++++---------------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index f86f98be7..82e10bc7e 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -75,7 +75,7 @@ pub use crate::{ runnables::{Runnable, RunnableKind, TestId}, source_change::{FileSystemEdit, SourceChange, SourceFileEdit}, ssr::SsrError, - syntax_highlighting::HighlightedRange, + syntax_highlighting::{tags, HighlightedRange}, }; pub use hir::Documentation; diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index d873f153e..812229b4e 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -17,32 +17,32 @@ use crate::{ }; pub mod tags { - pub(crate) const FIELD: &str = "field"; - pub(crate) const FUNCTION: &str = "function"; - pub(crate) const MODULE: &str = "module"; - pub(crate) const CONSTANT: &str = "constant"; - pub(crate) const MACRO: &str = "macro"; - - pub(crate) const VARIABLE: &str = "variable"; - pub(crate) const VARIABLE_MUT: &str = "variable.mut"; - - pub(crate) const TYPE: &str = "type"; - pub(crate) const TYPE_BUILTIN: &str = "type.builtin"; - pub(crate) const TYPE_SELF: &str = "type.self"; - pub(crate) const TYPE_PARAM: &str = "type.param"; - pub(crate) const TYPE_LIFETIME: &str = "type.lifetime"; - - pub(crate) const LITERAL_BYTE: &str = "literal.byte"; - pub(crate) const LITERAL_NUMERIC: &str = "literal.numeric"; - pub(crate) const LITERAL_CHAR: &str = "literal.char"; - - pub(crate) const LITERAL_COMMENT: &str = "comment"; - pub(crate) const LITERAL_STRING: &str = "string"; - pub(crate) const LITERAL_ATTRIBUTE: &str = "attribute"; - - pub(crate) const KEYWORD: &str = "keyword"; - pub(crate) const KEYWORD_UNSAFE: &str = "keyword.unsafe"; - pub(crate) const KEYWORD_CONTROL: &str = "keyword.control"; + pub const FIELD: &str = "field"; + pub const FUNCTION: &str = "function"; + pub const MODULE: &str = "module"; + pub const CONSTANT: &str = "constant"; + pub const MACRO: &str = "macro"; + + pub const VARIABLE: &str = "variable"; + pub const VARIABLE_MUT: &str = "variable.mut"; + + pub const TYPE: &str = "type"; + pub const TYPE_BUILTIN: &str = "type.builtin"; + pub const TYPE_SELF: &str = "type.self"; + pub const TYPE_PARAM: &str = "type.param"; + pub const TYPE_LIFETIME: &str = "type.lifetime"; + + pub const LITERAL_BYTE: &str = "literal.byte"; + pub const LITERAL_NUMERIC: &str = "literal.numeric"; + pub const LITERAL_CHAR: &str = "literal.char"; + + pub const LITERAL_COMMENT: &str = "comment"; + pub const LITERAL_STRING: &str = "string"; + pub const LITERAL_ATTRIBUTE: &str = "attribute"; + + pub const KEYWORD: &str = "keyword"; + pub const KEYWORD_UNSAFE: &str = "keyword.unsafe"; + pub const KEYWORD_CONTROL: &str = "keyword.control"; } #[derive(Debug)] -- cgit v1.2.3