postcss-language
postcss-language copied to clipboard
Intellisense/autocompletion
Are there plans to add any form of intellisense or autocompletion for this extension? I've been using https://marketplace.visualstudio.com/items?itemName=mhmadhamster.postcss-language for a while now as it's the only thing I could find with proper support for those, but it hasn't been updated in a couple of years.
The highlighting and everything else looks great, so figured I'd ask about any planned support. Thanks for all the work!
Shouldn't this extension support everything that the built-in CSS extension supports? Ie. it extends the CSS functionality of VS Code?
Might be worth checking out the custom data format (https://code.visualstudio.com/blogs/2020/02/24/custom-data-format) for this.
Deal-breaker for this plugin
| Current behaviour | Expected behaviour |
|---|---|
![]() |
![]() |
Only the first is an emmet abbreviation (enabled in postcss as documented in the README).
Shouldn't this extension support everything that the built-in CSS extension supports? Ie. it extends the CSS functionality of VS Code?
Yes, @joelmoss. You are correct. My understanding is that I need to write my own Intellisense integration. I intend to, as there are some guides. It does not necessarily appear to be easy or straight forward. If it were easy to do so, I would have probably seen this in the form of a PR. However, this is ultimately my responsibility. I was unaware of this need when I first wrote this language extension. I’m sorry about that.
Deal-breaker for this plugin
I totally understand, @marcofugaro. I wrote this language extension because I could not find another one that correctly handled the syntax liberality of https://www.w3.org/TR/css-syntax-3/. However, I failed to see how the Intellisense integration was not a separate process.
Only the first is an emmet abbreviation (enabled in postcss as documented in the README).
I do not know the cause of this, but is it safe to say that it’s a result of the missing Intellisense integration?
I do not know the cause of this, but is it safe to say that it’s a result of the missing Intellisense integration?
I think it is. As far as I understand, emmet and the other properties of the intellisense are a different thing, the emmet ones are provided by the emmet plugin.
First, very glad there is a maintained postcss for VSCode around. The others seem to have stopped.
I have been using postcss-sugarss-language, and it has been working pretty well, some gotcha on mixins, but other than that IntelliSense works, which is the air-conditioning of CSS.
The problem with postcss-sugarss-language is that it now gets some Buffer().... security warnings and the plugin is not maintained, so, won't probably be fixed.
This one looks promising, but coding CSS without IntelliSense is like driving through death valley without air conditioning.
I wished I could help, but I not well versed with VSCode IntelliSense, language server, and syntax highlighting ...
Perhaps something from postcss-sugarss-language can be borrowed.
EDIT: 2020-10-06
Btw, I found a workaround with VSCode, can't believe it was that easy. , but no plugin and get full auto-complete. But in settings.json add
"files.associations": {
"*.pcss": "scss",
...
Anyway, I am sure this approach has some gotchas, but for now since we use css var, we use pcss mostly for autoprefix, import, and nested, which is the same in sass.
@jonathantneal I wonder if this is what you need: https://code.visualstudio.com/api/references/vscode-api#languages.registerCompletionItemProvider. This looks like you could tell your plugin to use the css code intel built into vs code. Sorry for just throwing a link at you, I'm under a bit of a time crunch and I wouldn't know where to begin to make a PR for this.
IntelliSense is very important. The emmet hint is great, but it's not autocompletion.
Recorded css build-in autocomplete IntelliSense.
Is it possible to tell vs code to use the autocomplete like it's css? Since this is annoying I think I remove this extension.
I would increase the priority of this issue. Initially reported on 3 Dec 2019, almost 20 months / 2 years.
Hint: In scss the css IntelliSense (autocomplete) works like expected. Maybe we can find there the solution how it works.
I would also like to use postcss in vscode but yeah like others says autocomplete not working is bit annoying. So actually I would just go back to vanilla css.
Same here, great plugin but unfortunately autocomplete has more value.
I faced the same problem, and replacing postcss-language with this plugin solved it perfectly!

