Comments (12)
Minimum would be HTML formatting and handling smarty like text. I'm not sure how it will behave.
Perfect solution would be to format it like in other languages: indent loops / conditionals, etc.
Examples can be seen in the shopware documentation e.g.: https://developers.shopware.com/designers-guide/smarty/
from vscode-smarty.
Good ping, I honestly forgot about this. Unfortunately, I'm busy at the moment. If somebody wants to provide a pull request, I'd be very glad to merge it.
from vscode-smarty.
@jens1o I tried to use the xml formatter with some minor changes, but unfortunately it didn't handle.
Would you find time to deal with this topic?
I know that smarty is old technology, but still used in many companies and a lot of people would use it :)
from vscode-smarty.
Hi,
any progress? :)
from vscode-smarty.
This is not supported currently.
How would you expect it to be formatted? (Could you give us an example, please?)
from vscode-smarty.
But yes, handling like HTML would be a good first step for .tpl files. Currently there is no formatting possible at all and when switching them to html in configuration smarty syntax is no more being highlighted.
from vscode-smarty.
Okay, that's indeed very nice formatting. I'll look in my holidays(~ next 6 weeks) how I can implement that and what I need to do.
from vscode-smarty.
Very cool, thank you!
I think some IDEs like PHPStorm already solve this. You may test a demo to see what they do.
from vscode-smarty.
Hi,
Enabling the HTML formatter for smarty templates as a minimum would make the plugin much more useful.
Thanks.
from vscode-smarty.
@jens1o hmm I could try at least :) Any tips?
from vscode-smarty.
First of all, thank you for your interest and time @kruzyk . :)
You could try implementing the same https://github.com/FabianLauer/vs-code-xml-format/blob/3402b6e5ce656bd930948ae6990638042d2af960/src/extension.ts
If we're lucky enough, the xml formatter is clever enough to just ignore smarty-specific syntax. :)
from vscode-smarty.
This is a good feature to have . As workaround you could change to html with Ctrl+Shift+P , "Change Language Mode". Format and then go back to smarty.
from vscode-smarty.
Related Issues (20)
- Add html autocompletion HOT 1
- whether or not support the .phtml type file please? HOT 1
- emmet support HOT 2
- meta issue: Create a language server powering all features to improve experience HOT 4
- feature request : Create a language server to handle multiple templates HOT 5
- 3.1.32 {parent} and {child} tags support
- {* *} Comments not highlighted in the syntax HOT 8
- Is it possible to use *.htm file extension instead of *.tpl? HOT 2
- The project has no license yet. HOT 4
- Emmet/HTML snippets don't work HOT 4
- Enable "HTML mirror cursor" and "F2 to rename tag" for .tpl files
- Unknown function "include".
- Formatting the entire document does not work. HOT 3
- commenting delimiters in a literal block HOT 2
- How can I change the default boundary character HOT 2
- remove Character \ HOT 2
- How to assign variable in snippets.json? HOT 1
- how to change default syntax {} to <%%> HOT 3
- Is this maintained? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-smarty.