This commit is contained in:
AcerecA 2024-08-11 17:16:58 +02:00
parent 217a4e032e
commit 56883c0bed
2 changed files with 29 additions and 0 deletions

1
src/lsfw Submodule

@ -0,0 +1 @@
Subproject commit 5077a6cc6d6e0cf8ed95db234146aa14c42767f0

28
src/lsp.zig Normal file
View File

@ -0,0 +1,28 @@
const std = @import("std");
const lsp_types = @import("lsfw/src/types.zig");
const lsp = @import("lsfw/src/lsp.zig");
const lsp_doc = @import("lsfw/src/document.zig");
const State = struct {};
const Lsp = lsp.Lsp(State);
fn handleHover(allocator: std.mem.Allocator, context: *Lsp.Context, position: lsp_types.Position) ?[]const u8 {
_ = allocator;
_ = position;
_ = context;
return null;
}
pub fn start() !u8 {
const descr = lsp_types.ServerData{
.serverInfo = .{
.name = "skill lsp",
.version = "0.1.0",
},
};
var server = Lsp.init(std.heap.page_allocator, descr);
server.registerHoverCallback(handleHover);
return server.start();
}