Closed ClaudiaJ closed 8 years ago
could you upload screenshoots please
deoplete-ternjs:
tern_for_vim with option off:
tern_for_vim with option on:
Done, please test it!
Your implementation of the flag g:tern_show_signature_in_pum
looks like it's backwards.
if vim.eval('exists("g:tern_show_signature_in_pum")'):
self._tern_show_signature = vim.eval('g:tern_show_signature_in_pum') == '0'
Test case: let g:tern_show_signature_in_pum = 1
:
Test case: let Test case:
let g:tern_show_signature_in_pum = 0`:
Test case: unlet g:tern_show_signature_in_pum
:
The implementation in tern_for_vim defaults the option to 0
if it is not defined by the user, then if it equals 0 at runtime, returns the generic type, else returns function signature instead.
I think is better the full one. If it starts annoying users I will put default to 0
On Thu, Mar 17, 2016, 8:16 PM Claudia Hardman notifications@github.com wrote:
Your implementation of the flag g:tern_show_signature_in_pum looks like it's backwards.
if vim.eval('exists("g:tern_show_signature_in_pum")'): self._tern_show_signature = vim.eval('g:tern_show_signature_in_pum') == '0'
Test case: let g:tern_show_signature_in_pum = 1:
- Exists evaluates true, flag value != 0, thus feature is disabled.
Test case: let Test case:let g:tern_show_signature_in_pum = 0`:
- Exists evaluates true, flag == 0, thus feature is enabled.
Test case: unlet g:tern_show_signature_in_pum:
- Exists evaluates false, feature defaults to enabled on line 64
The implementation in tern_for_vim defaults the option to 0 https://github.com/ternjs/tern_for_vim/blob/a26106b42f41edcd8bcd40d750f30339ec37f41c/autoload/tern.vim#L102-L104 if it is not defined by the user, then if it equals 0 at runtime https://github.com/ternjs/tern_for_vim/blob/e044f14efa3f5a88f7ef1acfe551b0a904605a44/script/tern.py#L241-L252, returns the generic type, else returns function signature instead.
— You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/carlitux/deoplete-ternjs/issues/11#issuecomment-198141783
Your call, though it could be misleading that setting the flag to 1 still disables the option.
Other than the noted difference, it does appear to work just as well as does tern_for_vim :)
Oh, yeah I will fix it... Thanks!
On Thu, Mar 17, 2016, 8:27 PM Claudia Hardman notifications@github.com wrote:
Your call, though it could be misleading that setting the flag to 1 still disables the option.
Other than the noted difference, it does appear to work just as well as does tern_for_vim :)
— You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/carlitux/deoplete-ternjs/issues/11#issuecomment-198143434
Done
Similar to how tern_for_vim does here, turned on by setting
g:tern_show_signature_in_pum
, and disabled by default.This option shows the function signature / TernType in the popup menu.