summaryrefslogtreecommitdiff
path: root/src/lsp/lsp.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/lsp/lsp.zig')
-rw-r--r--src/lsp/lsp.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lsp/lsp.zig b/src/lsp/lsp.zig
index 038e4230..758d3042 100644
--- a/src/lsp/lsp.zig
+++ b/src/lsp/lsp.zig
@@ -23,6 +23,8 @@ pub const Kind = enum {
subtypes,
status,
explain,
+ /// The Index word: the command line that makes the file's `index.scip`.
+ index,
};
pub const callstack_match = "@callstack-match ";
@@ -32,6 +34,9 @@ pub const callstack_max_depth: u8 = 64;
pub const Req = struct {
callstack_depth: u8 = callstack_default_depth,
kind: Kind,
+ /// The pane holds changes not saved: what the index says of the file
+ /// on disk may be wrong of them, so the server answers (Scip.zig).
+ dirty: bool = false,
path: []const u8,
source: [:0]const u8,
offset: u32,
@@ -67,7 +72,7 @@ pub fn explaining(req: Req) Req {
var r = req;
const sp = std.mem.indexOfScalar(u8, req.arg, ' ') orelse req.arg.len;
const named = std.meta.stringToEnum(Kind, req.arg[0..sp]) orelse .definition;
- r.explains = if (named == .explain or named == .status) .definition else named;
+ r.explains = if (named == .explain or named == .status or named == .index) .definition else named;
r.arg = if (sp < req.arg.len) req.arg[sp + 1 ..] else "";
return r;
}