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

floaterm toggle not responding to which-key #406

Open
1 task done
hopezh opened this issue Apr 23, 2023 · 5 comments
Open
1 task done

floaterm toggle not responding to which-key #406

hopezh opened this issue Apr 23, 2023 · 5 comments

Comments

@hopezh
Copy link

hopezh commented Apr 23, 2023

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:
    • Windows

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

below.

floaterm: 
- ERROR No healthcheck found for "floaterm" plugin.
@jkellz-dev
Copy link

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

@ScheiklP
Copy link

ScheiklP commented Jul 9, 2023

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
Copy link

ScheiklP commented Jul 9, 2023

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.

@SonicZentropy
Copy link

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!

@asumaran
Copy link

asumaran commented Apr 1, 2024

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.

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

No branches or pull requests

5 participants