Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense/autocompletion #2

Open
mdmoreau opened this issue Dec 3, 2019 · 12 comments
Open

Intellisense/autocompletion #2

mdmoreau opened this issue Dec 3, 2019 · 12 comments

Comments

@mdmoreau
Copy link

mdmoreau commented Dec 3, 2019

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!

@joelmoss
Copy link

Shouldn't this extension support everything that the built-in CSS extension supports? Ie. it extends the CSS functionality of VS Code?

@mdmoreau
Copy link
Author

Might be worth checking out the custom data format (https://code.visualstudio.com/blogs/2020/02/24/custom-data-format) for this.

@marcofugaro
Copy link

Deal-breaker for this plugin

@marcofugaro
Copy link

marcofugaro commented Jul 15, 2020

Current behaviour Expected behaviour
Screenshot 2020-07-15 at 17 28 39 Screenshot 2020-07-15 at 17 28 19

Only the first is an emmet abbreviation (enabled in postcss as documented in the README).

@jonathantneal
Copy link
Collaborator

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?

@marcofugaro
Copy link

marcofugaro commented Jul 17, 2020

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.

@jeremychone
Copy link

jeremychone commented Oct 6, 2020

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.

@th3coop
Copy link

th3coop commented Feb 20, 2021

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

@y0nd0
Copy link

y0nd0 commented Jul 10, 2021

IntelliSense is very important. The emmet hint is great, but it's not autocompletion.

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

@KirdesMF
Copy link

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.

@petervukovic
Copy link

Same here, great plugin but unfortunately autocomplete has more value.

@xiaohk
Copy link

xiaohk commented Aug 19, 2023

I faced the same problem, and replacing postcss-language with this plugin solved it perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants