Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
disable snippets in __traits(), version(), debug()
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jun 22, 2021
1 parent 9b6c3d0 commit 6fa526d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/workspaced/com/snippets/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ class SnippetsComponent : ComponentWrapper
return SnippetInfo([SnippetLevel.strings, SnippetLevel.other]);
else
return SnippetInfo([SnippetLevel.strings]);
case tok!"(":
if (leading.length >= 2)
{
auto beforeLast = leading[$ - 2];
if (beforeLast.type.among(tok!"__traits", tok!"version", tok!"debug"))
return SnippetInfo([SnippetLevel.other]);
}
break;
default:
break;
}
Expand Down

0 comments on commit 6fa526d

Please sign in to comment.