Skip to content

Repl reload, query no longer works in 4.4.1 #437

Closed
@Crdr0122

Description

@Crdr0122

Neovim version (nvim -v)

0.11.0 nightly

Operating system/version

Nixos unstable

Output of :checkhealth haskell-tools

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.9.0.0 (GHC: 9.6.6) (PATH: /nix/store/jwsdngxidwfh99ilsnhvvx1hh4dp4zva-haskell-language-server-2.9.0.0/bin/haskell-language-server-wrapper)
- OK hoogle: found Hoogle 5.0.18.4, https://hoogle.haskell.org/
- 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.11.1 (x86_64-pc-linux-gnu) libcurl/8.11.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0
- OK haskell-debug-adapter: found haskell-debug-adapter-0.0.40.0
- OK ghci-dap: found 

Checking config ~
- OK No errors found in config.

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

How to reproduce the issue

Using 4.4.1, open a simple haskell file, use command Haskell repl reload after repl is opened, or use whatever key shortcut

Expected behaviour

A :r appears in the repl window and the module is reloaded, same for querying commands. This does work as expected in 4.4.0

Actual behaviour

The cursor line can be seen moving to the bottom line in the repl window. However reloading does not happen and :r is not input into the repl window. Same applies for querying commands

Log files

The minimal config used to reproduce this issue.

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
  if vim.v.shell_error ~= 0 then
    vim.api.nvim_echo({
      { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
      { out,                            "WarningMsg" },
      { "\nPress any key to exit..." },
    }, true, {})
    vim.fn.getchar()
    os.exit(1)
  end
end
vim.opt.rtp:prepend(lazypath)

vim.g.haskell_tools = {
  hls = {
    on_attach = function(client, bufnr, ht)
      -- Set keybindings, etc. here.
      vim.keymap.set("n", "<leader>lr", ":Haskell repl toggle<CR>", { buffer = true, desc = "Toggle Repl" })
      vim.keymap.set("n", "<leader>lq", ":Haskell repl quit<CR>", { buffer = true, desc = "Quit Repl" })
      vim.keymap.set("n", "<leader>le", ":Hls evalAll<CR>", { buffer = true, desc = "Eval All" })
      vim.keymap.set("n", "<leader>lR", ":Haskell repl reload<CR>", { buffer = true, desc = "Reload Repl" })
      vim.keymap.set("n", "<leader>li", ":Haskell repl cword_info<CR>", { buffer = true, desc = "Query Cursor Info" })
      vim.keymap.set("n", "<leader>lt", ":Haskell repl cword_type<CR>", { buffer = true, desc = "Query Cursor Type" })
      vim.keymap.del('n', 'ghc')
    end,
    -- ...
  },
}
-- Setup lazy.nvim
require("lazy").setup({
  spec = {
    -- import your plugins
    {
      'mrcjkb/haskell-tools.nvim',
      -- version = '4.4.0', -- Recommended
      version = '^4', -- Recommended
      dependecies = {
      },
    },
  },
  install = { colorscheme = { "habamax" } },
  -- automatically check for plugin updates
  checker = { enabled = true },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions