mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-11-03 22:11:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			888 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			888 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
return {
 | 
						|
  -- improved refactoring
 | 
						|
  {
 | 
						|
    "stevearc/conform.nvim",
 | 
						|
    config = function()
 | 
						|
      require("conform").setup({
 | 
						|
        formatters_by_ft = {
 | 
						|
          lua = { "stylua" },
 | 
						|
          markdown = { "mdformat" },
 | 
						|
          python = { "isort", "yapf" },
 | 
						|
          sh = { "beautysh" },
 | 
						|
          shell = { "beautysh" },
 | 
						|
          tex = { "latexindent" },
 | 
						|
          yaml = { "yamlfmt" },
 | 
						|
        },
 | 
						|
      })
 | 
						|
      require("conform").formatters.latexindent = {
 | 
						|
        args = require("conform.util").extend_args(
 | 
						|
          require("conform.formatters.latexindent").args,
 | 
						|
          { "-y=defaultIndent: '  '" }
 | 
						|
        ),
 | 
						|
      }
 | 
						|
      require("conform").formatters.beautysh = {
 | 
						|
        args = require("conform.util").extend_args(
 | 
						|
          require("conform.formatters.beautysh").args,
 | 
						|
          { "--indent-size=2", "--force-function-style=fnpar" }
 | 
						|
        ),
 | 
						|
      }
 | 
						|
    end,
 | 
						|
  },
 | 
						|
}
 |