formatting
This commit is contained in:
parent
e40cc7bbd7
commit
a5ef5f3623
|
@ -1,24 +1,26 @@
|
||||||
local options = {
|
local options = {
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
|
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
|
|
||||||
javascript = { "prettier" },
|
javascript = { "prettier" },
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
|
|
||||||
sh = { "shfmt" },
|
sh = { "shfmt" },
|
||||||
},
|
toml = { "taplo" },
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
},
|
||||||
|
|
||||||
-- adding same formatter for multiple filetypes can look too much work for some
|
-- 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!
|
-- instead of the above code you could just use a loop! the config is just a table after all!
|
||||||
|
|
||||||
-- format_on_save = {
|
-- format_on_save = {
|
||||||
-- -- These options will be passed to conform.format()
|
-- -- These options will be passed to conform.format()
|
||||||
-- timeout_ms = 500,
|
-- timeout_ms = 500,
|
||||||
-- lsp_fallback = true,
|
-- lsp_fallback = true,
|
||||||
-- },
|
-- },
|
||||||
}
|
}
|
||||||
|
|
||||||
require("conform").setup(options)
|
require("conform").setup(options)
|
||||||
|
|
|
@ -556,7 +556,6 @@ local plugins = {
|
||||||
-- :Chmod
|
-- :Chmod
|
||||||
-- and also some more, but those are easy done with shell
|
-- and also some more, but those are easy done with shell
|
||||||
"tpope/vim-eunuch",
|
"tpope/vim-eunuch",
|
||||||
enabled = false,
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue