File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
plugins/hls-pragmas-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -200,10 +200,13 @@ completion _ide _ complParams = do
200200 | otherwise
201201 = [ mkPragmaCompl (prefix <> pragmaTemplate <> suffix) matcher detail
202202 | (pragmaTemplate, matcher, detail, appearWhere) <- validPragmas
203- , Fuzzy. test word matcher
204- , (appearWhere == NewLine && line == word)
205- || (appearWhere == CanInline && line /= word)
206- || (T. elem ' ' matcher && appearWhere == NewLine && Fuzzy. test line matcher)
203+ , -- Only suggest a pragma that need its own line if the whole line
204+ -- fuzzily matches the pragma
205+ (appearWhere == NewLine && Fuzzy. test line matcher ) ||
206+ -- Only suggest a pragma that appears in the middle of a line when
207+ -- the current word is not the only thing in the line and the
208+ -- current word fuzzily matches the pragma
209+ (appearWhere == CanInline && line /= word && Fuzzy. test word matcher)
207210 ]
208211 where
209212 line = T. toLower $ VFS. fullLine pfix
You can’t perform that action at this time.
0 commit comments