aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-12 10:15:46 -0400
committerGitHub <noreply@github.com>2025-08-12 10:15:46 -0400
commit9e6c39fcd74edce577015d4c2a09cbad89adf958 (patch)
treea622c9d25259eec1b60f7e83ce1898d046ff6e08
parent35a6216537c8aaa44c68df6c37b3f54cf37c2d29 (diff)
parenta757b6029e6d7397700b12e7b8702161215b5373 (diff)
Merge pull request #863 from BradLewis/master
Revert filtering docs above symbols due to issues when using attributes
-rw-r--r--src/server/ast.odin6
-rw-r--r--tests/hover_test.odin12
2 files changed, 0 insertions, 18 deletions
diff --git a/src/server/ast.odin b/src/server/ast.odin
index 28591f0..7c0921c 100644
--- a/src/server/ast.odin
+++ b/src/server/ast.odin
@@ -540,12 +540,6 @@ get_doc :: proc(node: ^ast.Expr, comment: ^ast.Comment_Group, allocator: mem.All
return ""
}
- // The odin parser currently incorrectly adds comments that are more than a line above
- // the symbol as a doc comment. We do a quick check here to handle that specific case.
- if node != nil && comment.list[len(comment.list) - 1].pos.line < node.pos.line - 1 {
- return ""
- }
-
tmp: string
for doc in comment.list {
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 635ac31..dc23947 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -3588,18 +3588,6 @@ ast_hover_parapoly_proc_dynamic_array_elems :: proc(t: ^testing.T) {
}
@(test)
-ast_hover_shouldnt_add_docs_with_newline :: proc(t: ^testing.T) {
- source := test.Source {
- main = `package test
- // Not a doc for Foo
-
- F{*}oo :: struct {}
- `,
- }
- test.expect_hover(t, &source, "test.Foo: struct {}")
-}
-
-@(test)
ast_hover_parapoly_proc_slice_param :: proc(t: ^testing.T) {
source := test.Source {
main = `package test