aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-07-30 02:43:22 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-07-30 02:43:22 +0200
commit0fc9da70bdc160ec6caf4cf5ffe50408a24d6d7a (patch)
treec36533a171081a028fdbbe297932326e5b8b93d1 /src/server
parentcdbc1bfd870ffc4d317b48ad49019fc9f6edb74f (diff)
Fix snippet support check to handle helix editor
Diffstat (limited to 'src/server')
-rw-r--r--src/server/completion.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index dc24ac6..a3b80c1 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -431,7 +431,7 @@ get_selector_completion :: proc(ast_context: ^AstContext, position_context: ^Doc
documentation = symbol.doc,
}
- if symbol.type == .Function {
+ if symbol.type == .Function && common.config.enable_snippets {
item.insertText = fmt.tprintf("%v($0)", item.label)
item.insertTextFormat = .Snippet
item.command.command = "editor.action.triggerParameterHints"
@@ -1003,7 +1003,7 @@ get_identifier_completion :: proc(ast_context: ^AstContext, position_context: ^D
})
//hard code for now
- top_results := combined[0:(min(50, len(combined)))]
+ top_results := combined[0:(min(100, len(combined)))]
for result in top_results {
result := result
@@ -1042,7 +1042,7 @@ get_identifier_completion :: proc(ast_context: ^AstContext, position_context: ^D
item.kind = cast(CompletionItemKind)result.type
- if result.type == .Function {
+ if result.type == .Function && common.config.enable_snippets {
item.insertText = fmt.tprintf("%v($0)", item.label)
item.insertTextFormat = .Snippet
item.deprecated = .Deprecated in result.flags