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

Dedupe identical suggestions #16040

Closed
mrmlnc opened this issue Nov 24, 2016 · 7 comments
Closed

Dedupe identical suggestions #16040

mrmlnc opened this issue Nov 24, 2016 · 7 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@mrmlnc
Copy link
Contributor

mrmlnc commented Nov 24, 2016

Hello, VS Code team!

/cc @aeschli — because he's God of the CSS service in VS Code
/cc @Tyriar — because I know that he uses the vscode-scss and may regard the proposal as a user
/cc any VS Code team members and users

I am the creator of two very useful (😅) plugins: vscode-less and vscode-scss.

These plugins provide more informative suggestions for Less and Sass symbols (such as Variables, Mixins and Functions) from all files in the workspace (including @import and // <reference...> comments).

And it would be nice if users could disable the standard suggestions for Symbols because they have duplicates.

For example, Variables in Less:

photoshop_2016-11-24_23-57-31

And Functions in Sass:

code - insiders_2016-11-25_00-03-30

For users. Please, use GitHub emotions:

👍 - upvote
👎 - downvote

@jrieken jrieken self-assigned this Nov 25, 2016
@jrieken jrieken added debt Code quality issues formatting Source formatter issues labels Nov 25, 2016
@jrieken
Copy link
Member

jrieken commented Nov 25, 2016

We should maybe just dedupe identical suggestions

@jrieken jrieken changed the title Ability to disable suggestions for Symbols in Less and SCSS Dedupe identical suggestions Nov 25, 2016
@mrmlnc
Copy link
Contributor Author

mrmlnc commented Nov 25, 2016

Yes, I thought about it. But this can cause performance degradation for large collection.

@aeschli
Copy link
Contributor

aeschli commented Nov 25, 2016

@mrmlnc Your extension could choose to replace the built-in css completions by contributing to a stronger document selector.
Or you play together with the built-in extension and don't make proposals for variables defined locally. I'm happy to take pull requests to improve my proposals. Also feel free to suggest hooks to the css-languageservice that you could use to give your extra proposals.

Adding more configuration option to css to doesn't make things easier.

@mrmlnc
Copy link
Contributor Author

mrmlnc commented Nov 25, 2016

@aeschli,

My extensions provide completion for all Symbols in:

Hmm, yeah, I don't thought about removing suggestions for the current document. This sounds reasonable.

Now I use parser/mixin.ts and parser/variable.ts to generate suggestions from the current document by position parser/symbols.ts#L28. It seems to me, that this must easily integrate into your service.

However, there are problems:

  • What to do with Functions and Mixins? — because my extensions have SignatureHelp and Hover for Function/Mixin reference and variables + parameters. Also implement this feature or remove support for @function from your service 😄?
  • Also need to ability return data from your service to use it inside my extension (e.g. Cache) (now I'm not sure)

@mrmlnc
Copy link
Contributor Author

mrmlnc commented Nov 27, 2016

@aeschli,

Small clarification:

  1. Where better to continue communicating: here or in the vscode-css-languageservice repository?
  2. If the variable does not have a default value (e.g. FunctionParameter), then display null/empty string or nothing?

@aeschli
Copy link
Contributor

aeschli commented Nov 28, 2016

@mrmlnc For pull requests, use vscode-css-languageservice. Bug reports/feature requests better here where historically we manage all css/less/scss related issues.
I'd suggest to show nothing if there is no default value. Also a label 'no default value' would be an option but looks to intrusive to me.

@jrieken jrieken added suggest IntelliSense, Auto Complete and removed formatting Source formatter issues labels Apr 11, 2017
@jrieken
Copy link
Member

jrieken commented Apr 13, 2017

I am closing this as a dupe of #17068

@jrieken jrieken closed this as completed Apr 13, 2017
@jrieken jrieken added *duplicate Issue identified as a duplicate of another issue(s) and removed debt Code quality issues suggest IntelliSense, Auto Complete labels Apr 13, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants