racer icon indicating copy to clipboard operation
racer copied to clipboard

Add get-type command

Open TedDriggs opened this issue 7 years ago • 8 comments

The get-type command (requested in #620) takes a line and character number which point to a complete identifier in the input text. The command will then attempt to determine the concrete type of that identifier.

Note that this also includes the travis updates from #728; this was necessary to make CI pass.

TedDriggs avatar Jun 06 '17 21:06 TedDriggs

Is there any reason this PR hasn't been merged?

MadRubicant avatar Aug 17 '18 04:08 MadRubicant

@MadRubicant Simply it needs rebasing, and I'm not sure it's so useful for clients. But if you need this feature, I'm going to work on this.

kngwyu avatar Aug 17 '18 05:08 kngwyu

I don't specifically need this feature; I was hoping it would let me hack together completion for closures. I cloned the branch to test it, and trying to get the type of a closure argument causes a panic

MadRubicant avatar Aug 17 '18 05:08 MadRubicant

@MadRubicant Then this branch is too old to hack :worried: I added support for closure arg in https://github.com/racer-rust/racer/pull/867, but it needs type annotation :tired_face: Any contribution for enhancement is welcome, but please use the latest mater branch :slightly_smiling_face:

kngwyu avatar Aug 17 '18 06:08 kngwyu

I would love to have this feature. I have to resort to hacks to get the type of a variable in neovim now.

shinzui avatar Oct 06 '18 15:10 shinzui

@shinzui Thanks for feedback. I assigned myself.

kngwyu avatar Oct 07 '18 03:10 kngwyu

Hi @kngwyu, has there been any progress on this feature?

I got super excited when I saw this PR, and then I realized how old it was. I would be happy to try to rebase/rewrite it on top of master, if nobody else is working on this and if this functionality is not supplied somewhere else (e.g. rustc).

Baranowski avatar Oct 13 '19 09:10 Baranowski

@Baranowski Sorry, I'm not so active in this project now. It's great if you want to work for this PR, though there are some other active projects like rust-analyzer.

kngwyu avatar Oct 14 '19 09:10 kngwyu