diff options
| author | 2025-05-02 16:05:47 +0300 | |
|---|---|---|
| committer | 2025-05-02 16:05:47 +0300 | |
| commit | 446d2716e7bb83e58fb516ec27e5c7750069e98c (patch) | |
| tree | 3e2bdee9d79cf8495fde84a559d2b05bf7ca45b8 /nvim/lua/plugins/conform.lua | |
| parent | Сделал кейбинды (diff) | |
| download | dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.gz dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.bz2 dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.tar.xz dotfiles-446d2716e7bb83e58fb516ec27e5c7750069e98c.zip | |
Перешел на lazy nvim, навел порядок в плагинах
Diffstat (limited to 'nvim/lua/plugins/conform.lua')
| -rw-r--r-- | nvim/lua/plugins/conform.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nvim/lua/plugins/conform.lua b/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..ea0fcf0 --- /dev/null +++ b/nvim/lua/plugins/conform.lua @@ -0,0 +1,34 @@ +return { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + graphql = { "prettier" }, + lua = { "stylua" }, + python = { "isort", "black" }, + go = { "gofmt" }, + }, + format_on_save = { + lsp_fallback = true, + async = false, + timeout_ms = 500, + }, + }, + keys = { + { + "<leader>mp", + function() + require("conform").format({ lsp_fallback = true, async = false, timeout_ms = 500 }) + end, + desc = "Format file or range (in visual mode)", + }, + }, +} |
