I've set g:ycm_add_preview_to_completeopt = 1 and verified completeopt has preview, but the preview window is not opening.
I've checked the output from GetCompletions() and 'info' is not present in the data structure. I believe that is necessary for the vim complete-functions to trigger opening the preview window.
Have typescript v1.7.5
For Typescript, the detailed completions are not returned when the number of completions is greater than 100. See #1718 for details. Is it what you are experiencing?
No, I don't believe that is what I am experiencing. I think it's that the data coming back in from the tsserver is not in the expected structure. vim requires an info field to launch the preview window.
What is the output of :YcmDebugInfo?
I think this is simply that the typescript completer does not populate detailed_info. Not sure if this is the best YCM to do it, but I've accomplished what I wanted simply by duplicating the method signature into detailed_info ( #4b4e81f.
That bit of code now opens the preview window with a method's signature when doing completion.
This seems like a real bug on our end.
I have pushed a branch which resolves this. It also tidies up the completion menu in Vim to match other YCM completers, rather than hand-crafting menu text. The net result is that the (single-char) 'kind' is shown before the full signature, as is the Vim standard.
https://github.com/puremourning/ycmd-1/tree/typescript-detailed_info
Can anyone who feels strongly about this feature please check it out and let us know?
I've been using your branch moderately for about a day doing typescript dev. So far, everything looking and working great. Thanks
@jomifo thanks so much for the feedback, it is truly appreciated!
@puremourning Discovered it does not open preview window for kind 'c' (class). I would naturally expect the preview window to open and be populated with the constructor signature for this kind.
If tsserver doesn't return anything then we can't either.
Do you happen to have a test case I can try?
On 9 Mar 2016, at 15:22, jomifo [email protected] wrote:
@puremourning Discovered it does not open preview window for kind 'c' (class). I would naturally expect the preview window to open and be populated with the constructor signature for this kind.
—
Reply to this email directly or view it on GitHub.
I suspected it was tsserver. Here is a small example,
`
module mymodule {
export class TestClass {
constructor(someArg:number){
}
}
}
import TestClass = mymodule.TestClass;
// this does not open preview when auto completing
var x:TestClass = new TestClass(0);
// but if you prefix with module it will open preview window, but does not show
// constructor signature, just "class mymodule.TestClass"
var x:mymodule.TestClass = new mymodule.TestClass(0)
`
Let's keep it open until the change is merged
still not merged
@puremourning I guess a PR was never submitted, right?
Right.
On 21 Aug 2016, at 21:42, Andrea Cedraro [email protected] wrote:
@puremourning I guess a PR was never submitted, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Hey, is this still relevant?
I would like the preview window to open and be populated with the output of :YcmCompleter GetDoc.
So far the preview window won't open, even after setting
let g:ycm_add_preview_to_completeopt = 1 in init.vim.
I guess I never finished the PR so yes it is still outstanding
Did this stall again, the changes don't seem to be live yet.
Valloric/ycmd#971 should have fixed this. In the updated ycmd the typescript completer does have detailed_info in the completion response.
We have made a lot of improvements in ycmd and should soon update the submodule in YCM.
Most helpful comment
still not merged