We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply the following patch to semanticTokens/range and print which ast nodes will be traversed to generate semantic tokens.
semanticTokens/range
diff --git a/src/Server.zig b/src/Server.zig index 567de571..fec62c81 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -640,7 +640,7 @@ fn initializeHandler(server: *Server, arena: std.mem.Allocator, request: types.I }, .semanticTokensProvider = .{ .SemanticTokensOptions = .{ - .full = .{ .bool = true }, + // .full = .{ .bool = true }, .range = .{ .bool = true }, .legend = .{ .tokenTypes = std.meta.fieldNames(semantic_tokens.TokenType), diff --git a/src/features/semantic_tokens.zig b/src/features/semantic_tokens.zig index dfd7b1a0..69fd55d8 100644 --- a/src/features/semantic_tokens.zig +++ b/src/features/semantic_tokens.zig @@ -1048,6 +1048,7 @@ pub fn writeSemanticTokens( // reverse the ast from the root declarations for (nodes) |child| { + std.debug.print("node: {d}\n", .{child}); try writeNodeTokens(&builder, child); }
Then open a large file like Sema.zig or AstGen.zig and the move to the end of document. ZLS will generate tokens for the entire document.
Sema.zig
AstGen.zig
node: 3 node: 5 node: 7 node: 9 ... node: 140721 node: 140880 node: 140903 node: 140907 node: 140911 node: 140915 node: 140919 node: 140923 debug (server): Took 6527ms to process request-15-textDocument/semanticTokens/range on Thread 79111
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Apply the following patch to
semanticTokens/range
and print which ast nodes will be traversed to generate semantic tokens.Then open a large file like
Sema.zig
orAstGen.zig
and the move to the end of document.ZLS will generate tokens for the entire document.
The text was updated successfully, but these errors were encountered: