Skip to content

Commit 1f79ee4

Browse files
authored
Disable completion popup after #if and #end (#132)
1 parent ca8d6f1 commit 1f79ee4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/haxeLanguageServer/features/haxe/completion/CompletionFeature.hx

+8
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ class CompletionFeature {
110110
if (inComment) {
111111
return false;
112112
}
113+
// disable completion after `#if` and `#end`
114+
if (token.tok.match(Sharp("if")) || token.tok.match(Sharp("end"))) {
115+
return false;
116+
}
117+
// disable completion after `#if foo`
118+
if (token.parent?.tok.match(Sharp("if")) && token.previousSibling == null) {
119+
return false;
120+
}
113121
if (params.context == null) {
114122
return true;
115123
}

0 commit comments

Comments
 (0)