/
alkis
/
nvim
Обзор
Документация
Войти
/
alkis
/
nvim
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lua/plugins/conform.lua
36 строк
1 KB
avkis
Last changes
30 июн 2025, 06:49
30 июн 2025, 06:49
dce13aa
Код
Авторство
О чём код?
return { "stevearc/conform.nvim", opts = { formatters_by_ft = { lua = { "stylua" }, -- Conform will run multiple formatters sequentially -- python = { "isort", "black" }, python = function(bufnr) if require("conform").get_formatter_info("ruff_format", bufnr).available then return { "ruff_format" } else return { "isort", "black" } end end, -- You can customize some of the format options for the filetype (:help conform.format) -- Conform will run the first available formatter javascript = { "prettierd", "prettier", stop_after_first = true }, typescript = { "prettierd", "prettier", stop_after_first = true }, go = { "gofmt", "goimports", "golines" }, -- Use the "*" filetype to run formatters on all filetypes. -- Use the "_" filetype to run formatters on filetypes that don't -- have other formatters configured. ["_"] = { "trim_whitespace" }, }, -- Set this to change the default values when calling conform.format() -- This will also affect the default values for format_on_save/format_after_save default_format_opts = { lsp_format = "fallback", }, format_on_save = { -- These options will be passed to conform.format() timeout_ms = 500, lsp_format = "fallback", }, }, }