Skip to content

Commit 57c90b6

Browse files
committed
correct do not show completion in settings section if only tab or space is pressed
1 parent 5b41e43 commit 57c90b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

robotcode/language_server/robotframework/parts/completion.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,14 @@ async def complete_SettingSection( # noqa: N802
715715
) -> Union[List[CompletionItem], CompletionList, None]:
716716
from robot.parsing.model.statements import SectionHeader, Statement
717717

718+
# TODO should this be configurable?
719+
if (
720+
context is not None
721+
and context.trigger_kind == CompletionTriggerKind.TRIGGERCHARACTER
722+
and context.trigger_character in [" ", "\t"]
723+
):
724+
return None
725+
718726
if nodes_at_position.index(node) > 0 and not isinstance(nodes_at_position[0], SectionHeader):
719727
statement_node = cast(Statement, nodes_at_position[0])
720728
if len(statement_node.tokens) > 0:

0 commit comments

Comments
 (0)