From e81cc49ecf088052ca146ab60261ec51c611daa6 Mon Sep 17 00:00:00 2001 From: ZaneFerns360 Date: Sat, 27 Jul 2024 16:59:02 +0530 Subject: [PATCH] conform changes --- init.lua | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/init.lua b/init.lua index 1bdf6765..9a2e64c6 100644 --- a/init.lua +++ b/init.lua @@ -264,7 +264,6 @@ require('lazy').setup({ { 'numToStr/Comment.nvim', opts = {} }, - -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: -- require('gitsigns').setup({ ... }) @@ -305,17 +304,17 @@ require('lazy').setup({ require('which-key').setup() -- Document existing key chains -require('which-key').add { - { 'q', 'confirm q', desc = 'Quit', mode = 'n' }, - { 'w', 'w!', desc = 'Write', mode = 'n' }, - { 'c', group = '[C]ode' }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'i', group = '[I]nformation' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk' }, - { 'tt', 'set relativenumber!', desc = 'Toggle Relative Number', mode = 'n' }, + require('which-key').add { + { 'q', 'confirm q', desc = 'Quit', mode = 'n' }, + { 'w', 'w!', desc = 'Write', mode = 'n' }, + { 'c', group = '[C]ode' }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 's', group = '[S]earch' }, + { 'i', group = '[I]nformation' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk' }, + { 'tt', 'set relativenumber!', desc = 'Toggle Relative Number', mode = 'n' }, } end, }, @@ -738,16 +737,16 @@ require('which-key').add { -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found. - javascript = { { 'prettierd', 'prettier' } }, - typescript = { { 'prettierd', 'prettier' } }, - javascriptreact = { { 'prettierd', 'prettier' } }, - typescriptreact = { { 'prettierd', 'prettier' } }, - css = { { 'prettierd', 'prettier' } }, - scc = { { 'prettierd', 'prettier' } }, - html = { { 'prettierd', 'prettier' } }, - python = { { 'ruff_format' } }, - c = { { 'clang_format' } }, - cpp = { { 'clang_format' } }, + javascript = { 'prettierd', 'prettier', stop_after_first = true }, + typescript = { 'prettierd', 'prettier', stop_after_first = true }, + javascriptreact = { 'prettierd', 'prettier', stop_after_first = true }, + typescriptreact = { 'prettierd', 'prettier', stop_after_first = true }, + css = { 'prettierd', 'prettier', stop_after_first = true }, + scc = { 'prettierd', 'prettier', stop_after_first = true }, + html = { 'prettierd', 'prettier', stop_after_first = true }, + python = { 'ruff_format' }, + c = { 'clang_format' }, + cpp = { 'clang_format' }, }, }, },