29 lines
		
	
	
		
			700 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			700 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
return {
 | 
						|
	"stevearc/conform.nvim",
 | 
						|
	opts = {},
 | 
						|
	config = function()
 | 
						|
		require("conform").setup({
 | 
						|
			formatters_by_ft = {
 | 
						|
				lua = { "stylua" },
 | 
						|
				python = { "isort", "ruff_format" },
 | 
						|
				javascript = { "prettier" },
 | 
						|
				typescript = { "prettier" },
 | 
						|
				javascriptreact = { "prettier" },
 | 
						|
				typescriptreact = { "prettier" },
 | 
						|
				css = { "prettier" },
 | 
						|
				scss = { "prettier" },
 | 
						|
				html = { "prettier" },
 | 
						|
				json = { "prettier" },
 | 
						|
				yaml = { "prettier" },
 | 
						|
			},
 | 
						|
		})
 | 
						|
		vim.api.nvim_set_keymap(
 | 
						|
			"n",
 | 
						|
			"<Leader>f",
 | 
						|
			":lua require('conform').format()<CR>",
 | 
						|
			{ noremap = true, silent = true }
 | 
						|
		)
 | 
						|
	end,
 | 
						|
	keys = "<leader>f", -- Optionally specify here to load the plugin on this keypress
 | 
						|
}
 |