Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS not being configured properly, exit code of 127 returned by nvim when entering a Haskell .hs file #354

Closed
agreyyy opened this issue Mar 20, 2024 · 3 comments

Comments

@agreyyy
Copy link

agreyyy commented Mar 20, 2024

Neovim version (nvim -v)

0.9.5

Operating system/version

Linux Mint 21.2

Output of :checkhealth haskell-tools

==============================================================================
haskell-tools: require("haskell-tools.health").check()

Checking for Lua dependencies ~
- OK [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) installed.

Checking external dependencies ~
- OK haskell-language-server: found haskell-language-server version: 2.7.0.0 (GHC: 9.2.8) (PATH: /home/andrey/.local/share/nvim/mason/packages/haskell-language-server/lib/haskell-language-server-2.7.0.0/bin/haskell-language-server-wrapper)
- WARNING       hoogle: not found.
  Install [ndmitchell/hoogle](https://github.com/ndmitchell/hoogle) for extended capabilities.
  Recommended for better Hoogle search performance.
  Without a local installation, the web API will be used by default.
  Required if the hoogle mode is set to "telescope-local".
  
  
- WARNING       fast-tags: not found.
  Install [fast-tags](https://hackage.haskell.org/package/fast-tags) for extended capabilities.
  Optional, for generating tags as a `tagfunc` fallback.
  
- OK curl: found curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
- WARNING       haskell-debug-adapter: not found.
  Install [haskell-debug-adapter](https://github.com/phoityne/haskell-debug-adapter) for extended capabilities.
  Optional, for `dap` support.
  
- WARNING       ghci-dap: not found.
  Install [ghci-dap](https://github.com/phoityne/ghci-dap) for extended capabilities.
  Optional, for `dap` support.
  

Checking config ~
- OK No errors found in config.

Checking for conflicting plugins ~
- OK No conflicting plugins detected.

How to reproduce the issue

I just downloaded the haskell-tools.nvim and entered a .hs haskell project built using cabal. HLS exits with code 127 and signal 0 when I enter a .hs file. Idk how to fix this, I fixed the conflicting configs

Expected behaviour

HLS does not crash with exit code 127 and signal 0, just works

Actual behaviour

HLS exits with code 127 and signal 0, HlsStart reproduces this behaviour, I have tried installing HLS locally and via Mason, both produce the same output

Log files

No response

The minimal config used to reproduce this issue.

Idk what could cause this conflict, lsp does not setup Hls at all:
heres the lspconfig fn
mason_lspconfig.setup_handlers {
  function(server_name)
    if server_name == "hls" then
      return
    end

    require('lspconfig')[server_name].setup {
      capabilities = capabilities,
      on_attach = on_attach,
      settings = servers[server_name],
      filetypes = (servers[server_name] or {}).filetypes,
    }
  end,
}
@agreyyy agreyyy added the bug Something isn't working label Mar 20, 2024
@agreyyy
Copy link
Author

agreyyy commented Mar 20, 2024

Sorry I can`t describe more in depth what the error is, I am still new to neovim and haskell.

@agreyyy
Copy link
Author

agreyyy commented Mar 20, 2024

btw heres logs from the lsp, I figured out how to get them. logs.

@mrcjkb
Copy link
Owner

mrcjkb commented Mar 20, 2024

Hey 👋

It looks like you're running into this haskell-language-server issue

@mrcjkb mrcjkb closed this as completed Mar 20, 2024
@mrcjkb mrcjkb added upstream (hls) and removed bug Something isn't working labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants