inital commit,
initalized from nix flake init -t github:BirdeeHub/nixCats-nvim#example.
This commit is contained in:
		
						commit
						9a78fd2d53
					
				
					 21 changed files with 2208 additions and 0 deletions
				
			
		
							
								
								
									
										38
									
								
								lua/myLuaConf/format.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								lua/myLuaConf/format.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,38 @@
 | 
			
		|||
require('lze').load {
 | 
			
		||||
  {
 | 
			
		||||
    "conform.nvim",
 | 
			
		||||
    for_cat = 'format',
 | 
			
		||||
    -- cmd = { "" },
 | 
			
		||||
    -- event = "",
 | 
			
		||||
    -- ft = "",
 | 
			
		||||
    keys = {
 | 
			
		||||
      { "<leader>FF", desc = "[F]ormat [F]ile" },
 | 
			
		||||
    },
 | 
			
		||||
    -- colorscheme = "",
 | 
			
		||||
    after = function (plugin)
 | 
			
		||||
      local conform = require("conform")
 | 
			
		||||
 | 
			
		||||
      conform.setup({
 | 
			
		||||
        formatters_by_ft = {
 | 
			
		||||
          -- NOTE: download some formatters in lspsAndRuntimeDeps
 | 
			
		||||
          -- and configure them here
 | 
			
		||||
          -- lua = { "stylua" },
 | 
			
		||||
          -- go = { "gofmt", "golint" },
 | 
			
		||||
          -- templ = { "templ" },
 | 
			
		||||
          -- Conform will run multiple formatters sequentially
 | 
			
		||||
          -- python = { "isort", "black" },
 | 
			
		||||
          -- Use a sub-list to run only the first available formatter
 | 
			
		||||
          -- javascript = { { "prettierd", "prettier" } },
 | 
			
		||||
        },
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      vim.keymap.set({ "n", "v" }, "<leader>FF", function()
 | 
			
		||||
        conform.format({
 | 
			
		||||
          lsp_fallback = true,
 | 
			
		||||
          async = false,
 | 
			
		||||
          timeout_ms = 1000,
 | 
			
		||||
        })
 | 
			
		||||
      end, { desc = "[F]ormat [F]ile" })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue