Comments (9)
@sethladd It really needs support from the Analyzer, I was unable to do it myself. If it gets added, I'll implement it pretty quick; it's my biggest annoyance writing Dart (esp. as I don't know the APIs at all compared to others!).
from dart-code.
This isn't possible without a new feature in the Analyzer:
https://groups.google.com/a/dartlang.org/forum/#!topic/analyzer-discuss/Abh1vi1CwDA
from dart-code.
@devoncarew Do you have this functionality in Atom? If so, how to do you do it?
This is the biggest remaining annoyance for me when trying to write Dart in Dart Code. I've been trying to use Hovers to get the info but failing (it's hard to know where to issue the Hover command without understanding the surrounding Dart).
from dart-code.
We don't support something like this. I don't know what the best options are. I think it would be a while until support for this comes to the analysis server. Two practical solutions might be to live w/o it, or to see if a heuristic w/ hovers can return info for many simple cases?
from dart-code.
I've started trying to use hover, but held off putting too much time into it without knowing if it'd be done in the analysis server. Brian confirmed it's likely to be a while, so I'll get back to it. I think the complications are:
- The hover info is unstructured (just a string for all params)
- Need to know where to send the hover request for
I think 1 will be easy to handle except in the case where there are arguments that are themselves functions. I think 2 is probably just a case of walking back to the first paren that has an alphanumeric before it (need to check if whitespace is allowed there).
The idea of forking the AS and building our own snapshot crossed my mind too, but I've not looked at the code at all to see how easily I could implement it myself using the existing stuff on the server side. Probably would be hard for me, but always an option.
I'll play with the easier options first anyway and see where I get. Now we have args in the completion info it's a little better than it was; but I'll have to sit down to try and write something to get a better idea of how much I'll miss this.
from dart-code.
Haven't gotten anywhere trying to use the hover stuff yet (figuring out the correct offset to send is non-trivial), so bumping this to 0.11.
from dart-code.
I did have a go at this, but the problem is figuring out where to send the getHover
request for, eg.:
myFunc((1 * 2), (fr|ed));
If the cursor is at |
we need to know to send the getHover
for myFunc
.
from dart-code.
This is the related SDK case:
from dart-code.
Would love to see this. It really helps exploring and using the APIs if I know what to pass into a method :) Thanks for helping make it happen!
from dart-code.
Related Issues (20)
- Sidebar does not load on current Flutter master HOT 13
- VSCode stuck in Select a device to use HOT 16
- add sdk to path on windows not working cause the path is quoted HOT 6
- Flutter: Launch emulator - invalid entries HOT 10
- Multiple `Dart Devtools` Running HOT 4
- avdmanager is missing from the Android SDK HOT 3
- Missing Hot Reload button in debug toolbar HOT 6
- Go to Augmentation CodeLen opens a new editor in the current group instead of jumping to an existing editor in another group HOT 5
- Consider implementing VSCode's new Test Coverage API HOT 1
- option to customize diagnostic severity HOT 7
- Intellisense seems pretty broken with the new VSCode (1.88) HOT 12
- Notify users with large numbers of TODO diagnostics that they can turn them off HOT 1
- RainbowBrackets bug with `Map`/`Set` inside string interpolation. HOT 2
- Open online interactive sample leads to 404 for non-classes (mixins, extension types) HOT 1
- Add support for "Go to Augmented" and "Go to Augmentation" commands + CodeLenses HOT 11
- "Go to Augmented" does not show up for augmentations of augmentations HOT 3
- "Find all references" on invocation of a getter/setter only returns other references as a get (or set) HOT 7
- "Move to File" refactor says it will overwrite existing files even though it adds to them
- Support monorepos
- Color picker should const if it is originally const HOT 3
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.