aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform
AgeCommit message (Collapse)Author
2023-09-15feat: utility function to extend the built-in formatter args (#50)Steven Arcangeli
2023-09-15feat: provide a formatexpr (#55)Steven Arcangeli
2023-09-15feat: add GNU/BSD indent (#54)Thim Cederlund
2023-09-15feat: add shellcheck (#44)Steven Arcangeli
2023-09-15feat: allow running commands in a shell (#49)Steven Arcangeli
2023-09-15feat: format_on_save functions can return a callback as the second valueSteven Arcangeli
2023-09-15fix: `q` keymap in ConformInfo and `codespell` exit codes (#53)pseudometa
* fix: `codespell` error when trying to fix ambiguous misspelling * fix: delay when having a keymap with `q` as operator
2023-09-15feat: alejandra formatter (#52)Leiser Fernández Gallo
2023-09-14fix: use non-deprecated health report functions if available (#48)Maria José Solano
2023-09-14feat: add `markdownlint`, `stylelint`, `codespell`, and `biome` (#45)pseudometa
* feat: add markdownlint, stylelint & codespell * feat: add `biome` * fix: indentation
2023-09-14feat: add deno fmt (#46)Riley Bruins
2023-09-14feat: add djlint (#47)zootedb0t
2023-09-14feat: add buf as protobuf linter (#43)buz
2023-09-14feat: latexindent (#42)Isak Samsten
2023-09-14feat: ruff (#41)Isak Samsten
2023-09-14doc: add some recipes to the documentationSteven Arcangeli
2023-09-13doc: document the format options that are passed through to LSP formattingSteven Arcangeli
2023-09-13fix: extra trailing newline for LSP formatters that replace entire fileSteven Arcangeli
2023-09-12fix: modify diff calculation to handle end-of-file newlines better (#35)Steven Arcangeli
2023-09-10feat: format_on_save and format_after_save can be functionsSteven Arcangeli
2023-09-08feat: format() can always fall back to LSP formattingSteven Arcangeli
2023-09-08feat: syntax for using first available formatterSteven Arcangeli
Alternations are now supported. You can specify a sub-list in place of a formatter name and conform will use the first formatter in that list that is available. For example, this will use either prettierd or prettier (whichever is available), and then always trim whitespace afterwards: conform.format(formatters = { { "prettierd", "prettier" }, "trim_whitespace" }) This syntax is available both in the formatters_by_ft config option and in the `formatters` argument of the `format` method.
2023-09-07refactor!: remove run_all_formatters config optionSteven Arcangeli
run_all_formatters is now the default. To only run the first formatter (the previous behavior), see the next commit
2023-09-07refactor: make get_formatter_info a public methodSteven Arcangeli
2023-09-07lint: apply styluaSteven Arcangeli
2023-09-07feat: add beautysh, taplo, trim_newlines and trim_whitespace (#29)xfzv
* feat: add beautysh * feat: add taplo * feat: add trim_newlines * feat: add trim_whitespace * doc: mention that `trim_newlines` and `trim_whitespaces` are using `awk` --------- Co-authored-by: xfzv <>
2023-08-31fix: callback should always be calledSteven Arcangeli
2023-08-31feat: format() takes an optional callback (#21)Steven Arcangeli
* refactor: replicate lsp.buf.format call * feat: format() takes an optional callback * fix: improper logging * fix: callback returns error if buffer is no longer valid * fix: provide more detailed error message to callback * fix: properly detect task interruption * cleanup: remove unnecessary error code translation * fix: lsp formatting for Neovim 0.9 * doc: add example of async formatting on save * fix: async LSP formatter discards changes if buffer was modified * fix: error code comparison * fix: use the same LSP client filtering logic everywhere * fix: add buffer validity guard checks * fix: add buffer validity guard to LSP formatter * refactor: change the default log level to WARN
2023-08-30feat: apply changes as text edits using LSP utils (#18)Steven Arcangeli
* feat: apply changes as text edits using LSP utils This means we can leverage all of the work that was done in the LSP client to preserve marks, cursor position, etc * log: add trace logging to debug performance * feat: use the same diff -> TextEdit technique for bad LSP servers Some LSP servers simply return a single TextEdit that replaces the whole buffer. This is bad for extmarks, cursor, and if the buffer is open in multiple windows the non-active window will jump to the top. We can detect that situation and apply the same vim.diff logic to convert it into more granular TextEdits.
2023-08-29feat: notify when formatter errors, and add notify_on_error config option (#16)Steven Arcangeli
2023-08-29fix: shellharden (#15)Seth Daniel
2023-08-29feat: display last few lines of the log file in :ConformInfoSteven Arcangeli
2023-08-29feat: add perltidy (#12)Seth Daniel
2023-08-29feat: add shellharden (#14)Seth Daniel
2023-08-29feat: add golines (#11)Seth Daniel
2023-08-29feat: add perlimports (#13)Seth Daniel
2023-08-29feat: formatter config function is passed the buffer number (#9)Steven Arcangeli
2023-08-29feat: add support for environment variables (#8)Steven Arcangeli
2023-08-28feat: ConformInfo command for debugging formatter statusSteven Arcangeli
2023-08-28feat: range formattingSteven Arcangeli
Should work the same as vim.lsp.buf.format(). Additionally, range formatting is supported for *any* formatter. If the formatter doesn't have native support for ranges, conform will do its best to only apply the diffs that affect that range.
2023-08-28fix: stable ordering when specifying multiple formattersSteven Arcangeli
2023-08-28refactor!: remove ability for formatter list to disable autoformatSteven Arcangeli
I realized that there are so, so many possible features people would want when configuring the autoformatter, but it's better to just code it up yourself rather than try to create a config language that can describe all possible logic. Also adding new docs to provide examples of more advanced autoformat logic.
2023-08-28fix: don't show 'no formatters' warning if none configuredSteven Arcangeli
2023-08-28feat: can silence notification when running formatters (#7)Steven Arcangeli
2023-08-28fix: remove unnecessary notifySteven Arcangeli
2023-08-27fix: keep window position stable when LSP formattingSteven Arcangeli
2023-08-27lint: fix type annotationsSteven Arcangeli
2023-08-27doc: flesh out config options documentationSteven Arcangeli
2023-08-27fix: no need to save/restore window viewSteven Arcangeli
Since we're applying diffs instead of replacing the entire buffer, the cursor actually stays in a more predictable location if we _don't_ try to save & restore the window views.
2023-08-27test: add a test suiteSteven Arcangeli