Conversation
This works for me, just saying! And thanks!!! |
Ok, and how long we need wait for release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still works for me after updating 0.15.1. No more travis.yml file the rest is the same.
This is on my TODO list. Have some other things I'd like to get to first though. |
Please let me know if a rebase (or some modifications) is eventually needed when you will decide to merge :) |
lib/provider.coffee
Outdated
|
||
isAtBeginScopePunctuation = hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.css') or | ||
hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.scss') or | ||
hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.postcss') or | ||
hasScope(scopes, 'punctuation.section.property-list.begin.postcss') or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does PostCSS really use both punctuation variants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I don't remember, I developer it long time ago, but if I did so, surely it's there for a reason: i'll check and figure it out. In your opinion it's not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot a rebase conflict here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spec/provider-spec.coffee
Outdated
@@ -8,6 +8,9 @@ packagesToTest = | |||
Less: | |||
name: 'language-less' | |||
file: 'test.less' | |||
PostCSS: | |||
name: 'language-postcss' | |||
file: 'test.css' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be test.postcss
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@50Wliu That confused moment, postcss can be usual *.css file and *.postcss to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know, but I'd like it to be explicit as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, i'll do it now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ;)
lib/provider.coffee
Outdated
|
||
isAtBeginScopePunctuation = hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.css') or | ||
hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.scss') | ||
hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.scss') or | ||
hasScope(scopes, 'punctuation.section.property-list.begin.bracket.curly.postcss') or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These scopes are not used by PostCSS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I know, punctuation.section.property-list.begin.bracket.curly.postcss
is not currently used by language-post css, but I thought that probably it's the scope it should use, so I left it to be future-proof. Also language-css used punctuation.section.property-list.begin.
in the past before atom 1.15 and then deprecated it.
However I can remove it, let me know :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sorry for the delay, removed it! Let me know if I can do anything else.
lib/provider.coffee
Outdated
isAtEndScopePunctuation = hasScope(scopes, 'punctuation.section.property-list.end.bracket.curly.css') or | ||
hasScope(scopes, 'punctuation.section.property-list.end.bracket.curly.scss') | ||
hasScope(scopes, 'punctuation.section.property-list.end.bracket.curly.scss') or | ||
hasScope(scopes, 'punctuation.section.property-list.end.bracket.curly.postcss') or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
I tested it 2 days and did not see any bags. Only specific moment for postscss plugins, for example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it 2 days and did not see any bags
@50Wliu I made all requested changes (despite what github says) ;) |
Yep, I'm aware. I will be taking another look at this again shortly.
You could submit a PR to language-postcss changing it 😉. We've been working on trying to standardize most of the CSS scopes lately, which is why there's lots of TODOs in autocomplete-css to remove old scopes. Also, I just merged a PR, and it looks like there's conflicts again. Sorry about that! |
Hey guys. Sorry for a newby question. But how can I install this PR on my local version of Atom? So I could use and test it. Thank you very much in advance! |
@50Wliu Rebased 😉 |
any updates? |
No updates. Still on my radar. |
@50Wliu Can I do something more? I noticed github erroneously displays that there's still one change to fulfill your review, but that's not true :) |
Yeah, I hope to re-review this by the end of the week, at which point I'll update the "changes requested" status if necessary. Just got back from vacation and am still catching up on what happened while I was gone. |
Looks pretty low-risk to me. Thanks @lordgiotto! However, please note that you'll probably still be responsible for the maintenance of this feature since the Atom team doesn't use or maintain language-postcss. |
@lordgiotto, @50Wliu thanks for your work! My congratulations. |
Hi all, I'm still having this issue; when PostCSS is my syntax, autocomplete is not functioning for properties. I understand a fix was implemented here, and I've updated to Atom 1.19.0 on MacOS, so maybe I've missed a step. Autocomplete works again if I set the syntax to CSS, but then syntax for mixins are no longer highlighted. I'm relatively new to web development, so please let me know what more information you would need from my end, as I'm not sure what to provide as of right now. Any help would be greatly appreciated. |
@Zalaski I believe PostCSS support is only on Atom 1.20.0 beta. |
@50Wliu Thanks for clarification, could you suggest how I can implement the changes on my end? I'm also new to Git, but I'm assuming Pull request/config changes, or would you advise that I just wait till 1.20.0 enters the Stable channel? |
I'd advise just waiting. |
@Zalaski you can update autocomplete directly. |
@dictory I wouldn't recommend that unless you know exactly what you're doing - that will override the bundled version, which commonly causes hard-to-diagnose bugs. |
@50Wliu yes, you are right. I just wanted say about that opportunity. |
Works perfect on Atom 1.20. Thanks @50Wliu @lordgiotto 💯 |
no sugarss support? 😢 |
Requirements
Description of the Change
I added PostCSS scope checks to provider, in order to enable language-postcss to be autocompleted through this provider.
Alternate Designs
The alternative could be use language-css while using PostCSS, but the programming experience would be really awful.
Benefits
Enables language-postcss to be completed trough autocomplete-css provider. Everybody who use postcss can take advantages of both postcss syntax highlight and autocompletition.
Fixes #37.
Possible Drawbacks
PostCSS is not a real syntax, but a collection of plugins: it's impossible to anticipate the exact configuration of the user, so the PostCSS support should be improved gradually to cover most of the possible scenarios.
Applicable Issues
There is room for improvement: a better veriables support, prevents
display: var(--b)
to be autocompleted indisplay: var(--block)
(now it's a general problem, the same happens withdisplay: $b
->display: $block
)