Skip to content

Add syntax highlighting support for int polyvars #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## master

**Improvements:**
- Add syntax support for int polyvariants

## 2.0.1

- Fixes an issue where `:RescriptTypeHint`, `:RescriptUpgrade` fail with an 127 exit code (due to missing analysis binaries)
Expand Down
7 changes: 7 additions & 0 deletions examples/basic/src/polySyntax.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let a = #normal

let b = #"exo-tic"

let c = #\"legacy exo-tic"

let d = #732
1 change: 1 addition & 0 deletions syntax/rescript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ syntax region resString start="\v[a-z]`" end="\v`" contains=resInterpolationVari

" Polymorphic variants
syntax match resPolyVariant "\v#[A-za-z][A-Za-z0-9_'$]*"
syntax match resPolyVariant "\v#[0-9]+"
syntax match resPolyVariant "\v#\".*\""
syntax match resPolyVariant "\v#\\\".*\""

Expand Down