Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:33
    chemzqm closed #1384
  • 10:33
    chemzqm commented #1384
  • 10:08
    kchibisov opened #1384
  • 04:13
    chrisniael commented #1379
  • 04:11
    chrisniael commented #1379
  • 03:57
    chemzqm labeled #1383
  • 03:53
    chrisniael edited #1383
  • 03:50
    chrisniael opened #1383
  • Dec 05 07:49
    fannheyward commented #1382
  • Dec 05 05:46
    monkoose closed #1381
  • Dec 05 05:46
    monkoose commented #1381
  • Dec 05 05:39
    kcajf commented #1382
  • Dec 05 05:05
    kcajf commented #1382
  • Dec 05 03:03
    fannheyward commented #1382
  • Dec 05 02:24
    kcajf commented #1382
  • Dec 05 02:11
    fannheyward commented #1382
  • Dec 05 02:09
    fannheyward commented #1382
  • Dec 05 02:09
    kcajf commented #1382
  • Dec 05 02:04
    kcajf commented #1382
  • Dec 05 02:01
    fannheyward commented #1382
Ben LeMasurier
@benlemasurier
yeah, just found that. thank you
Jesse Atkinson
@jsatk
Ah. Is it fixed in nvim?
Qiming zhao
@chemzqm
No such issue on neovim.
Jesse Atkinson
@jsatk
Thanks. I still use vim 8. Might finally switch. Metals (Scala LSP) threw an error in nvim so I bailed. Might try to fix it tomorrow.
Qiming zhao
@chemzqm
neovim's async IO works better than vim8's channel IMO.
Jesse Atkinson
@jsatk
Thanks !
Matheus Lessa Rodrigues
@matheuslessarodrigues

hello, all! I got a question: how do we cycle between function overloads?

I'm working with C# and got a function overloaded with different parameters.
When the autocomplete triggers, it correctly states that there's +1 overload, however I can't seem to cycle between them.
Don't know if it happens with other languages since I only work with C#, Rust and TypeScript (afaik C# is the only that supports this kind of function overload)

Thanks for your help!

image.png
(screenshot of the issue)
oybek
@oybek

I have

nmap <silent> gd :call CocAction('jumpDefinition', 'tab drop') <CR>
nmap <silent> gy <Plug>(coc-type-definition)

gd works fine
but when I type gy getting:

[coc.nvim] Type definition provider not found for current document

How to express coc-type-definition through CocAction?

Ryan Zeigler
@rzeigler
is there a way to show the inferred type of a variable?
oybek
@oybek

@rzeigler I'm having trouble configuring this feature, by official doc
if you add

nmap <silent> gy <Plug>(coc-type-definition)

gy must do what you want

Francisco Lopes
@oblitum
@matheuslessarodrigues coc.nvim does not provide cycle between overloads, related issue is neoclide/coc.nvim#305.
Francisco Lopes
@oblitum
@rzeigler nnoremap <silent> <leader>cH :call CocActionAsync('doHover')<cr>displays variable type in a floating window when I type <leader>cH, with ccls.
@oybek that ^ may be useful for you too.
Ryan Zeigler
@rzeigler
@oblitum thanks, thats exactly what I was looking for
Rohan Shah
@rohanshah
I'm having trouble with goto definition (coc-definition) in Vim... when I jump to a definition, the buffer that's opened doesn't recognize the filetype as scala and thus the highlighting is off (scala filetype highlighting was setup up using scala-vim defaults). Running :setfiletype scala fixes the syntax highlighting. Has anyone experienced this before? Here is my vimrc: https://github.com/rohanshah/dotfiles/blob/master/vimrc
Matheus Lessa Rodrigues
@matheuslessarodrigues
thanks, @oblitum !
Qiming zhao
@chemzqm
@matheuslessarodrigues you may have to scroll floating window if server send multiple function signatures.
@rzeigler doHover might help
Matheus Lessa Rodrigues
@matheuslessarodrigues
@chemzqm what do you mean by scroll floating window? how do i do that?
here's a screenshot of the issue:
image.png
there I can see that there's an overload with no parameters. but I don't know how to see the parameter that the other overload receives :(
thanks for the help, nonetheless!
oybek
@oybek

@oybek that ^ may be useful for you too.

that worked, and showing power on the top - I expected popup above selection but I think it is not possible due to vim constraints

Francisco Lopes
@oblitum
@oybek there's a preferShowAbove setting, I know it works for setting signatureHelp to show below when set to false, not sure whether it affects hover.
oybek
@oybek

@oblitum I tried this

 nmap <silent> gy :call CocActionAsync('doHover', 'preferShowAbove') <CR>

is it what did you mean?

oybek
@oybek

I'm having trouble with goto definition (coc-definition) in Vim... when I jump to a definition, the buffer that's opened doesn't recognize the filetype as scala and thus the highlighting is off (scala filetype highlighting was setup up using scala-vim defaults). Running :setfiletype scala fixes the syntax highlighting. Has anyone experienced this before? Here is my vimrc: https://github.com/rohanshah/dotfiles/blob/master/vimrc

try to add syntax on to .vimrc

oybek
@oybek

@rzeigler nnoremap <silent> <leader>cH :call CocActionAsync('doHover')<cr>displays variable type in a floating window when I type <leader>cH, with ccls.

CocAction('doHover') working much more faster, hmm...

Qiming zhao
@chemzqm
@matheuslessarodrigues It should be problem of your language server, check output channel
oybek
@oybek
how to be with this error in metals.log?
ERROR unexpected error during source scanning java.nio.file.FileSystemNotFoundException: /Users/hashimov/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-macros_2.13/2.0.0/cats-macros_2.13-2.0.0-sources.jar
Marko Vujanic
@ultrox

@chemzqm I use trigger suggestion with tab and want it to immediately suggest first item. Currently, it only opens the pop

function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~ '\s'
endfunction

inoremap <silent><expr> <Tab>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<Tab>" :
      \ coc#refresh()

any idea how to do this?

Rohan Shah
@rohanshah
@oybek I tried adding syntax on. I already have syntax enable in my .vimrc. I tried both having both and having each separately and it still didn't properly syntax highlight the file
Francisco Lopes
@oblitum
@oybek that's not what I meant, check docs here: https://github.com/neoclide/coc.nvim/blob/master/data/schema.json#L617
@oybek could be configuration issue of your language server
Marko Vujanic
@ultrox
@chemzqm thanks that was it.
"suggest.noselect": false,
monkoose
@monkoose
any direction how i could get some results (as example outline or usage references) from currently running language server by coc, but not with coclist itself? Just :echo it or something is it easily possible?
Qiming zhao
@chemzqm
Use CocAction function
monkoose
@monkoose
@chemzqm thank you
so CocAction() is actual coc API inside vim, right?
monkoose
@monkoose
hm, seems like CocAction("jumpReferences") actually opens CocList, can you with it return something like a json output as with echo CocAction('documentSymbols')?
Jesse Atkinson
@jsatk
Question: In vim I do not get this error but in neovim i do. [coc.nvim] error: error on notification 'sendRequest': Error: Language server metals not found
Any idea what might cause this error in neovim but not vim with Coc?
Qiming zhao
@chemzqm
Check where you have used sendRequest CocAction
Jesse Atkinson
@jsatk
Hm. Will look tomorrow. Thank you.
Qiming zhao
@chemzqm
Could be server not started on sendRequest.
Jesse Atkinson
@jsatk
Hm. Seems to be working now. It's odd. I'm having mildly more weird issues with neovim than I was vim 8.
Ryan Zeigler
@rzeigler
perhaps more of a general vim question, but is it possible to jump into the floating windows that are generated for doHover?