aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-16 20:31:24 +1100
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-16 20:31:24 +1100
commitfd13515d070c6b40707780ed37df212ed23f746b (patch)
tree57e4fd83ed769188d0e7d31fd468e7a7ede3c580 /src
parent1f6d0a5743780dc25c61a32df49a527f8d49011b (diff)
Reduce scores for symbols starting with `_`
Diffstat (limited to 'src')
-rw-r--r--src/server/completion.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index e16c49c..7c30f78 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -410,6 +410,10 @@ score_completion_item :: proc(item: ^CompletionResult, curr_pkg: string) {
if item.symbol.pkg == curr_pkg {
item.score += 1
}
+
+ if strings.has_prefix(item.symbol.name, "_") {
+ item.score -= 0.5
+ }
}
@(private = "file")