Open
Conversation
The runtime had support to detect handlebars (*.hbs) files as filetype handlebars but was lacking any indent or syntax highlighting for that filetype. The handlebars syntax file is also a prerequisite for the glimmer syntax. Permission was granted by the original author to retrofit these into the Vim runtime. Original License (MIT) maintained in code comments.
In commit cdf7172 ("patch 8.2.4424: ".gts" and ".gjs" files are not recognized", 2022-02-19) support for the glimmer file types were added. Problem: Syntax hilighting suppoprt was missing. Solution: Added a glimmer syntax file that will leverage the base syntaxs (javascript/typescript) and include handlebars syntax for .gjs/.gts files.
08d4810 to
8636c41
Compare
Contributor
Author
|
I am unable to understand the current test failures. They appear to be network issues concerning Linux OS packages unrelated to the runtime files added in this PR? Please advise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds syntax highlighting and indentation support for Handlebars (
*.hbs) templates and Glimmer (*.gjs/*.gts) files. While Vim already detected these filetypes, it lacked the syntax and indentation definitions needed for proper editing.Changes:
Handlebars Support:
runtime/syntax/handlebars.vimwith syntax highlighting for Handlebars templatesruntime/indent/handlebars.vimwith better indentation rules for HandlebarsGlimmer Support:
runtime/syntax/glimmer.vimthat combines JavaScript/TypeScript syntax with Handlebars syntax<template>blocks within Glimmer filesThe Handlebars code is adapted from an external project with permission from the original author under the MIT license (properly attributed in both files). This enhances Vim's support for Ember.js and other frameworks that use these template formats.