aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-03-24 22:09:32 +0100
committerThomas Schmucker <ts@its1.de>2026-03-24 22:09:32 +0100
commitf47268bdb61ea02f6dc1ece2c699473277107947 (patch)
treea84b3e3dd97a03ea9cca8f936c0576a08188eed0 /nvim/lua/plugins
parent3684394fd8e137527420f527d32f55847af0eb32 (diff)
downloaddotfiles-f47268bdb61ea02f6dc1ece2c699473277107947.tar.gz
dotfiles-f47268bdb61ea02f6dc1ece2c699473277107947.tar.bz2
dotfiles-f47268bdb61ea02f6dc1ece2c699473277107947.zip
Neovim: conform arbeitet unabhängig von LSP
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/format.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
index 2d6a55c..9010657 100644
--- a/nvim/lua/plugins/format.lua
+++ b/nvim/lua/plugins/format.lua
@@ -1,12 +1,24 @@
1return { 1return {
2 "stevearc/conform.nvim", 2 "stevearc/conform.nvim",
3 event = { "BufReadPre", "BufNewFile" }, 3 event = { "BufReadPre", "BufNewFile" },
4 keys = {
5 {
6 "<leader>cf",
7 function()
8 require("conform").format({
9 async = true,
10 lsp_fallback = true,
11 })
12 end,
13 desc = "Format file",
14 },
15 },
4 opts = { 16 opts = {
5 formatters_by_ft = { 17 formatters_by_ft = {
6 sh = { "shfmt" }, -- brew install, pkg install shfmt 18 sh = { "shfmt" }, -- brew install, pkg install shfmt
7 bash = { "shfmt" }, 19 bash = { "shfmt" },
8 python = { "ruff_format", "black" }, -- brew install ruff, pkg install ruff 20 python = { "ruff_format", "black" }, -- brew install ruff, pkg install ruff
9 lua = { "stylua" }, -- brew install stylua, pkg install stylua 21 lua = { "stylua" }, -- brew install stylua, pkg install stylua
10 typescript = { "prettierd", "prettier" }, 22 typescript = { "prettierd", "prettier" },
11 javascript = { "prettierd", "prettier" }, 23 javascript = { "prettierd", "prettier" },
12 json = { "jq" }, -- brew install jq, pkg install jq 24 json = { "jq" }, -- brew install jq, pkg install jq