Merge pull request #572 from Techatrix/patch-stduri
fix 'Cannot resolve std library import'
This commit is contained in:
commit
a73c77db6d
@ -54,6 +54,7 @@ allocator: std.mem.Allocator,
|
||||
handles: UriToHandleMap = .{},
|
||||
build_files: BuildFileList = .{},
|
||||
|
||||
// TODO use pointer back to Server.config
|
||||
config: Config,
|
||||
std_uri: ?[]const u8,
|
||||
// TODO make this configurable
|
||||
|
@ -2568,15 +2568,16 @@ pub fn init(
|
||||
// see: https://github.com/zigtools/zls/issues/536
|
||||
analysis.init(allocator);
|
||||
|
||||
var server: Server = .{
|
||||
.config = config,
|
||||
var cfg = config;
|
||||
|
||||
try cfg.configChanged(allocator, config_path);
|
||||
|
||||
return Server{
|
||||
.config = cfg,
|
||||
.allocator = allocator,
|
||||
.document_store = try DocumentStore.init(allocator, config),
|
||||
.document_store = try DocumentStore.init(allocator, cfg),
|
||||
.log_level = log_level,
|
||||
};
|
||||
try server.configChanged(config_path);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
pub fn deinit(server: *Server) void {
|
||||
|
@ -14,7 +14,7 @@ test "Open file, ask for semantic tokens" {
|
||||
try ctx.request("textDocument/semanticTokens/full",
|
||||
\\{"textDocument":{"uri":"file:///test.zig"}}
|
||||
,
|
||||
\\{"data":[0,0,5,7,0,0,6,3,2,32,0,4,1,11,0,0,2,7,12,0,0,8,5,9,0]}
|
||||
\\{"data":[0,0,5,7,0,0,6,3,0,33,0,4,1,11,0,0,2,7,12,0,0,8,5,9,0]}
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user