Skip to content

Commit

Permalink
fix: try to workaround terminal freeze issues
Browse files Browse the repository at this point in the history
There's an open issue where there appears to be race conditions when
hitting Ctrl-C during lua deferred functions.

Lots of people were hitting this when using treesitter folding in
terminals.  I was using indent, which may or may not have a similar
problem, but either way I'm happy to disable folding in terminal.

References:

- issue: neovim/neovim#20726
- workaround: neovim/neovim#20726 (comment)
  • Loading branch information
hjdivad committed Mar 14, 2024
1 parent 4fc8bf0 commit bf2f7b2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/nvim/config/lua/config/auto/terminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ function M.setup_terminal_window()

win.number = false
win.relativenumber = false

local win_config = vim.api.nvim_win_get_config(win_id)
local is_not_float = win_config.relative == ""
vim.wo.foldmethod = 'manual'
end

function M.setup()
Expand Down

0 comments on commit bf2f7b2

Please sign in to comment.