diff options
author | pseudometa <73286100+chrisgrieser@users.noreply.github.com> | 2023-09-15 15:49:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 06:49:36 -0700 |
commit | d3fe43167c7d96036c8c037ef1b4e03b448efbe7 (patch) | |
tree | 0674066df1c9fb182ef4a29ab2de932f2cb889be /lua/conform | |
parent | 1dac5994c4f9200f74a90a4f24dfc914ac8fbc07 (diff) |
fix: `q` keymap in ConformInfo and `codespell` exit codes (#53)
* fix: `codespell` error when trying to fix ambiguous misspelling
* fix: delay when having a keymap with `q` as operator
Diffstat (limited to 'lua/conform')
-rw-r--r-- | lua/conform/formatters/codespell.lua | 1 | ||||
-rw-r--r-- | lua/conform/health.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lua/conform/formatters/codespell.lua b/lua/conform/formatters/codespell.lua index ca07415..88e0109 100644 --- a/lua/conform/formatters/codespell.lua +++ b/lua/conform/formatters/codespell.lua @@ -11,4 +11,5 @@ return { "--write-changes", "--check-hidden", -- conform's temp file is hidden }, + exit_codes = { 0, 65 }, -- code 65 is given when trying to format an ambiguous misspelling } diff --git a/lua/conform/health.lua b/lua/conform/health.lua index 6a12eab..473e8fa 100644 --- a/lua/conform/health.lua +++ b/lua/conform/health.lua @@ -156,7 +156,7 @@ M.show_window = function() vim.bo[bufnr].modifiable = false vim.bo[bufnr].modified = false vim.bo[bufnr].bufhidden = "wipe" - vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = bufnr }) + vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = bufnr, nowait = true }) vim.keymap.set("n", "<C-c>", "<cmd>close<cr>", { buffer = bufnr }) vim.api.nvim_create_autocmd("BufLeave", { desc = "Close info window when leaving buffer", |