devongovett / atom-jade Goto Github PK
View Code? Open in Web Editor NEWJade TextMate bundle converted for Atom
Jade TextMate bundle converted for Atom
template(name="layout")
+yield region="header"
#content-wrapper.container-fluid
+yield
//- not colored
+yield region="footer"
template(name="home")
+if currentUser
h1 current user
else
//- not colored
.box
h1 no user
p (this text will be highlighted as if it were an attribute)
p(meta='this actually is an attribute')
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\***\AppData\Local\atom\app-0.194.0\resources\app.asar\src\package.js:552:9)
<unknown> (C:\Users\***\AppData\Local\atom\app-0.194.0\resources\app.asar\src\package.js:168:43)
Package.measure (C:\Users\***\AppData\Local\atom\app-0.194.0\resources\app.asar\src\package.js:147:15)
Package.load (C:\Users\***\AppData\Local\atom\app-0.194.0\resources\app.asar\src\package.js:161:12)
apm install jade
doesn't work with this package. does it need to be bundled/registered with atom.io ?
I've made sure that text.jade is in the settings for the spell check package, but spelling errors do not get underlined at all. If I change the grammar to haml, everything works as expected, although obviously not ideal if you're using jade.
block
, include
, and extends
are examples of control statements that are confused for HTML tags
Is this markup error, or has something changed in the new update?
//cc @ccampb13
The TextMate and SublimeText jade packages have a different color for HTML tags vs CSS classes and ID's. That'd be nice to have.
It would be great to have changelog that people can view in Atom to see performance changes, API changes, bug fixes, feature additions, etc.
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:550:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:172:43)
Issue: This is probably super low priority, but I figured I'd flag it anyway. The first word in any line of "Block in a tag" plain text applied to a mixin will have the wrong coloring applied. I understand that this is likely not best practice, but it is still valid!
If you add a period after an element, any text within that element will be interpreted as plain text instead of Jade. This is called "Block in tag" plain text. For example:
p.
Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue
laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis
dapibus posuere velit aliquet. Vivamus sagittis lacus vel augue lapreet
rutrum faucibus dolor auctor.
However, if instead of a parent element, you instead use a mixin which defines a block, such as the following, you'll get incorrect coloring, even though it is still valid Jade and will be rendered properly. The Jade interpreter appears to believe that these are elements, although I could be wrong.
mixin paragraph()
p
block
+paragraph().
Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue
laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis
dapibus posuere velit aliquet. Vivamus sagittis lacus vel augue lapreet
rutrum faucibus dolor auctor.
(It looks like even the service GitHub is using to display code doesn't render this properly either!)
Of course you could instead use pipes, but that's besides the point :-). Plus using pips becomes more difficult with large, complicated blocks of text (like possibly content contained within a <script>
tag)
mixin paragraph()
p
block
+paragraph()
| Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue
| laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis
| dapibus posuere velit aliquet. Vivamus sagittis lacus vel augue lapreet
| rutrum faucibus dolor auctor.
Screenshot taken from Atom:
More information about plain text rendering in Jade: http://jade-lang.com/reference/plain-text/
I've encountered a bug where if I select text code and scroll horizontally while two vertical panes are open. The pane itself locks up as soon as the mouse cursor goes to the end of the pane. The stays locked and displays the following in the chrome console:
Uncaught RangeError: Maximum call stack size exceeded
If an empty line precedes a tag marked with a plain text block, the leading words in the plain text block are recognised as tags instead. This may be a generalisation of #58.
See screenshots.
If I copy and past e.g. this into a jade file:
div
div
div
becomes this:
div
div
div
which is sad because you can embed other languages inside of a grammar... like json in markdown, for example
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\futer_000\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:550:9)
<unknown> (C:\Users\futer_000\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:172:43)
I'm new to atom.
I can't get the snippets to load after i install the package. even if i manually set syntax: jade it's not working :/ I've tried reinstalling the package and restarted atom to no avail :(
When using tag interpolation (inline elements) with the #[ ]
syntax, atom treats each word inside as if it is a tag. It should only treat the first word as a tag.
p Do #[em not] touch anything.
<p>Do <em>not</em> touch anything.</p>
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:565:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:187:43)
div.thisdoesntcommentcorrectly
(comment out this line/block)
=>
/*div.thisdoesntcommentcorrectly*/
The whitespace package automatically trims trailing whitespaces after save. This isn't working for jade files. I'm not sure if this is a problem with this package or with atom itself.
Atom with built in Atom Dark theme
As you can see with a built-in theme there are very few things that atom-jade is currently distinguishing. It did not bother me when I was using it at first, but when I had to teach someone jade, the lack of syntax highlights made learning very difficult, like inline javascript being the same color as the classes tags, etc.
I will submit several different pull requests that utilize similar styling names as the packaged language-css for atom.
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\**********\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:550:9)
<unknown> (C:\Users\**********\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:172:43)
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:550:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:172:43)
About the pull request #62
I think we should change the name of the library to something like language-pug, just to update to the new name and to bring some consistency between the repository and the name of the plugin.
Let me know what do you think about this.
script(type='text/template', id='tmpl-name')
div.name
p <%= name %>
Is not highlighted, but working with backbone makes such templates to a daily routine.
Can you guys add the support for script tags inside jade files?
I want to see jade highlighting when I open .jade
file on mac. Currently I have https://atom.io/packages/language-jade installed, but when I open .jade
file atom detect it as html. I install https://atom.io/packages/file-types and add to config file (atom->open your config):
"file-types":
jade: «source.jade»
It don't change anything at all. I think default atom language-html plugin override my settings. If I disable language-html, then atom detect .jade
correctly and highlight it properly. But without language-html plugin atom detect .html
as plain text and don't highlight it at all. What I should to to get both html and jade proper highlighting?
With all best regards. Anton.
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\Marcio Costa\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:550:9)
<unknown> (C:\Users\Marcio Costa\AppData\Local\atom\app-0.190.0\resources\app\src\package.js:172:43)
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\geenhenk\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:565:9)
<unknown> (C:\Users\geenhenk\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:187:43)
(( Generated through Atom ))
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\Renia\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:565:9)
<unknown> (C:\Users\Renia\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:187:43)
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:565:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:187:43)
Can you please add inline php syntax to this package? I'll very appreciate it !!! Thank you for reading this
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (C:\Users\HobanD\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:565:9)
<unknown> (C:\Users\HobanD\AppData\Local\atom\app-0.189.0\resources\app\src\package.js:187:43)
The removeTrailingWhitespace
is not working when I use your syntax highlighting.
Store package settings files in the settings/
directory instead of scoped-properties/
Package.loadSettings (/Applications/Atom.app/Contents/Resources/app/src/package.js:565:9)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/package.js:187:43)
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.