mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-05 02:09:49 -05:00
qol changes to formatters/keymaps
This commit is contained in:
parent
e54bd1fe69
commit
f0b0787c91
7 changed files with 24 additions and 21 deletions
|
|
@ -4,6 +4,7 @@ require('conform').setup {
|
|||
nix = { 'alejandra' },
|
||||
rust = { 'rustfmt' },
|
||||
typescript = { 'prettierd' },
|
||||
|
||||
-- Conform will run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
-- You can customize some of the format options for the filetype (:help conform.format)
|
||||
|
|
@ -11,9 +12,14 @@ require('conform').setup {
|
|||
-- Conform will run the first available formatter
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = 'fallback',
|
||||
},
|
||||
format_on_save = nil,
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_format = 'fallback',
|
||||
-- },
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<space>f', function()
|
||||
require('conform').format { async = true }
|
||||
end, { desc = '[f]ormat buffer' })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue