aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-29 19:27:27 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-06-29 19:27:27 -0400
commitc9af6de66b4ab64ed65a9ea118db9036f4ea414d (patch)
tree4dbd97e5094cb4f092ffa2c5cd3c36846aa91ae6 /src/server
parente3f50ae0af0864091aafdbef043481e33a49a1a2 (diff)
Correct package information on types
Diffstat (limited to 'src/server')
-rw-r--r--src/server/documentation.odin12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index f671243..b50a18d 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -209,11 +209,17 @@ get_short_signature :: proc(ast_context: ^AstContext, symbol: Symbol) -> string
}
write_symbol_type_information :: proc(ast_context: ^AstContext, sb: ^strings.Builder, symbol: Symbol, pointer_prefix: string) {
+ append_type_pkg := false
pkg_name := get_pkg_name(ast_context, symbol.type_pkg)
- if pkg_name == "" || symbol.type_pkg == symbol.pkg {
- fmt.sbprintf(sb, "%s%s", pointer_prefix, symbol.type_name)
- } else {
+ if pkg_name != "" {
+ if _, ok := keyword_map[symbol.type_name]; !ok {
+ append_type_pkg = true
+ }
+ }
+ if append_type_pkg {
fmt.sbprintf(sb, "%s%s.%s", pointer_prefix, pkg_name, symbol.type_name)
+ } else {
+ fmt.sbprintf(sb, "%s%s", pointer_prefix, symbol.type_name)
}
}