From 13c847e1fb9860d1eae5e7a083e950d7f1665ab8 Mon Sep 17 00:00:00 2001 From: Nhan Luu <62146587+nhld@users.noreply.github.com> Date: Tue, 27 Aug 2024 02:32:26 +0700 Subject: [PATCH] chore: ignore stylua formatting for long tables --- init.lua | 54 ++++++++++++------------------------------------------ 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/init.lua b/init.lua index 2513d537..3bbc8928 100644 --- a/init.lua +++ b/init.lua @@ -279,36 +279,16 @@ require('lazy').setup({ -- set icon mappings to true if you have a Nerd Font mappings = vim.g.have_nerd_font, -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table + -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table. + -- The next line prevents stylua from formatting the long `keys` table below (if formatted). + --stylua: ignore keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', + Up = ' ', Down = ' ', Left = ' ', Right = ' ', + C = ' ', M = ' ', D = ' ', S = ' ', CR = ' ', + Esc = ' ', NL = ' ', BS = ' ', Space = ' ', Tab = ' ', + ScrollWheelDown = ' ', ScrollWheelUp = ' ', + F1 = '', F2 = '', F3 = '', F4 = '', F5 = '', F6 = '', + F7 = '', F8 = '', F9 = '', F10 = '', F11 = '', F12 = '', }, -- Document existing key chains @@ -934,20 +914,10 @@ require('lazy').setup({ ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table + --stylua: ignore icons = vim.g.have_nerd_font and {} or { - cmd = '⌘', - config = '🛠', - event = '📅', - ft = '📂', - init = '⚙', - keys = '🗝', - plugin = '🔌', - runtime = '💻', - require = '🌙', - source = '📄', - start = '🚀', - task = '📌', - lazy = '💤 ', + cmd = '⌘', config = '🛠', event = '📅', ft = '📂', init = '⚙', keys = '🗝', plugin = '🔌', + runtime = '💻', require = '🌙', source = '📄', start = '🚀', task = '📌', lazy = '💤 ', }, }, })