Thomas hai 8 meses
pai
achega
9501e8c5fe
Modificáronse 2 ficheiros con 39 adicións e 23 borrados
  1. 22 6
      lua/plugins/conform.lua
  2. 17 17
      lua/plugins/edgy.lua

+ 22 - 6
lua/plugins/conform.lua

@@ -5,13 +5,29 @@ return {
 		require("conform").setup({
 			formatters_by_ft = {
 				lua = { "stylua" },
-				-- Conform will run multiple formatters sequentially
-				-- Use a sub-list to run only the first available formatter
-				javascript = { { "prettierd", "prettier" } },
-				rust = { "rustfmt", lsp_format = "fallback" },
-        typst = { "typstyle", lsp_format = "last" },
-				html = { "prettier", lsp_format = "fallback" },
+				-- Use `stop_after_first` instead of nested lists
+				javascript = {
+					"prettierd",
+					"prettier",
+					stop_after_first = "fallback",
+				},
+				rust = {
+					"rustfmt",
+					"lsp_format",
+					stop_after_first = "fallback", -- Use fallback behavior
+				},
+				typst = {
+					"typstyle",
+					"lsp_format",
+					stop_after_first = "last", -- Use last formatter behavior
+				},
+				html = {
+					"prettier",
+					"lsp_format",
+					stop_after_first = "fallback", -- Use fallback behavior
+				},
 			},
 		})
 	end,
 }
+

+ 17 - 17
lua/plugins/edgy.lua

@@ -66,22 +66,22 @@ return {
 		opts = {
 			bottom = {
 				-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
-				{
-					ft = "toggleterm",
-					size = { height = 0.4 },
-					-- exclude floating windows
-					filter = function(buf, win)
-						return vim.api.nvim_win_get_config(win).relative == ""
-					end,
-				},
-				{
-					ft = "lazyterm",
-					title = "LazyTerm",
-					size = { height = 0.4 },
-					filter = function(buf)
-						return not vim.b[buf].lazyterm_cmd
-					end,
-				},
+				-- {
+				-- 	ft = "toggleterm",
+				-- 	size = { height = 0.4 },
+				-- 	-- exclude floating windows
+				-- 	filter = function(buf, win)
+				-- 		return vim.api.nvim_win_get_config(win).relative == ""
+				-- 	end,
+				-- },
+				-- {
+				-- 	ft = "lazyterm",
+				-- 	title = "LazyTerm",
+				-- 	size = { height = 0.4 },
+				-- 	filter = function(buf)
+				-- 		return not vim.b[buf].lazyterm_cmd
+				-- 	end,
+				-- },
 				"Trouble",
 				{ ft = "qf", title = "QuickFix" },
 				{
@@ -92,7 +92,7 @@ return {
 						return vim.bo[buf].buftype == "help"
 					end,
 				},
-				{ ft = "spectre_panel", size = { height = 0.4 } },
+				-- { ft = "spectre_panel", size = { height = 0.4 } },
 			},
 			left = {
 				{