Nova

Extensions


Readme

Liquid for Nova 🌊

A Nova extension that provides syntax highlighting for Liquid template markup and Jekyll custom tags and filters.

Language Support 📚

This extension adds supports for:

  • Liquid tags and filters
  • Some Jekyll-specific filters
  • Liquid detectors for HTML and Markdown files
  • Both Tree-sitter and Regex languages, for Novas both new and old!

Completions are in the works for the future, stay tuned!

Thanks!

Version 2.x of this extension exists thanks to the work of @hankthetank27' tree-sitter-liquid grammar. Hooray! 🎉


Changelog

Version 2.0 🌳

Released July 30, 2024.

Tree-sitter! I finally managed to migrate this extension to be a Tree-sitter language, using the tree-sitter library to support rich syntax rules.

This is an initial release, to prepare for the release of Nova 13, which will drop support for the legacy Regex language extensions later this year. So, somethings to consider before updating:

  • There is not support for some custom Jekyll tags, such as include_cached, seo, and feed_meta. I'm looking into adding these custom tags back to the extension soon.
  • SCSS (Liquid) and CSS (Liquid) were removed. Both never worked great before, so I'm planning to start fresh this time and try to reimplement it in a better way in the future.
  • I plan to rewrite the Completions in the future, stay tuned!

Also, some bugs were fixed --- mostly under the hood (like variables being considered methods). One major fix was in detectors. Now I believe HTML and Markdown files will be properly detected without conflicting with their non-Liquidfied counterparts :)

Please, help me make this new major version better by filing bugs and giving feedback on GitHub. Thanks!

Version 2.0.1

New:

  • Initial support for Jekyll-specific syntax Jekyll-specific tags, such as {% link %} and {% feed_meta %} are supported.

Fixes:

  • Fixes code-injections for Markdown Prevents HTML (Liquid) files to think they're actually Markdown files. They're not!
  • Fixes support for filters Sorry about that! Filters are working as it should have since v2.0 release.

Version 2.0.2

New:

  • New tags Added support for Jekyll {% include_relative %} tag.
  • Updates tree-sitter dylib Following latest release by @hankthetank27.

Version 1.2

New:

  • Liquid on Markdown and Liquid on CSS/SCSS You can now use Liquid in your Markdown, CSS and SCSS files.

To do:

  • Liquid for Nova still doesn't figure out automatically if you're writing Liquid on Markdown and CSS files. I plan to look further in file matches and detectors to fix this issue.

Version 1.2.1

Fixes:

  • Removes the experimental detectors for Liquid on SCSS, CSS and Markdown. I still can't figure it out how make them work.

Version 1.2.2

Chores:

  • Updates extension icon.

Version 1.2.3

Fixes:

  • Adds detectors for Liquid on CSS, SCSS and Markdown files.

Version 1.2.3-1

Chores:

  • Updates changelog.

Version 1.2.4

Fixes:

  • Fixes an issue with Markdown (Liquid) detector that activated in all cases.

Version 1.2.5

Ongoing:

  • Removes detectors for Liquid subsyntaxes other than HTML, since they do not provide the quality I'm aiming for as of yet.

Version 1.1

New:

  • v1.1 brings Completions! Liquid for Nova now supports code completions for both Liquid and Jekyll tags and filters.

Version 1.1.1

Chores:

  • Fixes the extension image, broken in the 1.1 release.
  • Updates the CHANGELOG with a new, leaner organization.

Version 1.1.2

Fixes:

  • Fixes a capture completion which generated an invalid syntax.
  • Prevents Nova to spell-check the {% comment %} tag.

Version 1.0

Initial release

Version 1.0.1

Fixes:

  • Removes YAML block, since that didn't worked.
  • Improves Liquid tag support in Nova 4.0+.

Version 1.0.2

Enhancements:

@fifty8 made the following enhancements:

  • Modified priority of html to 0.5 (value is valid between 0-1) (#1) (also a bugfix).
  • Added content matching rule for liquid handlebar (#1).

Version 1.0.3

Fixes:

  • Fix an issue where all .html files were identified as Liquid files (#2).

License

MIT License

Copyright (c) 2024 Arthur Freitas

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.