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

Be able to filter out pre-release packages in the auto-complete drop-down #18

Closed
ebekker opened this issue Oct 6, 2017 · 14 comments
Closed

Comments

@ebekker
Copy link

ebekker commented Oct 6, 2017

Is it possible to add a way to filter whether you want to include or not pre-release package versions in the auto-complete drop-down. I'm not sure how much UI control and flexibility is possible in the drop-down (i.e. is it a built-in component of VSCode or completely custom?), but maybe just a small section down at the bottom of the drop-down that has a checkbox for Pre-Release?

(BTW, love your tool!)

@tintoy
Copy link
Owner

tintoy commented Oct 6, 2017

Thanks :)

I don't have control of the UI, unfortunately (the completions are implemented by an LSP language server), but I could define a command to toggle pre-release packages on and off that you could bind to a keyboard short-cut; would that suffice? It wouldn't be much work to implement.

@ebekker
Copy link
Author

ebekker commented Oct 7, 2017

Oh I see -- yeah, I guess that makes sense, it's just like auto-complete for any language, you only have the context of where you are in the code to make decisions, so there really isn't any way to flag pre-release on a per-package/per-line basis, only wholesale for the current environment.

Yes, a toggle would be great, thanks!

@ebekker
Copy link
Author

ebekker commented Oct 7, 2017

Does the LSP have the ability to distinguish different categories or types of auto-completion entries? I'm thinking, like when you have an auto-complete for an identifier in other languages, like C#, you get different member types (methods, properties, fields, etc.).

Now it doesn't appear that Code gives you an easy way to filter by types -- I know that's something that was recently added to full VS, and has been in add-ons like ReSharper for a while, so maybe that will be a future enhancement in Code itself.

So one way to at least distinguish those items would be to categorize release vs. pre-release.

Just thinking out loud... The toggle would be great!

@tintoy
Copy link
Owner

tintoy commented Oct 7, 2017

Does the LSP have the ability to distinguish different categories or types of auto-completion entries?

Not exactly, but it's a little open-ended. In the end, as you say VS Code doesn't support it yet, but it's something they may be able to add. They're pretty responsive to requests, I've noticed ;-)

No problem - give me an hour or so and I'll add it.

@tintoy
Copy link
Owner

tintoy commented Oct 7, 2017

Ok, that took slightly longer than expected (unrelated issue) but it's working now. Will publish a new version in half an hour or so :)

@tintoy
Copy link
Owner

tintoy commented Oct 7, 2017

Ok, @ebekker - can you give v0.2.9 a try? You can just upgrade it from within VS Code's extensions window.

The command to invoke is NuGet: Toggle pre-prelease (you can bind a keyboard shortcut to msbuildProjectTools.toggleNuGetPreRelease).

@ebekker
Copy link
Author

ebekker commented Oct 7, 2017

Wow, talk about responsive!

@ebekker
Copy link
Author

ebekker commented Oct 7, 2017

Weird -- when I bring up the command palette, and start typing Nuget, it immediately auto-finds the Nuget: Toggle pre-prelease command, but when I invoke it, I get the error:

command 'msbuildProjectTools.toggleNuGetPreRelease' not found

@ebekker
Copy link
Author

ebekker commented Oct 7, 2017

Actually, the whole extension doesn't seem to be working for me now -- it's not resolving packages at all now.

@tintoy
Copy link
Owner

tintoy commented Oct 7, 2017

Ok, just installed the extension from the gallery and something seems to be broken (which is odd, because it works when I run it from source). Sorry for the inconvenience, I'll figure it out and get back to you.

tintoy added a commit that referenced this issue Oct 7, 2017
…tion was specified (restore configuration defaults).
@tintoy
Copy link
Owner

tintoy commented Oct 7, 2017

Ah, ok, figured out the problem. I had to change the configuration schema slightly, and wound up removing the defaults for some configuration items. It works locally because I do have values for those settings, but you probably don't. I'm putting out a new release now.

Again, sorry for the inconvenience and delay (I'm in AU if you're wondering about the delay; just woke up about half an hour ago 😄).

@tintoy
Copy link
Owner

tintoy commented Oct 8, 2017

Ok @ebekker - I've tested v0.2.10 on a clean install (i.e. one with no settings specified) and it works correctly as far as I can tell. Would you mind updating and having another go?

@ebekker
Copy link
Author

ebekker commented Oct 8, 2017

You rock! Works great, thank you!

@ebekker ebekker closed this as completed Oct 8, 2017
@tintoy
Copy link
Owner

tintoy commented Oct 8, 2017

Awesome, thanks for sticking with it :)

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

2 participants