mrcjkb / haskell-tools.nvim

🦥 Supercharge your Haskell experience in neovim!
GNU General Public License v2.0
448 stars 17 forks source link

Launches another server for the cabal file #316

Closed BebeSparkelSparkel closed 8 months ago

BebeSparkelSparkel commented 8 months ago

Neovim version (nvim -v)

v0.9.1

Operating system/version

Openbsd7.3

Output of :checkhealth haskell-tools

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

Checking for Lua dependencies
- WARNING telescope not installed. Required for hoogle search modes "telescope-local" and "telescope-web" [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)

Checking external dependencies
- OK haskell-language-server: found haskell-language-server version: 2.5.0.0 (GHC: 9.2.7) (PATH: 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 8.4.0 (x86_64-unknown-openbsd7.4) libcurl/8.4.0 LibreSSL/3.8.2 zlib/1.3 nghttp2/1.57.0 ngtcp2/0.19.1 nghttp3/0.15.0
- 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

:e .cabal :vs /*.hs

Expected behaviour

Expected it to use the same language sever for the .cabal file as the .hs file

Actual behaviour

Launches a sever for for both file types

Log files

No response

The minimal config used to reproduce this issue.

$ cat /home/wjr/.config/nvim/init.lua 
-- lazy package manager
local plugins = {
        {
          'mrcjkb/haskell-tools.nvim',
          tag = "3.1.1",
          ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' },
        },
}
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(plugins)
mrcjkb commented 8 months ago

Hey 👋

Thanks for reporting. This is intentional, in order to work around https://github.com/mrcjkb/haskell-tools.nvim/issues/223.

If this is causing problems for you, I can add an option to disable the extra cabal client (when I have some spare time), but it may lead to the issues encountered in #223.

BebeSparkelSparkel commented 8 months ago

Thank you for clarifying. I don't think that the option would be helpful to me, but thanks anyway.