vim-floaterm icon indicating copy to clipboard operation
vim-floaterm copied to clipboard

floaterm toggle not responding to which-key

Open hopezh opened this issue 2 years ago • 5 comments
trafficstars

I'm using LazyVim to install floaterm, with the following keymap config in the floaterm.lua file in LazyVim/lua/plugins folder to create a new floaterm window or toggle a floaterm window:

return {
  {
    "voldikss/vim-floaterm",
    keys = {
      { "<leader>ot", "<cmd>FloatermNew<cr>", desc = "new floaterm" },
      { "<leader>to", "<cmd>FloatermToggle<cr>", desc = "toggle floaterm" },
    },
  },
}

However, once the floterm window is open, which-key's keymap to is not working anymore, whatever I type will be the input of the terminal line, i.e. the floaterm window is not responding to which-key anymore.

May I ask how to make floaterm responds to which-key key maps? Thanks.

  • Output of vim --version: NVIM v0.10.0-dev-86+g54dab9ed9
  • Platform:
    • [x] Windows

If you are using neovim, just run :checkhealth floaterm and post the content

below.

floaterm: 
- ERROR No healthcheck found for "floaterm" plugin.

hopezh avatar Apr 23 '23 10:04 hopezh

I am getting the same thing:

floaterm: health#floaterm#check

common ~
- Platform: macos
- Nvim: NVIM v0.9.0
- Plugin: 59c1fd5


terminal ~
- OK Terminal emulator is available

floating ~
- OK Floating window is available

jkellz-dev avatar May 10 '23 22:05 jkellz-dev

Same here

floaterm: health#floaterm#check
========================================================================
## common
  - INFO: Platform: linux
  - INFO: Nvim: NVIM v0.9.0-dev-254+gde500095b
  - INFO: Plugin: bd0aee3


## terminal
  - OK: Terminal emulator is available

## floating
  - OK: Floating window is available

ScheiklP avatar Jul 09 '23 20:07 ScheiklP

Same here

floaterm: health#floaterm#check
========================================================================
## common
  - INFO: Platform: linux
  - INFO: Nvim: NVIM v0.9.0-dev-254+gde500095b
  - INFO: Plugin: bd0aee3


## terminal
  - OK: Terminal emulator is available

## floating
  - OK: Floating window is available
return {
    'voldikss/vim-floaterm',
    init = function()
        vim.g.floaterm_keymap_toggle = '<F1>'
    end,
}

This one seems to work for me.

ScheiklP avatar Jul 09 '23 20:07 ScheiklP

I have tried about everything at this point and @ScheiklP method is the only one that works for me, as well. Thanks for the solution!

SonicZentropy avatar Aug 19 '23 02:08 SonicZentropy

I have tried about everything at this point and @ScheiklP method is the only one that works for me, as well. Thanks for the solution!

Defining shortcuts using the "keys" option didn't work for me to toggle terminals. putting it in the init options works for me too.

asumaran avatar Apr 01 '24 02:04 asumaran