Add language format and code action edits

This commit is contained in:
slhx agent
2026-06-21 14:21:09 +02:00
parent e4d6837f78
commit 616eea670b
4 changed files with 460 additions and 2 deletions
+9 -1
View File
@@ -30,6 +30,10 @@ pub const Action = union(enum) {
hover,
signature,
expand_hover,
language_format,
language_format_policy,
language_organize_imports,
language_code_actions,
diagnostics_open,
diagnostics_next,
diagnostics_previous,
@@ -220,7 +224,11 @@ pub const Leader = struct {
self.mode = .idle;
if (std.mem.eql(u8, text, "h")) return .hover;
if (std.mem.eql(u8, text, "s")) return .signature;
if (std.mem.eql(u8, text, "o")) return .expand_hover;
if (std.mem.eql(u8, text, "o")) return .language_organize_imports;
if (std.mem.eql(u8, text, "f")) return .language_format;
if (std.mem.eql(u8, text, "F")) return .language_format_policy;
if (std.mem.eql(u8, text, "w")) return .language_format_policy;
if (std.mem.eql(u8, text, "a")) return .language_code_actions;
self.message = "language action is not built in this profile yet";
return .{ .not_built = .lsp };
},