danro / less-sublime Goto Github PK
View Code? Open in Web Editor NEWLESS syntax highlighting for Sublime Text.
Home Page: https://sublime.wbond.net/packages/LESS
LESS syntax highlighting for Sublime Text.
Home Page: https://sublime.wbond.net/packages/LESS
The test below illustrates an issue with properly identifying nested URLs or nested parenthesis ().
.test {
border-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0,0 24,26"><filter id="dropshadow" height="150%" width="150%"><feGaussianBlur in="SourceAlpha" stdDeviation="2"></feGaussianBlur><feOffset dx="0" dy="1" result="offsetblur"></feOffset><feMerge><feMergeNode></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter><polygon fill="hsl(0, 0%, 100%)" filter="url(#dropshadow)" points="12,3 2,13 12,23 22,13"></polygon></svg>') 30.76923% 29.16667% repeat;
border-width: 0 0 8px;
border-style: solid;
background-clip: padding-box;
margin-bottom: -8px;
position: relative;
}
CSS3 support was added a while back, but appears to have been removed since changing the language completion structure. Please can this be added back in.
Hi there,
LESS syntax highlighting isn't working at all after latest build - 3065. Thanks!
I have some vendor prefix mixins that are similar to:
-moz-transform: ~"@{op}(@{val})";
The combination of the starting hyphen for the vendor prefix plus the tilde (~) string interpolation causes the color coding to fail and results in all subsequent lines to be treated as an unclosed quoted string in appearance.
Hi, I try to create styles for body, for example but i dont get any autocomplation, but if i create a style for a selector named #name (an id), the code get autocompletion inside the brackets, what's happening?
Thanks
Package Control: Error downloading package. HTTP error 503 downloading https://codeload.github.com/danro/LESS-sublime/zip/master.
error: Package Control
Currently only the dot flavour syntax is detected as mixin. Would be great if you could add the hash flavour aswell.
(https://github.com/SomMeri/less4j/wiki/Less-Language-Mixins#naming)
When I use the comment shortcut, I get the standard css comment. Is there a way to use the LESS comment : //
This more useful because it's not added to the final file and it's removed by less.
I have a less and css directory... is there a file I can edit for my project (or globally for this plug-in) to allow me to output to a specific directory instead of the one the .less file being edited is located?
Thanks!
Using Sublime Text 2
Using the package control the installation just hangs. Also tried git cloning into ~/.config/sublime-text-2/Packages/LESS and it still doesn't show up in the list of available syntaxes.
I don't know for sure that this package is the culprit, but so far it seems like the language definition of LESS for Sublime is not matching up well enough with CSS to let the ZenCoding plugin do its thing. I've noticed that in .css files, the scope for:
body {
|
}
is "source.css meta.property-list.css".
In .less files, though, it's just "source.css.less", which may be why the ZenCoding plugin isn't doing anything if I try to expand an abbreviation (like "ff" for font-family) inside that definition.
A fix would be wildly appreciated!
I found that this plugin mishighlight on word 'and' in red. Is that a bug or any concerning?
For example, code like
-webkit-transition-duration: 0s;
The "-duration" does not match the coloring of the "-webkit-transition"
The first part is correctly scoped as "support.type.property-name.css.vendor" but the remainder is just "source.less"
I'm working on adding LESS support to https://github.com/SublimeColors/Solarized and have run into a (minor) issue.
Using entity.other.attribute-name.id to highlight #id selectors also applies that highlight to the id attribute in HTML. Would it be better to use a specific name? I see SCSS.tmLanguage using entity.other.attribute-name.id.css.
Perhaps this is really an Emmet issue but given that this package has just been updated and I'm seeing this issue for the first time (while working on the same .LESS file), it seems reasonable to assume that something on this end changed that causes this issue... Please point me in the right direction if I'm wrong.
Previously, typing, for example, fs-
caused autocomplete to suggest fs-n
(among others) but now this sequence of characters yields no autocomplete suggestions at all (similar goes for other abbreviations). If I set the syntax to CSS, Emmet's autocomplete suggestions show up again, just the way it was with LESS files until recently.
Interestingly, "blindly" typing fs-n
and hitting TAB
still causes Emmet to expand the abbreviation to font-style: normal
.
I'm using Sublime 2 with Emmet release 2013.08.06 and LESS-sublime release 2013-08-25.
On the other hand, syntax highlighting continues to work great!
when using LESS as syntax for less documents the tab completition does not work as expected. predefined variables do show up, while custom ones (and already used) do not.
example
a {
color : #FFF;
}
a.foo {
color : #F /* now hit tab and "#FFF" doesn't show up */
this issue seems to came up when sublime released build 2203.
cheers
michael
At the moment, it is possible to do something such as
.container_@{columnCount} {
margin-left: auto;
margin-right: auto;
width: unit(@baseWidth, px);
}
What would it take to have something in LESS that allows you to do:
.container_[1-24] {
or
.container_[1-@{columnCount}] {
which would then cause less to generate
.container_1,
.container_2,
.container_3,
...,
.container_24 {
/code/
}
I am willing to look into adding this myself, but would need pointing in the right direction as i am new to the LESS codebase.
Using stock Sublime Text Build 3059, create this file:
.test {color:green;}
._test {color:green;}
.-test {color:red;} /* not ok */
#test {color:green;}
#_test {color:green;}
#-test {color:red;} /* not ok */
input {color:green;}
input:before {color:green;}
input::-webkit-input-placeholder {color:red;} /* broken highlighting */
input:-moz-placeholder {color:red;}
Screenshot:
Hey,
Every time I type //
sublime text transforms this to /** */
. I don't know how to disable this globally, but is does makes sense for CSS files but not for LESS files. So maybe this behavior is just "taken over" from CSS but that makes less comments very painful. Maybe there is a way to disable this for less files via this plugin?
I am interested how i would disable this globally (not all auto-completions just this). If someone knows how I would be very thankful.
Great work by the way.
One minor annoyance I have discovered so far:
If I start typing: a.button:hover
as soon as I type the colon it adds a semi colon - great for css attributes but not for pseudo classes!
Hi !
Today I have noticed that when starting new project based on LESS I wasn't able to set my syntax to LESS. When trying to reinstall using Package Control LESS is not listed.
Please Halp !
edit: its also not listed on https://sublime.wbond.net/
When writing a pseudo-selector, a semi-colon is automatically added, which needs to be deleted.
For example (note the semi-colon after hover)
.link-class:hover; {
}
As of v1.7 you can pass rulesets into mixins, but the syntax highlighting gets kind of busted. Notice how the comments and the font-face
rule change to orange when they are within a ruleset that is passed into a mixin.
this breaks the comment highlighting:
.has-scrollbar {
> .scroll-pane {
&::-webkit-scrollbar {
// visibility: visible;
}
}
}
Does LESS-sublime work with Sublime Text 3? I just installed with the package manager, but no .less
syntax highlighting.
FYI,tks
Typing &:
to with the intention of using a pseudo class, &:hover { ... }
for example, automatically adds a semi-colon to become &: ;
. This is annoying as it has to be deleted to enter braces.
At the moment, variables are not recognized when used in a class statement like that:
.@{varname}--subclass { color: red; }
Is it possible to treat such constructs like normal class definitions? The same issue happens probably with other chars like #
.
Thanks!
Usually there are properties being suggested as values after typing in or selecting a property.
Console output:
Package Control: Error downloading package. HTTP error 504 downloading https://codeload.github.com/danro/LESS-sublime/zip/master. error: Package Control
You might have to update urls or package meta data.
Hi,
Every now and then the highlight for LESS stops working. Reinstalling your package and restarting Sublime makes it work again.
http://c.littke.com/image/1p2g3U292O0S
Specs: iMac with OS X 10.8.5. Syncing my Sublime files via Dropbox. Other than that nothing fancy.
On a regular css file when you goto-symbol the properties are showed, can you make this possible for a less file too?
is there coloring for variable names? i mean I can't see much difference between this and standard css coloring
Thanks for making LESS-sublime! It's very useful.
When installing through the package manager, it installs an old version. On sublime text 3, this version is completely nonfunctional: i.e: can't set LESS as sytax, and LESS isn't added to the preferences -> package settings menu.
This might not actually be an issue, but are variables supposed to be added to auto-complete? So if I have a declared variable at the beginning of the document
@black: #000;
It will start the auto-completion when I start typing @Bla...? Just not sure if mine is misbehaving or it's just not set up to do that. Also, if it does, would the variables need to be declared from within the same .less doc or would they carry over from other .less docs in the same project.
I am using Sublime 3 on a mac.
Thanks again.
Hi,
ST noob speaking, so I have no idea about the feasability of this. I think it would be pretty nice to be able to navigate between Less variables/mixins/stuff using the Cmd+P + @. Said another way, it means from my understanding of ST that the Less specific stuff should be considered as symbols.
What do you think ?
Is it possible to extend the syntax highlighting to account for the various examples shown in the LESS docs Here. Specifically extending the class name like this:
.topBar {
// initial styles
&__subText {
// extended styles
// syntax highlighter broken on extended selector
}
}
The syntax highlighter is broken on the $__subText
as it doesn't recognise the underscores or dashes as part of the selector.
I know this is minor, but would be awesome to see it amended.
I have forked your code and added build systems that (I think) work across all platforms, but I haven't been able to test it on Linux.
It definitely works for OSX + Windows, and includes a build option for minified code. I was hoping you could implement these changes into the official plugin (I guess the dotLess compiler could be done differently, depending on an OS path thing, but I'm not very good at this).
Let me know what you think,
Regards,
Bernardo
i found something while trying to debug an issue in another ST2 package/plugin. not sure if this is wrong or not, but i thought i would bring it to your attention.
so, two test files; test.less and test.css each with the same code (cursor is where the pipe is):
body {
background-image: url("|");
}
the output in the console for the command print (view.syntax_name(view.sel()[0].b))
test.css:
punctuation.definition.string.end.css string.quoted.double.css meta.property-value.css meta.property-list.css source.css
test.less:
variable.parameter.url support.function.any-method.builtin.css source.css.less
and as is apparent from the console output, syntax highlighting sees that position as a string in the .css file, but does not see it as a string in the .less file.
shouldn't that be a string in .less?
Is there any way to scope "nested" class names differently that regular classes, so I can syntax color them to stand out better? For example:
.element {
.boxSettings;
.smallbox;
}
The two classes inside the braces (boxSettings, smallbox) refer to mixins I have defined earlier. Currently, they are colored the same as "elements", so it makes it confusing to see at a glance that there are mixin names in there.
Can anything be done?
Hi, some time ago everything worked fine. But now css snippets are broken for less syntax, maybe you updated something?? Can you help?
I just installed , but no highlight at all
sublime text2 MAC M LION
Please help
Despite multiple re-installs of this package, LESS is not showing up as a language option in ST3.
Updated to the latest LESS_sublime via Package Control but it has broken a really important piece of functionality - when typing a property and inserting a colon, it used to add a semi-colon immediately after the cursor but it no longer does this.
I can reproduce the issue by updating the package, trying the above but not getting a semicolon, then using Time Machine to restore the initial version that I had and it restores the functionality.
When using "insert mode" with the "vintage" package, it isn't possible to delete a colon after a property when it's immediately followed by a semi-colon. If you try, the bar at the bottom of Sublime Text presents the message "Unable to Open". In the following example, the colon after background can't be deleted without changing to "command mode", or by typing something after the colon, then coming back to delete it.
.my-selector {
background:[caret-position];
}
Maybe this issue, and this one: #46
would both be solved by not automatically inserting a semi-colon after a colon. Is there a way to configure that in settings?
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.