Comments (7)
I don't think we have many good options here. While we could add a general VS Code setting, it would be inconvenient to have to toggle it to change between these modes. We also don't have any control over the sort once you start typing (because VS Code takes over), and the initial list is ranked based on some heuristics (it's not clear that declared members are always the most likely choices).
I'm curious about exactly what the goal is - you said you "want to find out possible symbols on a member" but for what reason? Are you planning on using the code, or are you using the completion just to try and discover more about the class? If the latter, would something like the Outline or Breadcrumb be more useful for viewing the declared members?
from dart-code.
Basically, I've created a class that extends GetxController
.
I have created two methods on that class, but I keep forgetting their names.
I expose an instance of that class (using singleton pattern) through GetX
If I use the suggest widget to try and find their names (which is easier than manually navigating to the source code), I get a lot of other suggestions (such as all the methods inherited from GetxController
, extensions), and it is actually very hard to find the methods I actually declared.
from dart-code.
Thanks for the info. I think having a setting for this wouldn't work very well because it would be more effort to turn the setting on (and back off later) than navigating to the class. Out of interest, are these extra methods from GetxController
things that you never want to see?
I ask because I wonder if extension types might be a good fit for this. My understanding is that you could create your own type that extends GetxController
that exposes only the methods you want, and it just compiles away so there is no overhead (as there would be if you wrapped the controller with a real class).
(Edit: To be clear, Extension Types isn't stable yet, but I think it's coming in a future SDK release)
from dart-code.
No, I just want them grouped.
For example, all word-based suggestions are at the bottom, which is useful since you know that once you see word-based suggestions, you're at the end, and there are no more semantic suggestions.
It would be a nice feature if VSCode supported grouping in the suggest widget.
It could then indicate that some suggestions are inside a particular group, (e.g. declared), others (e.g. inherited or extensions).
In that case, declared groups would be sorted first, then inherited, then extensions.
from dart-code.
VSCode has Intellicode, which provides star completions that are in a custom order at the top.
Could this somehow be replicated to produce a similar effect with declared at the top, then inherited, the extensions?
from dart-code.
Unfortunately don't have control over the UI so we can't provide any groupings. We also can't control the ordering except for when there is no prefix typed (as soon as you type a character, VS Code re-ranks itself).
While we can set the ordering when there is no prefix typed, the goal is for the most likely items to be at the top (for example taking into account things like types) and I don't think pushing the declared items to the top would be the best experience. It works for Intellicode because those items are the ones it thinks are most likely to be used.
from dart-code.
We also can't control the ordering except for when there is no prefix typed
Well, that doesn't actually bother me.
I actually do prefer the current sorting strategy for empty suggests.
Basically, this only applies when there is an instance / type followed by a trailing member access operator (.
).
For example:
// VALID (applies to these if suggest is triggered at the end of the line)
someInstance.
SomeType.
int.
someInstance.thing.
someEnum.
// INVALID (does not apply to any of these)
SomeType
int
someInstance.thing
All I need is for the suggestions to be at the top when I type .
, since I can't actually remember the method I'm looking for.
I would therefore prefer it being sorted when there is no prefix typed (i.e. just someClass.
instead of someClass.a
), as that is my most usual use case, as I often use that to try and find possible symbols.
from dart-code.
Related Issues (20)
- Unable to select Android emulator after first debug session HOT 10
- DTD should be disabled for internal bazel workspaces
- Language status information doesn't show up for generated file schemes
- Add "Fix All in Workspace" commands to apply fixes across the whole workspace instead of only current file HOT 13
- Sticky Scroll Editor view is broken HOT 1
- Debugging Dart web app (via webdev) downloads source code from instead of mapping back to local paths HOT 4
- Running web app triggers "Which DevTools page?" prompt
- flutter excpetions not logs in debug console on vscode HOT 8
- Debugging a Dart web app may result in errors displayed in the console HOT 7
- "dart.env" settings do not respect VSCode Built-In Variables HOT 1
- Close Embedded Widget Inspector Window on Debug Session End
- When starting up VSCode with a fresh flutter checkout, analysis of file in active editor fails HOT 4
- Please support hot reload for certain assets HOT 6
- Editor Suggest Widget - Preview Colors HOT 1
- Configurable suggested import order HOT 1
- Support "Fix All in Folder" from explorer context menu
- Trigger "pub get" when modifying pubspec_overrides.yaml
- Add Option to Ignore Exceptions Similar to Visual Studio HOT 5
- Stuck in "Starting debug session..." state forever with new SDK debug adapters HOT 9
- final class - no suggestion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-code.