Coder Social home page Coder Social logo

vscode-edge's People

Contributors

dependabot[bot] avatar duyluonglc avatar ezehlivinus avatar fossabot avatar itsjw avatar kant avatar romainlanz avatar thetutlage avatar tiansin avatar wrrnwng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-edge's Issues

unmatched single quote affects syntax highlighting when using .replace(/'/g, "%27") in @set

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

Syntax Highlighting Within HTML Attributes

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).

code example of Edge syntax coloring comparing VSCode and Sublime

I know these examples use Adonis specific view helpers but thought I could use them as an example of the issue.

Thanks!

No syntax highlighting

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} }) }}">

vs code formatting file

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?

IntelliJ support

Hi there

Thanks for your great work! It works great on vscode. Do you have plan to port this to IntelliJ/Webstorm?

emmetExtensionsPath.trim is not a function

when i open any edge file in ide it shows this:
Notification handler 'workspace/didChangeConfiguration' failed with message: emmetExtensionsPath.trim is not a function

Add emmet support

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.

Snippet @each array error syntax

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.