wintercms / vscode-extension Goto Github PK
View Code? Open in Web Editor NEWOfficial Winter CMS VSCode extension
Home Page: https://marketplace.visualstudio.com/items?itemName=wintercms.winter-cms
License: MIT License
Official Winter CMS VSCode extension
Home Page: https://marketplace.visualstudio.com/items?itemName=wintercms.winter-cms
License: MIT License
First of all, this is not a real issue but more like a conceptual discussion and comments. Although maybe something could be done/improved in the extension logic or at least maybe README could be updated with settings I will give below. Also I am aware that this is only Preview version of extension so probably you are also aware of this.
Anyways, I installed extension yesterday and played around it a little - Winter CMS page file (.htm
) detection works as expected but problems start to arise when I open, for example, component, partial and controller .htm
files - by default (at least in my VSCode setup) they are also detected as Winter CMS Template files but as they don't contain ==
delimiters and are not true Winter CMS files but more like standart html files then syntax highlighting gets messed around and doesn't work for html code in the files:
So my workaround at this problem was to update my VSCode workspace file association settings (.vscode/settings.json
file):
{
"files.associations": {
"*.htm": "wintercms",
"**/controllers/**/*.htm": "html",
"**/components/**/*.htm": "wintercms-twig",
"**/partials/**/*.htm": "html"
}
}
And now the syntax highlighting looks like this for the same component file:
I didn't tested my setup in all scenarios and I know that it's not 100% safe because, for example, partials can also contain YAML section with description
field but so far looks and works at least better than default auto-detection feature for component, partial and controller html files.
It would be great to have support for .block
files from the plugin winter-blocks-plugin.
The file schema :
I started the work here, but I don't have time to do more at the moment:
https://github.com/damsfx/vscode-extension/tree/add-blocks
We plan to release an official VS Code extension for supercharging Winter CMS development in Visual Studio Code.
Some of the features that we intend to include in the initial release are as follows:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.