Revert "just formatting"
This reverts commit 18e5475a9edec2d4c4f3ce994cac4bfd04df0172.
This commit is contained in:
parent
c0474f5c11
commit
3d1eeaa62c
4 changed files with 153 additions and 179 deletions
|
|
@ -1,40 +1,40 @@
|
|||
-- Formatter configuration
|
||||
|
||||
return {
|
||||
-- ========================================
|
||||
-- Formatter Configuration (conform.nvim)
|
||||
-- ========================================
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
event = 'BufWritePre', -- Format on save
|
||||
-- cmd = { 'ConformInfo' }, -- Optional: If you want the command available
|
||||
-- keys = { ... } -- Optional: Define keys if needed
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang_format' },
|
||||
cpp = { 'clang_format' },
|
||||
-- Use ruff for Python formatting (includes isort and is faster than black
|
||||
-- Ensure 'ruff' is installed via Home Manager (pkgs.ruff)
|
||||
python = { 'ruff_format', 'ruff_fix' },
|
||||
-- python = { 'isort', 'black' },
|
||||
nix = { 'alejandra' }, -- Add nix formatter
|
||||
-- Add other filetypes and formatters, e.g.:
|
||||
-- javascript = { "prettier" },
|
||||
-- typescript = { "prettier" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
-- json = { "prettier" },
|
||||
-- yaml = { "prettier" },
|
||||
-- markdown = { "prettier" },
|
||||
-- bash = { "shfmt" },
|
||||
},
|
||||
-- Configure format_on_save behavior
|
||||
format_on_save = {
|
||||
-- I recommend these options, but adjust to your liking
|
||||
timeout_ms = 500, -- Stop formatting if it takes too long
|
||||
lsp_fallback = true, -- Fallback to LSP formatting if conform fails
|
||||
},
|
||||
-- ========================================
|
||||
-- Formatter Configuration (conform.nvim)
|
||||
-- ========================================
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
event = 'BufWritePre', -- Format on save
|
||||
-- cmd = { 'ConformInfo' }, -- Optional: If you want the command available
|
||||
-- keys = { ... } -- Optional: Define keys if needed
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang_format' },
|
||||
cpp = { 'clang_format' },
|
||||
-- Use ruff for Python formatting (includes isort and is faster than black
|
||||
-- Ensure 'ruff' is installed via Home Manager (pkgs.ruff)
|
||||
python = { 'ruff_format', 'ruff_fix' },
|
||||
-- python = { 'isort', 'black' },
|
||||
nix = { 'alejandra' }, -- Add nix formatter
|
||||
-- Add other filetypes and formatters, e.g.:
|
||||
-- javascript = { "prettier" },
|
||||
-- typescript = { "prettier" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
-- json = { "prettier" },
|
||||
-- yaml = { "prettier" },
|
||||
-- markdown = { "prettier" },
|
||||
-- bash = { "shfmt" },
|
||||
},
|
||||
-- Configure format_on_save behavior
|
||||
format_on_save = {
|
||||
-- I recommend these options, but adjust to your liking
|
||||
timeout_ms = 500, -- Stop formatting if it takes too long
|
||||
lsp_fallback = true, -- Fallback to LSP formatting if conform fails
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue