6 Commits

Author SHA1 Message Date
15233d9ea5 fix(conform): disable slow formatters in before_save hook, and format them after save
All checks were successful
build-flake / Build flake (push) Successful in 4m27s
build-flake / Release a new version (push) Successful in 8s
2025-12-29 12:27:55 +02:00
6d379f7a02 chore(flake): bump version
All checks were successful
build-flake / Build flake (push) Successful in 4m57s
build-flake / Release a new version (push) Successful in 8s
2025-12-29 12:11:44 +02:00
a513133bbe chore: add editorconfig 2025-12-29 12:11:44 +02:00
42719a9f92 feat(conform): do not disable formatters on timeout 2025-12-29 12:11:44 +02:00
06ccfa6b64 feat(conform): re-enable auto formatting, fix #47 2025-12-29 12:11:44 +02:00
6ab4db91ab chore(deps): update actions/checkout action to v6
All checks were successful
check-commits / Check commits (pull_request) Successful in 17s
build-flake / build (pull_request) Successful in 13m39s
build-flake / Build flake (push) Successful in 7m44s
build-flake / Release a new version (push) Successful in 9s
2025-12-03 00:02:43 +00:00
2 changed files with 21 additions and 22 deletions

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
- name: Setup sudo (required for the next step) - name: Setup sudo (required for the next step)
run: apt-get update && apt-get install -y sudo run: apt-get update && apt-get install -y sudo
- name: Setup nix - name: Setup nix

View File

@@ -124,34 +124,33 @@
return return
end end
-- if slow_format_filetypes[vim.bo[bufnr].filetype] then if slow_format_filetypes[vim.bo[bufnr].filetype] then
-- return return
-- end end
local function on_format(err) local function on_format(err)
return if err and err:match("timeout$") then
-- if err and err:match("timeout$") then slow_format_filetypes[vim.bo[bufnr].filetype] = true
-- slow_format_filetypes[vim.bo[bufnr].filetype] = true end
-- end
end end
return { timeout_ms = 200, lsp_fallback = true }, on_format return { timeout_ms = 200, lsp_fallback = true }, on_format
end end
''; '';
# format_after_save = # Lua format_after_save = # Lua
# '' ''
# function(bufnr) function(bufnr)
# if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
# return return
# end end
#
# if not slow_format_filetypes[vim.bo[bufnr].filetype] then if not slow_format_filetypes[vim.bo[bufnr].filetype] then
# return return
# end end
#
# return { lsp_fallback = true } return { lsp_fallback = true }
# end end
# ''; '';
log_level = "warn"; log_level = "warn";
notify_on_error = true; notify_on_error = true;
notify_no_formatters = false; notify_no_formatters = false;