Skip to content

Consider using more accurate wordPattern #224

@lierdakil

Description

@lierdakil

Currently, language-haskell sets the word pattern to

wordPattern: /([\w'_][\w'_\d]*)|([0-9]+\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)/

Would be nice to use something that matches the syntax definition itself, f.ex.

/(?:[\p{Ll}_\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)|(?:[\p{S}\p{P}](?<![(),;\[\]`{}_"']))+/u

Feel free to omit operator regex if you feel it's extraneous, I'm on the fence about it.

Side note: numbers are apparently filtered by vscode anyway, so matching on numeric literals is kinda pointless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions