From 1e4f8a48819da450a73023f565c1bedfda33afd7 Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:07:31 -0400 Subject: Add proc arg tags to hover documentation --- src/server/documentation.odin | 12 ++++++++++++ tests/hover_test.odin | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/server/documentation.odin b/src/server/documentation.odin index 0dc058f..25d9de3 100644 --- a/src/server/documentation.odin +++ b/src/server/documentation.odin @@ -478,6 +478,18 @@ get_bit_field_field_signature :: proc( write_proc_param_list_and_return :: proc(sb: ^strings.Builder, value: SymbolProcedureValue) { strings.write_string(sb, "(") for arg, i in value.orig_arg_types { + if .Any_Int in arg.flags { + strings.write_string(sb, "#any_int ") + } + if .By_Ptr in arg.flags { + strings.write_string(sb, "#by_ptr ") + } + if .C_Vararg in arg.flags { + strings.write_string(sb, "#c_vararg ") + } + if .No_Alias in arg.flags { + strings.write_string(sb, "#no_alias ") + } build_string_node(arg, sb, false) if i != len(value.orig_arg_types) - 1 { strings.write_string(sb, ", ") diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 071bcba..f348447 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4834,6 +4834,16 @@ ast_hover_if_ternary_expr :: proc(t: ^testing.T) { } test.expect_hover(t, &source, "test.bar: int") } + +@(test) +ast_hover_proc_param_tags :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + f{*}oo :: proc (#by_ptr a: int, #any_int b: int) {} + `, + } + test.expect_hover(t, &source, "test.foo: proc(#by_ptr a: int, #any_int b: int)") +} /* Waiting for odin fix -- cgit v1.2.3