aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2024-07-19fix: ensure only expected options get passed throughSteven Arcangeli
2024-07-19feat: notify when no formatters available for a bufferSteven Arcangeli
2024-07-19refactor: deprecate formatter alternation syntaxSteven Arcangeli
2024-07-19feat: allow configuring conform.format() args on a per-filetype basisSteven Arcangeli
2024-07-19feat: allow customizing format() defaultsSteven Arcangeli
2024-06-17feat!: expand options for LSP formatting (#456)Steven Arcangeli
2024-06-10doc: document append_argsSteven Arcangeli
2024-05-22doc: add type annotations for setup() functionSteven Arcangeli
2024-05-21docs: better type definitions for top-level functions (#410)Jon Heinritz
* docs: extract conform.format(opts) into it's own class * docs: extract conform.format_lines(opts) into it's own class * refactor: use new nvim_doc_tools capability to remove duplicated class definition --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-05-07feat: formatters can use $RELATIVE_FILEPATH in args (#349)Steven Arcangeli
2024-03-15feat: add formatter config option to change name of temporary file (#332)Steven Arcangeli
2024-03-01cleanup: remove backwards compatability shimSteven Arcangeli
2024-02-20doc: remove spurious help tag (#294)Steven Arcangeli
2023-12-26docs: autogenerate formatter options docs (#234)Steven Arcangeli
2023-12-06refactor!: formatter config functions take self as first argument (#233)Steven Arcangeli
This is a breaking API change, but there is a shim in place that will keep existing functions working, just with a warning notification. Most people should not encounter this at all. For anyone overriding a formatter config value with a function that takes `(ctx)` as the parameter, it will need to be updated to take `(self, ctx)`.
2023-11-04feat: allow formatters_by_ft to be a function (#174)Steven Arcangeli
2023-10-15feat!: merge configs in conform.formatters with defaults (#140)Steven Arcangeli
This breaking change should make it significantly easier to modify formatters. While I expect 99% of configs to be backwards-compatible, this can still potentially cause problems. If you: * define a formatter in the `formatters` option * that has the same name as a built-in formatter * and omits a property from the original formatter (e.g. leaves out `range_args` or `cwd`) Then you may encounter breaking behavior from this commit, because now your config definition will be merged with the built-in definition, and so will inherit those omitted properties. This config merging behavior can be opted-out of by adding `inherit = false` to your formatter config.
2023-10-08doc: add additional information about some advanced topicsSteven Arcangeli
2023-09-29doc: speed up documentation generationSteven Arcangeli
2023-09-21refactor: rename ruff -> ruff_fixSteven Arcangeli
2023-09-17feat: make lsp_fallback behavior more intuitive (#59)Steven Arcangeli
When lsp_fallback = true AND the only formatters for the buffer are from the "*" or "_" filetype, format with LSP instead of the "*"/"_" formatters.
2023-09-15feat: '_' filetype to define fallback formattersSteven Arcangeli
2023-09-15feat: allow running commands in a shell (#49)Steven Arcangeli
2023-09-14doc: add some recipes to the documentationSteven Arcangeli
2023-09-10feat: format_on_save and format_after_save can be functionsSteven Arcangeli
2023-09-08doc: document the "*" filetype optionSteven 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-06doc: add guidance for extending built-in formatters (#27)Steven Arcangeli
2023-09-05doc: format() takes bufnr, not buf (#25)Seth Daniel
2023-09-04doc: fix prettierd formatter name in README (#24)jinzhongjia
* fix readme error and add a tip * fix doc `prettier_d`
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-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-28doc: move doc scripts around and eliminate submoduleSteven Arcangeli