duyluonglc / vscode-edge Goto Github PK
View Code? Open in Web Editor NEWThis package adds syntax highligting for Edge templating engine
License: MIT License
This package adds syntax highligting for Edge templating engine
License: MIT License
line 91:
"@each(${1:key, ${2:value} in ${3:object})",
There are some errors in the One Dark Pro theme:
Hi,
I was using @set('share_text_encoded', urlEncode(open_graph_title))
to encode strings for later usage in links and this was fine. But I later found that single quotes were not being encoded which broke some other code.
The solution was to use replace(/'/g, "%27")
to explicitly encode the single quotes
@set('share_text_encoded', urlEncode(open_graph_title).replace(/'/g, "%27"))
this is also working just fine BUT it breaks syntax highlighting (presumably because the single quote in the replace
method is unmatched.
The attached gif shows all subsequent text turning green when the line with .replace(/'/g, "%27")
is uncommented
When using dynamic blocks within an attribute (inside the quotes, ""
), the block takes on the scope of an HTML string, specifically string.quoted.double.html
. For example:
<input value="{{ old('title', '') }}">
The block inside the value attribute, {{ old('title', '') }}
, is all the same color, as if it were a string.
I've attached an image that shows how it's rendered in VSCode (on top) and in Sublime (on bottom).
I know these examples use Adonis specific view helpers but thought I could use them as an example of the issue.
Thanks!
Hello
No formatting (Format Document) for .edge?
Component name not highlighted
@!input({
label: 'Destination URL',
type: 'url',
name: 'original',
value: values.original,
error: flashMessages.get('errors.original'),
placeholder: 'https://',
className: 'mb-4',
description: 'Long link you want to shorten',
maxlength: 255,
})
In object key-value pairs not highlighted
@!component('cabinet/components/form-change-shortlink', {
layouts,
editLinkId: editLink?.id,
userTemplates,
pixels,
values: {
...request.qs(),
...flashMessages.all(),
layout: {
...(request.qs()?.layout || {}),
...(flashMessages.all()?.layout || {}),
}
}
})
In attributes highlighting mismatched
In attributes parentheses are not highlighted
{{ route('cabinet.links.change.activeState.handler', {}, {qs: {id: editLink.id, state: !editLink.isLayoutActive} }) }}
<a href="{{ route('cabinet.links.change.activeState.handler', {}, {qs: {id: editLink.id, state: !editLink.isLayoutActive} }) }}">
Nobody cares about the plugin.
when I try to format the file using shift+alt+f in vs code a message says "There is no formatter for 'edge'-files installed."
any ideas?
Hi there
Thanks for your great work! It works great on vscode. Do you have plan to port this to IntelliJ/Webstorm?
when i open any edge file in ide it shows this:
Notification handler 'workspace/didChangeConfiguration' failed with message: emmetExtensionsPath.trim is not a function
I believe you can add emmet support just by changing the syntax file around a bit so that emmet sees it as HTML. This is the part of the emmet code that decides which syntaxes are supported.
Should the @each
blocks end with @endeach
rather than @each
?
vscode-edge/snippets/snippets.json
Line 79 in e5c6d98
I otherwise get the error:
E_UNCLOSED_TAG: Unclosed (each) tag found as < @each> statement. Make sure to close it as (endeach)
I'm using Edge Template for my project. I installed package and see it has a problem as follows:
each-array snippet
@each(item as collection) @endeach
I have consulted on Edge Template homepage then they give an example:
@each(user in users) <li> {{ user.username }} </li> @endeach
They use in instead of as
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.