A simple CPU rendered GUI IDE experience.
macros
bendn 8 weeks ago
parent 666a888 · commit 4b1a6af
-rw-r--r--Cargo.toml2
-rw-r--r--ra-support49
-rw-r--r--src/sym.rs5
3 files changed, 48 insertions, 8 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8c404eb..e000e42 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,8 +28,10 @@ diff-match-patch-rs = "0.5.1"
regex = "1.11.3"
tree-house = { version = "0.3.0", features = ["fixtures"] }
+# for tree house grammar loading
helix-loader = { git = "https://github.com/bend-n/helix" }
helix-core = { git = "https://github.com/bend-n/helix" }
+
lsp-types = { git = "https://github.com/bend-n/helix", package = "helix-lsp-types", features = [
"proposed",
] }
diff --git a/ra-support b/ra-support
index db00ec7..173bf54 100644
--- a/ra-support
+++ b/ra-support
@@ -39,7 +39,7 @@ InitializeResult {
completion_provider: Some(
CompletionOptions {
resolve_provider: Some(
- false,
+ true,
),
trigger_characters: Some(
[
@@ -56,7 +56,7 @@ InitializeResult {
completion_item: Some(
CompletionOptionsCompletionItem {
label_details_support: Some(
- false,
+ true,
),
},
),
@@ -113,8 +113,37 @@ InitializeResult {
),
),
code_action_provider: Some(
- Simple(
- true,
+ Options(
+ CodeActionOptions {
+ code_action_kinds: Some(
+ [
+ CodeActionKind(
+ "",
+ ),
+ CodeActionKind(
+ "quickfix",
+ ),
+ CodeActionKind(
+ "refactor",
+ ),
+ CodeActionKind(
+ "refactor.extract",
+ ),
+ CodeActionKind(
+ "refactor.inline",
+ ),
+ CodeActionKind(
+ "refactor.rewrite",
+ ),
+ ],
+ ),
+ work_done_progress_options: WorkDoneProgressOptions {
+ work_done_progress: None,
+ },
+ resolve_provider: Some(
+ true,
+ ),
+ },
),
),
code_lens_provider: Some(
@@ -382,6 +411,9 @@ InitializeResult {
"macroBang",
),
SemanticTokenType(
+ "negation",
+ ),
+ SemanticTokenType(
"parenthesis",
),
SemanticTokenType(
@@ -432,6 +464,9 @@ InitializeResult {
"defaultLibrary",
),
SemanticTokenModifier(
+ "deprecated",
+ ),
+ SemanticTokenModifier(
"associated",
),
SemanticTokenModifier(
@@ -508,7 +543,7 @@ InitializeResult {
work_done_progress: None,
},
resolve_provider: Some(
- false,
+ true,
),
},
),
@@ -530,7 +565,6 @@ InitializeResult {
),
experimental: Some(
Object {
- "childModules": Bool(true),
"externalDocs": Bool(true),
"hoverRange": Bool(true),
"joinLines": Bool(true),
@@ -539,6 +573,7 @@ InitializeResult {
"onEnter": Bool(true),
"openCargoToml": Bool(true),
"parentModule": Bool(true),
+ "childModules": Bool(true),
"runnables": Object {
"kinds": Array [
String("cargo"),
@@ -553,7 +588,7 @@ InitializeResult {
ServerInfo {
name: "rust-analyzer",
version: Some(
- "1.92.0-nightly (f6aa851 2025-10-07)",
+ "0.0.0 (8bffb99c3f 2025-12-15)",
),
},
),
diff --git a/src/sym.rs b/src/sym.rs
index 9c9e50e..1d4a65d 100644
--- a/src/sym.rs
+++ b/src/sym.rs
@@ -127,7 +127,7 @@ fn r(
let ds: Style = Style { bg: bg, color: FG, flags: 0 };
let d: Cell = Cell { letter: None, style: ds };
let mut b = vec![d; c];
- const MAP: [([u8; 3], [u8; 3], &str); 51] = {
+ const MAP: [([u8; 3], [u8; 3], &str); 70] = {
car::map!(
amap::amap! {
const { SymbolKind::FILE.0 as usize } => ("#9a9b9a", " "),
@@ -148,6 +148,9 @@ fn r(
const { SymbolKind::OPERATOR.0 as usize } => ("#F29E74", "+ "),
const { SymbolKind::TYPE_PARAMETER.0 as usize } => ("#9a9b9a", "T "),
// const { SymbolKind::KEYWORD.0 as usize } => ("#FFAD66", "as"),
+
+ const { SymbolKind::MACRO.0 as usize } => ("#f28f74", "! "),
+ const { SymbolKind::PROC_MACRO.0 as usize } => ("#f28f74", "r!"),
_ => ("#9a9b9a", " ")
},
|(x, y)| (set_a(color_(x), 0.5), color_(x), y)