Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

HIE unresponsive with vim and atom #1397

Closed
xsebek opened this issue Sep 27, 2019 · 3 comments
Closed

HIE unresponsive with vim and atom #1397

xsebek opened this issue Sep 27, 2019 · 3 comments

Comments

@xsebek
Copy link

xsebek commented Sep 27, 2019

I have vim1 set up with LanguageClient-neovim and HIE does not seem to respond, although it is running2.

VIM 8.1
GHC 8.6.4
HIE 0.10.0.0
macOS 10.15

Also:

apm  2.4.3
atom 1.40.1
atom-ide-ui 0.13.0
ide-haskell-hie 0.12.0
language-haskell 1.19.1

I am not savvy enough in vim to deduce how to pass hie-wrapper options (like where to log) through LanguageClient-neovim, so #1090 did not help me.

I tried to set it up with Atom, but it does not do anything? I specifically selected log to /tmp/hie.log but no log was produced 😢 A custom shell script hie-wrapper with all the flags on also does not produce any log file.

Trying things from the `LanguageClient_contextMenu`
  1. Type Definition
    [LC] timed out waiting on receive operation
    
  1. Code Action
    [LC] timed out waiting on receive operation
    
  2. Workspace Symbol
     [LC] [Error] haskell-lsp:no handler for. Object (fromList [("jsonrpc",String "2.0"),("params",Object (fromList [("query",String "")])),("method",String "workspace/symbol"),("id",Number 13.0)])
    
  3. Rename
    [LC] timed out waiting on receive operation
    
  4. Definition
    [LC] timed out waiting on receive operation
    
  5. References
    [LC] timed out waiting on receive operation
    
  6. Formatting
    ???
  7. Range Formatting
    ???
  8. Document Highlight
    ???
  9. Signature Help
    [LC] [Error] haskell-lsp:no handler for. Object (fromList [("jsonrpc",String "2.0"),("param...acter",Number 4.0)]))])),("method",String "textDocument/signatureHelp"),("id",Number 5.0)])
    [LC] timed out waiting on receive operation
    
  10. Hover
    [LC] timed out waiting on receive operation
    
  11. Document Symbol
    [LC] timed out waiting on receive operation
    
  12. Implementation
    [LC] [Error] haskell-lsp:no handler for. Object (fromList [("jsonrpc",String "2.0"),("param...er",Number 28.0)]))])),("method",String "textDocument/implementation"),("id",Number 10.0)])
    [LC] timed out waiting on receive operation
    

Maybe some of the timeots were in fact timeots of the previous operation, hard to say without log file.

My current vim settings
Plugin 'autozimu/LanguageClient-neovim'
set runtimepath+=~/.vim/bundle/LanguageClient-neovim
let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper'] }
let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log')

nnoremap <F5> :call LanguageClient_contextMenu()<CR>
map <Leader>lk :call LanguageClient#textDocument_hover()<CR>
map <Leader>lg :call LanguageClient#textDocument_definition()<CR>
map <Leader>lr :call LanguageClient#textDocument_rename()<CR>
map <Leader>lf :call LanguageClient#textDocument_formatting()<CR>
map <Leader>lb :call LanguageClient#textDocument_references()<CR>
map <Leader>la :call LanguageClient#textDocument_codeAction()<CR>
map <Leader>ls :call LanguageClient#textDocument_documentSymbol()<CR>

hi link ALEError Error
hi Warning term=underline cterm=underline ctermfg=Yellow gui=undercurl guisp=Gold
hi link ALEWarning Warning
hi link ALEInfo SpellCap

let g:LanguageClient_rootMarkers = ['*.cabal', 'stack.yaml']

Footnotes

  1. neovim does not solve the problem - I tried 😉

  2. when I modified LanguageClient_serverCommands to 'haskell': ['hie-wrapper -l "someLogFileInVimFolder"'] it did explicitly say that no server was running for haskell, so I guess it was running otherwise. Also it spits out errors (when used wrong?) sometimes, eg with Workspace Symbol.

@fendor
Copy link
Collaborator

fendor commented Sep 27, 2019

While I can not help you with vim, I want to mention, that your HIE version is not up-to-date, so maybe upgrading fixes it.
You can also try to run the func-test-suite in hie and see if everything works as intended: cabal v2-run test:func-test, or stack exec haskell-ide-engine:test:func-test, assuming you built the test-suite before that. Dont forget to use the appropiate ghc version and supply the correct --stack-yaml flag!

@xsebek
Copy link
Author

xsebek commented Oct 8, 2019

Thanks @fendor, it took me a while but I am now living happily again in New Cabal land.

The integration with editors is still not smooth, but I believe that is not a fault of HIE 🙂

@jneira
Copy link
Member

jneira commented Nov 21, 2019

@Arkemyr so could we close the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants