This commit is contained in:
hatoo 2023-08-23 23:55:39 +09:00
parent d2fad9e386
commit 2cdba2df75
2 changed files with 4 additions and 5 deletions

2
Cargo.lock generated
View file

@ -787,7 +787,7 @@ dependencies = [
[[package]]
name = "tree-sitter-egglog"
version = "0.0.1"
source = "git+https://github.com/hatoo/tree-sitter-egglog.git#45c64e5daaab67ec06821320216d40aff4b1fde8"
source = "git+https://github.com/hatoo/tree-sitter-egglog.git#cbe0926d003a6740834fd8acfc643bb8935d9685"
dependencies = [
"cc",
"tree-sitter",

View file

@ -8,12 +8,12 @@ use tree_sitter_highlight::{Highlight, HighlightConfiguration, HighlightEvent, H
use tree_sitter_traversal::{traverse, Order};
pub const LEGEND_TYPE: &[SemanticTokenType] = &[
SemanticTokenType::KEYWORD,
SemanticTokenType::FUNCTION,
SemanticTokenType::VARIABLE,
SemanticTokenType::STRING,
SemanticTokenType::COMMENT,
SemanticTokenType::NUMBER,
SemanticTokenType::KEYWORD,
SemanticTokenType::OPERATOR,
SemanticTokenType::PARAMETER,
];
@ -247,11 +247,11 @@ impl LanguageServer for Backend {
.log_message(MessageType::INFO, "semantic_tokens_full")
.await;
let highlight_names = [
"keyword",
"attribute",
"constant",
"function.builtin",
"function",
"keyword",
"operator",
"property",
"punctuation",
@ -305,8 +305,7 @@ impl LanguageServer for Backend {
delta_line,
delta_start,
length: (e - s) as u32,
// TODO: Use appropriate token type
token_type: 2 as u32,
token_type: t.0 as u32,
token_modifiers_bitset: 0,
});
pre_line = line;