aboutsummaryrefslogtreecommitdiff
path: root/src/server/hover.odin
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2025-06-20 18:38:28 +0200
committerDanielGavin <danielgavin5@hotmail.com>2025-06-20 18:38:28 +0200
commitfa626ad544a171313ac1679e0865d9d7d822c63b (patch)
tree4d8755ee42984d69a71a26003745c9c11ce648ab /src/server/hover.odin
parent5caff349cf9dad7c697eb49250ac4c1e75e259fb (diff)
Move ast.odin to server + add resolve_when_condition
Diffstat (limited to 'src/server/hover.odin')
-rw-r--r--src/server/hover.odin10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/hover.odin b/src/server/hover.odin
index 89b75eb..afeab99 100644
--- a/src/server/hover.odin
+++ b/src/server/hover.odin
@@ -90,7 +90,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if position_context.identifier != nil {
if ident, ok := position_context.identifier.derived.(^ast.Ident); ok {
- if _, ok := common.keyword_map[ident.name]; ok {
+ if _, ok := keyword_map[ident.name]; ok {
hover.contents.kind = "plaintext"
hover.range = common.get_token_range(position_context.identifier^, ast_context.file.src)
return hover, true, true
@@ -151,7 +151,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if symbol, ok := resolve_type_expression(&ast_context, v.types[i]); ok {
symbol.name = name
symbol.pkg = comp_symbol.name
- symbol.signature = common.node_to_string(v.types[i])
+ symbol.signature = node_to_string(v.types[i])
hover.contents = write_hover_content(&ast_context, symbol)
return hover, true, true
}
@@ -164,7 +164,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if symbol, ok := resolve_type_expression(&ast_context, v.types[i]); ok {
symbol.name = name
symbol.pkg = comp_symbol.name
- symbol.signature = common.node_to_string(v.types[i])
+ symbol.signature = node_to_string(v.types[i])
hover.contents = write_hover_content(&ast_context, symbol)
return hover, true, true
}
@@ -255,7 +255,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
if symbol, ok := resolve_type_expression(&ast_context, v.types[i]); ok {
symbol.name = name
symbol.pkg = selector.name
- symbol.signature = common.node_to_string(v.types[i])
+ symbol.signature = node_to_string(v.types[i])
hover.contents = write_hover_content(&ast_context, symbol)
return hover, true, true
}
@@ -310,7 +310,7 @@ get_hover_information :: proc(document: ^Document, position: common.Position) ->
}
}
}
- }
+ }
return {}, false, true
} else if position_context.identifier != nil {
reset_ast_context(&ast_context)