Closed kedashoe closed 3 years ago
@isovector not sure if you are using wingman with nvim to give us some clue about its setup
I don't know about nvim-lsp, but in Coc, the default code action getter is broken with respect to Wingman. Somehow. In coc, the trick is to use the <Plug>(coc-codeaction-selected)
operator, and then immediately add an l
motion. My guess is that nvim isn't sending precise cursor information to the LSP.
I use something like nmap <cr> v<plug>(coc-codeaction-selected)
Thank you all for the quick replies. Well, great news, I am a fool and it actually works out of the box with the built in lsp server and nvim-lspconfig! My problem was the project was using ghc-9.0.1. After reading some issues and realizing this might be the case, made a new project to test out in 8.10.7 and got wingman suggestions straight away.
I wonder if it would be worth mentioning it here? coc was great in its day, but seems there is momentum towards the built in lsp (and it seems to be able to support wingman without any additional config needed).
@kedashoe I'd be happy to merge a PR improving the documentation!
Your environment
Which OS do you use: ArchLinux
Which lsp-client do you use: Neovim built in LSP client with nvim-lspconfig
Describe your project: Just testing with default
cabal init
projectContents of
hie.yaml
:Steps to reproduce
Edit file, run code action on hole, eg
Expected behaviour *
Get suggestions from wingman
Actual behaviour
Do not seem to be getting suggestions from wingman. Here is what I see:
* Notes
I think maybe this is the expected behaviour? It looks like there are instructions for coc.nvim (https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin#cocnvim) so I guess by default there is more work to do to get wingman support. Has anyone got it working with the built in client and nvim-lspconfig? And thank you for the great project!