diff --git a/CHANGELOG.md b/CHANGELOG.md index d49b48a..1fae495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 1.1.0 -- Add language service for syntax suggestions and completion. -- Improve syntax highlighting. +- Add completions for basic types and global objects. +- Add syntax highlighting for custom functions. - Update logo (still meh). # 1.0.1 diff --git a/README.md b/README.md index 93f819c..50aec27 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,14 @@ [![Installs](https://vsmarketplacebadge.apphb.com/installs/toba.vsfire.svg)](https://marketplace.visualstudio.com/items?itemName=toba.vsfire) [![David](https://david-dm.org/toba/vsfire.svg)](https://david-dm.org/toba/vsfire) -# Firestore Rules -Basic highlighting for new [Firestore security rules](https://cloud.google.com/firestore/docs/reference/security/). Priority for [additional language features](https://code.visualstudio.com/docs/extensionAPI/language-support), in decreasing order of likelihood that I'll get to it: +# Firestore Security Rules +Syntax highlighting and code completions for new [Firestore security rules](https://cloud.google.com/firestore/docs/reference/security/). Priority for [additional language features](https://code.visualstudio.com/docs/extensionAPI/language-support), in decreasing order of likelihood that I'll get to it: -- Completions (underway in a branch) then update syntax highlighting +- Completions for path captures and `allow` rules +- Corrections for a few syntax scenarios like multiple custom function parameters - Hovers - Snippets - Signature Helpers - Incremental Formatting -![Basic example](./screenshots/basic.png) \ No newline at end of file +![Basic example](./screenshots/completion.gif) \ No newline at end of file diff --git a/screenshots/completion.gif b/screenshots/completion.gif new file mode 100644 index 0000000..431f74e Binary files /dev/null and b/screenshots/completion.gif differ diff --git a/syntaxes/sample.rules b/syntaxes/sample.rules index 4ace9b9..80c7a7c 100644 --- a/syntaxes/sample.rules +++ b/syntaxes/sample.rules @@ -1,7 +1,7 @@ service cloud.firestore { match /databases/{database}/documents { match /{document=**} { - allow read, write: if request.auth != null && math.floor(request.time.day()) == 2; + allow read, write: if request.time.day != 2 } } }