aboutsummaryrefslogtreecommitdiff
path: root/src/server/rename.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-07-11 23:22:31 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-07-11 23:22:31 +0200
commit0f73b28db794a37ec0bfb9bc9c866d5b74ebf0ee (patch)
tree0ea8c9b9bcfaf20ecb32728b4eece73634191b6e /src/server/rename.odin
parent96266332bfc5cef2bd06aa88f231999322e0513c (diff)
More reference workindex-caching
Diffstat (limited to 'src/server/rename.odin')
-rw-r--r--src/server/rename.odin43
1 files changed, 1 insertions, 42 deletions
diff --git a/src/server/rename.odin b/src/server/rename.odin
index 20d7478..45fad45 100644
--- a/src/server/rename.odin
+++ b/src/server/rename.odin
@@ -13,47 +13,6 @@ get_rename :: proc(document: ^Document, new_text: string, position: common.Posit
edits := make([dynamic]TextEdit, context.temp_allocator)
- /*
- symbol_and_nodes := resolve_entire_file(document)
-
- ast_context := make_ast_context(document.ast, document.imports, document.package_name, document.uri.uri)
-
- position_context, ok := get_document_position_context(document, position, .Hover)
-
- get_globals(document.ast, &ast_context)
-
- if position_context.function != nil {
- get_locals(document.ast, position_context.function, &ast_context, &position_context)
- }
-
- if position_context.identifier != nil {
- ast_context.use_locals = true
- ast_context.use_globals = true
- ast_context.current_package = ast_context.document_package
-
- ident := position_context.identifier.derived.(^ast.Ident)^
-
- if resolved, ok := resolve_type_identifier(&ast_context, ident); ok {
- for k, v in symbol_and_nodes {
- if ident2, ok := v.node.derived.(^ast.Ident); ok {
- log.error(ident2)
- }
- if ident2, ok := v.node.derived.(^ast.Ident); ok && resolved.pkg == v.symbol.pkg && ident2.name == ident.name {
- edit := TextEdit {
- newText = new_text,
- range = common.get_token_range(v.node^, position_context.file.src),
- }
- append(&edits, edit)
- }
- }
-
-
-
-
- }
-
- }
-
document_change := TextDocumentEdit {
edits = edits[:],
textDocument = {
@@ -65,7 +24,7 @@ get_rename :: proc(document: ^Document, new_text: string, position: common.Posit
append(&document_changes, document_change)
workspace.documentChanges = document_changes[:]
- */
+
return workspace, true
} \ No newline at end of file