Skip to content

Commit d70e608

Browse files
Improve word pattern regex to not match colons preceding namespaces
1 parent c920b09 commit d70e608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const crystalConfiguration = <LanguageConfiguration>{
4141
},
4242
],
4343
wordPattern:
44-
/(-?(?:0(?:b|o|x))?\d+(?:\.\d+)?(?:_?[iuf]\d+)?)|@{0,2}(:?[A-Za-z][^-`~@#%^&()=+[{}|;:'",<>\/.*\]\s\\!?]*[!?]?)/,
44+
/(?:-?(?:0(?:b|o|x))?\d+(?:\.\d+)?(?:_?[iuf]\d+)?)|@{0,2}(?:(?:(?<!:):)?[A-Za-z][^-`~@#%^&()=+[{}|;:'",<>\/.*\]\s\\!?]*[!?]?)/,
4545
};
4646

4747
let lsp_client: LanguageClient

0 commit comments

Comments
 (0)