formatting

This commit is contained in:
Christoph J. Scherr 2024-01-22 20:07:30 +01:00
parent e40cc7bbd7
commit a5ef5f3623
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
2 changed files with 15 additions and 14 deletions

View File

@ -1,24 +1,26 @@
local options = {
lsp_fallback = true,
lsp_fallback = true,
formatters_by_ft = {
lua = { "stylua" },
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
css = { "prettier" },
html = { "prettier" },
javascript = { "prettier" },
css = { "prettier" },
html = { "prettier" },
sh = { "shfmt" },
},
sh = { "shfmt" },
toml = { "taplo" },
rust = { "rustfmt" },
},
-- adding same formatter for multiple filetypes can look too much work for some
-- instead of the above code you could just use a loop! the config is just a table after all!
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
}
require("conform").setup(options)

View File

@ -556,7 +556,6 @@ local plugins = {
-- :Chmod
-- and also some more, but those are easy done with shell
"tpope/vim-eunuch",
enabled = false,
lazy = false,
},
{