diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-06-10 07:02:35 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-06-10 07:02:35 +0200 |
| commit | 3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2 (patch) | |
| tree | cbc6b6a56bed214b7efeb8e7eabb00acfde7ba22 /nvim/lua/plugins/format.lua | |
| parent | fb8eb91fb404e8f8c9bcd6b201e18522e3200ac5 (diff) | |
| parent | cf47304c9f96b921ad12faf762574702e7fe562a (diff) | |
| download | dotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.tar.gz dotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.tar.bz2 dotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.zip | |
Merge branch 'master' of ssh://raspi2:/srv/git/dotfiles
Diffstat (limited to 'nvim/lua/plugins/format.lua')
| -rw-r--r-- | nvim/lua/plugins/format.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua index b8b0256..9334465 100644 --- a/nvim/lua/plugins/format.lua +++ b/nvim/lua/plugins/format.lua | |||
| @@ -5,18 +5,17 @@ return { | |||
| 5 | { | 5 | { |
| 6 | "<leader>cf", | 6 | "<leader>cf", |
| 7 | function() | 7 | function() |
| 8 | require("conform").format({ | 8 | require("conform").format({ async = true }) |
| 9 | async = true, | ||
| 10 | lsp_fallback = true, | ||
| 11 | }) | ||
| 12 | end, | 9 | end, |
| 13 | desc = "Format file", | 10 | desc = "Format file", |
| 14 | }, | 11 | }, |
| 15 | }, | 12 | }, |
| 16 | opts = { | 13 | opts = { |
| 17 | formatters_by_ft = { | 14 | formatters_by_ft = { |
| 15 | awk = { "gawk" }, -- pkg install gawk | ||
| 18 | bash = { "shfmt" }, | 16 | bash = { "shfmt" }, |
| 19 | -- cpp = { "clang_format" }, | 17 | c = {}, -- clangd |
| 18 | cpp = {}, -- clangd | ||
| 20 | javascript = { "prettier" }, | 19 | javascript = { "prettier" }, |
| 21 | json = { "jq" }, -- brew install jq, pkg install jq | 20 | json = { "jq" }, -- brew install jq, pkg install jq |
| 22 | lua = { "stylua" }, -- brew install stylua, pkg install stylua | 21 | lua = { "stylua" }, -- brew install stylua, pkg install stylua |
| @@ -27,6 +26,9 @@ return { | |||
| 27 | xsd = { "xmllint" }, | 26 | xsd = { "xmllint" }, |
| 28 | yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt | 27 | yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt |
| 29 | }, | 28 | }, |
| 29 | default_format_opts = { | ||
| 30 | lsp_format = "fallback", | ||
| 31 | }, | ||
| 30 | }, | 32 | }, |
| 31 | 33 | ||
| 32 | config = function(_, opts) | 34 | config = function(_, opts) |
