Skip to content

Commit

Permalink
Sooo not ready for ZON ..
Browse files Browse the repository at this point in the history
  • Loading branch information
llogick committed Nov 14, 2024
1 parent e84d1f4 commit 78b4051
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ fn semanticTokensRangeHandler(server: *Server, arena: std.mem.Allocator, request

fn completionHandler(server: *Server, arena: std.mem.Allocator, request: types.CompletionParams) Error!lsp.ResultType("textDocument/completion") {
const handle = server.document_store.getHandle(request.textDocument.uri) orelse return null;
if (handle.tree.mode == .zon) return null; // if we're doing completions it def has errors

const source_index = offsets.positionToIndex(handle.tree.source, request.position, server.offset_encoding);

Expand Down
1 change: 1 addition & 0 deletions src/analysis.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4409,6 +4409,7 @@ pub fn lookupSymbolGlobal(
) error{OutOfMemory}!?DeclWithHandle {
const tree = handle.tree;
const document_scope = try handle.getDocumentScope();
if (document_scope.scopes.len == 0) return null;
var current_scope = innermostScopeAtIndex(document_scope, source_index);

while (true) {
Expand Down

0 comments on commit 78b4051

Please sign in to comment.