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

Ability to set CSS defaults for IntelliSense in HTML (much as you can set TypeScript default libraries) #117

Closed
Zlatkovsky opened this issue Aug 22, 2016 · 6 comments
Assignees

Comments

@Zlatkovsky
Copy link
Member

For TypeScript IntelliSense, it's possible to add additional libraries outside of the editor itself, via

monaco.languages.typescript.typescriptDefaults.addExtraLib(content, filename);

Is it possible to do the same for CSS, to expose some predefined classes to an HTML editor?

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2016

@Zlatkovsky There are currently no APIs to replace or modify the list of known CSS selectors, properties or values. Is that what you meant?

@Zlatkovsky
Copy link
Member Author

@aeschli , yes, that's what I mean. I want to be able to declare (from an existing web source or whatever) a list of known classes, and get them to show up when I type in my HTML code.

I'm surprised when you say there is no API for this, though. I thought VS Code uses Monaco editor... and there I do get autocomplete in my html from referenced CSS files...

Thanks!

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2016

@Zlatkovsky No, sorry, the Monaco HTML mode never had code completion for class names. Maybe you can add a screenshot of what you have seen?

@aeschli
Copy link
Contributor

aeschli commented Aug 23, 2016

BTW, you want to file this request in the VSCode repo: https://github.com/Microsoft/vscode/issues.
VSCode and Monaco are the sharing most of the code and we use the VSCode repo to collect all requests.

@Zlatkovsky
Copy link
Member Author

Zlatkovsky commented Aug 23, 2016

@aeschli, apologies, looks like I had imagined the CSS autocompletion feature! As you correctly point out, it doesn't look like VSCode has it, either.

microsoft/vscode#1005 (comment) already describes the feature request, with a good screenshot detailing the problem.

Feel free to close the issue on this repo, if it is tracked by the other one and hence no longer needed here.

@aeschli
Copy link
Contributor

aeschli commented Aug 24, 2016

@Zlatkovsky Thanks for finding the issue in the vscode repro. Closing this one

@aeschli aeschli closed this as completed Aug 24, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants