diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-31 21:02:21 +0200 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-03-31 21:02:21 +0200 |
commit | 2cd884a025584cd48e93390a037b3009d96dad5c (patch) | |
tree | 2e82295cb926534e17c701d079c981c26f8e6cc5 /lua | |
parent | dc9eb06f47db0baaa82ca88a43383f2de847226c (diff) | |
parent | 1175f6d25a84146fda2eb16236d2a21ae30cc7b1 (diff) |
Merge 'upstream' Add a keymap space-f to format buffer using conform
Diffstat (limited to 'lua')
-rw-r--r-- | lua/kickstart/plugins/conform.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 82c48f5..c1e9534 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -1,6 +1,16 @@ return { { -- Autoformat 'stevearc/conform.nvim', + keys = { + { + '<leader>f', + function() + require('conform').format { async = true, lsp_fallback = true } + end, + mode = '', + desc = '[F]ormat buffer', + }, + }, opts = { notify_on_error = false, format_on_save = function(bufnr) |