Comments (8)
Emmet doesn't support that. The only way is to ditch smarty syntax and use normal html syntax in
tpl
files.
Which breaks templates during formatting; for example:
<a href="{$x|replace:"b":"c"}"> changes the "b" to " b" (with space)
from vscode-smarty.
Related to microsoft/vscode#670
But you can basically instruct emmet to provide html intellisense like this:
"emmet.syntaxProfiles": {
"tpl": "html"
}
(assuming your templates have the file extension tpl
)
from vscode-smarty.
I feel like it works better with the extra setting: emmet.triggerExpansionOnTab
"emmet.syntaxProfiles": {
"tpl": "html"
},
"emmet.triggerExpansionOnTab": true
from vscode-smarty.
@tajchumber That's good. Would you mind creating a pull request, so everyone can see it in the readme?
from vscode-smarty.
@jens1o thanks for the suggestion.
Just made the pull request: #12.
from vscode-smarty.
@jens1o This does not seem to work on my end, I'm not getting HTML or JS snippets.
from vscode-smarty.
@Starfox64 Could you open a new issue please?
from vscode-smarty.
@Starfox64 @tajchumber I honestly don't know what emmet.syntaxProfiles
is supposed to do, but it definitely doesn't add html intellisense to smarty files. What you need for that is this:
"emmet.includeLanguages": {
"smarty": "html"
},
But it only adds intellisense for creating new elements. You still don't have any intellisense for html that's already in. For example if you have a <div>
and want to add class=""
to it or add title=""
to <a href="">
. Emmet doesn't support that. The only way is to ditch smarty syntax and use normal html syntax in tpl
files.
"files.associations": {
"*.tpl": "html",
},
@jens1o why not reopen this one since there's no proper fix for this yet?
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
- There is no document formatter for smarty files installed HOT 12
- {* *} 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.