From a5ef5f3623d02f2f3ea28fb23119201abbc985cb Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 22 Jan 2024 20:07:30 +0100 Subject: [PATCH] formatting --- lua/custom/configs/conform.lua | 28 +++++++++++++++------------- lua/custom/plugins.lua | 1 - 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lua/custom/configs/conform.lua b/lua/custom/configs/conform.lua index 4b142bd..a020d83 100644 --- a/lua/custom/configs/conform.lua +++ b/lua/custom/configs/conform.lua @@ -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) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 617378c..470d1b2 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -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, }, {