Skip to content

Commit 69043de

Browse files
committed
add semantic tokens for placeholders
1 parent e91ff4b commit 69043de

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/lsp.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,9 @@ mod server {
892892
const TRIADIC_MODIFIER_STT: SemanticTokenType = SemanticTokenType::new("triadic_modifier");
893893
const MODULE_STT: SemanticTokenType = SemanticTokenType::new("uiua_module");
894894

895-
const UIUA_SEMANTIC_TOKEN_TYPES: [SemanticTokenType; 13] = [
895+
const UIUA_SEMANTIC_TOKEN_TYPES: [SemanticTokenType; 14] = [
896896
SemanticTokenType::COMMENT,
897+
SemanticTokenType::PARAMETER,
897898
UIUA_NUMBER_STT,
898899
UIUA_STRING_STT,
899900
STACK_FUNCTION_STT,
@@ -909,8 +910,9 @@ mod server {
909910
];
910911

911912
const NO_STT: SemanticTokenType = SemanticTokenType::new("none");
912-
const GENERIC_SEMANTIC_TOKEN_TYPES: [SemanticTokenType; 13] = [
913+
const GENERIC_SEMANTIC_TOKEN_TYPES: [SemanticTokenType; 14] = [
913914
SemanticTokenType::COMMENT,
915+
SemanticTokenType::PARAMETER,
914916
SemanticTokenType::NUMBER,
915917
SemanticTokenType::new("lifetime"),
916918
NO_STT,
@@ -1636,6 +1638,7 @@ mod server {
16361638
};
16371639
stt
16381640
}
1641+
SpanKind::Placeholder(_) => SemanticTokenType::PARAMETER,
16391642
_ => continue,
16401643
};
16411644
let mut token_type = UIUA_SEMANTIC_TOKEN_TYPES

todo.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## 0.14
44
The next version of Uiua
55

6-
- Placeholder semantic tokens in LSP
76
- Optimize `conjoin inventory`
87
- Stabilize `backward`, `case`
98
- Compile-time code string evaluation

0 commit comments

Comments
 (0)