diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-04-02 16:55:44 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-04-02 16:55:44 +0200 |
| commit | cae09e9a7bae2dd14ee5a145902106822a31408b (patch) | |
| tree | bc294722d980cb5a5d5dd4d0e403ba40a18d5f8f /src | |
| parent | 5edd504c40f5c942c84254ef5f27699867e3b103 (diff) | |
reference also needs to look in workspace folder
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 2 | ||||
| -rw-r--r-- | src/server/references.odin | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index db41ad7..98716ca 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -5285,6 +5285,6 @@ get_document_position_node :: proc( case ^ast.Or_Return_Expr: get_document_position(n.expr, position_context) case: - log.errorf("Unhandled node kind: %T", n) + log.warnf("Unhandled node kind: %T", n) } } diff --git a/src/server/references.odin b/src/server/references.odin index efa993d..4c08998 100644 --- a/src/server/references.odin +++ b/src/server/references.odin @@ -77,6 +77,11 @@ resolve_references :: proc( nil, ) + for workspace in common.config.workspace_folders { + uri, _ := common.parse_uri(workspace.uri, context.temp_allocator) + filepath.walk(uri.path, walk_directories, nil) + } + reset_ast_context(ast_context) if position_context.struct_type != nil && @@ -154,6 +159,8 @@ resolve_references :: proc( for fullpath in fullpaths { data, ok := os.read_entire_file(fullpath, context.allocator) + log.error("looking: ", fullpath, "\n") + if !ok { log.errorf("failed to read entire file for indexing %v", fullpath) continue |