aboutsummaryrefslogtreecommitdiff
path: root/src/server/hover.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-01-11 23:21:57 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-01-11 23:21:57 +0100
commit3f3eb27677088d86cd7e0331f98385d497d0966a (patch)
tree1f3fc486ea5f8b2da3603fd9b0cca9dcf9572fa2 /src/server/hover.odin
parent04e2312b458d0448bf39bd94a1770c0710c8f255 (diff)
simplified how variables are decided
Diffstat (limited to 'src/server/hover.odin')
-rw-r--r--src/server/hover.odin6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin
index b77c0b1..d19d990 100644
--- a/src/server/hover.odin
+++ b/src/server/hover.odin
@@ -18,7 +18,6 @@ import "shared:index"
import "shared:analysis"
write_hover_content :: proc(ast_context: ^analysis.AstContext, symbol: index.Symbol) -> MarkupContent {
-
using analysis;
content: MarkupContent;
@@ -34,7 +33,6 @@ write_hover_content :: proc(ast_context: ^analysis.AstContext, symbol: index.Sym
}
}
- build_procedure_symbol_return(&symbol);
build_procedure_symbol_signature(&symbol);
cat := concatenate_symbol_information(ast_context, symbol, false);
@@ -99,7 +97,7 @@ get_hover_information :: proc(document: ^common.Document, position: common.Posit
resolved.signature = get_signature(&ast_context, ident, resolved);
resolved.name = ident.name;
- if is_variable, ok := ast_context.variables[ident.name]; ok && is_variable {
+ if resolved.type == .Variable {
resolved.pkg = ast_context.document_package;
}
@@ -166,7 +164,7 @@ get_hover_information :: proc(document: ^common.Document, position: common.Posit
resolved.signature = get_signature(&ast_context, ident, resolved);
resolved.name = ident.name;
- if is_variable, ok := ast_context.variables[ident.name]; ok && is_variable {
+ if resolved.type == .Variable {
resolved.pkg = ast_context.document_package;
}