summaryrefslogtreecommitdiff
path: root/src/lsp/lsp.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-08 12:03:46 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commit1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2 (patch)
tree973976c63f560201638d453b4b8b277d9cb40040 /src/lsp/lsp.zig
parent13d5613b77c62c425c3a124a34c0c2528cc6251f (diff)
downloadpardes-1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2.tar.gz
pardes-1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2.zip
Add a readable static Callstack pane and align tagline text
Diffstat (limited to 'src/lsp/lsp.zig')
-rw-r--r--src/lsp/lsp.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lsp/lsp.zig b/src/lsp/lsp.zig
index 8dc4da4f..96d42bbd 100644
--- a/src/lsp/lsp.zig
+++ b/src/lsp/lsp.zig
@@ -16,6 +16,7 @@ pub const Kind = enum {
format,
select_refs,
completion,
+ callstack,
incoming_calls,
outgoing_calls,
supertypes,
@@ -24,7 +25,14 @@ pub const Kind = enum {
explain,
};
+pub const callstack_match = "@callstack-match ";
+pub const CallstackCorners = enum { rounded, square };
+pub const callstack_default_depth: u8 = 8;
+pub const callstack_max_depth: u8 = 64;
+
pub const Req = struct {
+ callstack_depth: u8 = callstack_default_depth,
+ callstack_corners: CallstackCorners = .rounded,
kind: Kind,
path: []const u8,
source: [:0]const u8,
@@ -46,7 +54,7 @@ pub const Doc = struct { path: []const u8, source: [:0]const u8 };
/// file of the server's language is synced before it is asked.
pub fn reachesOtherFiles(kind: Kind) bool {
return switch (kind) {
- .rename, .references, .implementation, .workspace_symbols, .incoming_calls, .outgoing_calls, .supertypes, .subtypes => true,
+ .rename, .references, .implementation, .workspace_symbols, .callstack, .incoming_calls, .outgoing_calls, .supertypes, .subtypes => true,
else => false,
};
}