From ab0a8b400c50529e72e5dab6bbcc51edfa724c2f Mon Sep 17 00:00:00 2001 From: Vincent Capelle Date: Sun, 10 Nov 2024 14:38:47 -0500 Subject: [PATCH] fix: re-indent existing Lua code to use spaces --- vim/lua/config/general.lua | 4 +- vim/lua/config/lazy.lua | 62 +++++++------- vim/lua/plugins/bullets.lua | 2 +- vim/lua/plugins/csv.lua | 2 +- vim/lua/plugins/easy-align.lua | 18 ++-- vim/lua/plugins/fugitive.lua | 2 +- vim/lua/plugins/gitsigns.lua | 110 ++++++++++++------------- vim/lua/plugins/gutentags.lua | 2 +- vim/lua/plugins/highlight-colors.lua | 20 ++--- vim/lua/plugins/lastplace.lua | 2 +- vim/lua/plugins/nvim-solarized-lua.lua | 16 ++-- vim/lua/plugins/obsession.lua | 2 +- vim/lua/plugins/repeat.lua | 2 +- vim/lua/plugins/rhubarb.lua | 2 +- vim/lua/plugins/sleuth.lua | 2 +- vim/lua/plugins/surround.lua | 2 +- vim/lua/plugins/tcomment.lua | 2 +- vim/lua/plugins/text-objects.lua | 18 ++-- vim/lua/plugins/wordmotion.lua | 12 +-- 19 files changed, 141 insertions(+), 141 deletions(-) diff --git a/vim/lua/config/general.lua b/vim/lua/config/general.lua index 5573312..34f20b5 100644 --- a/vim/lua/config/general.lua +++ b/vim/lua/config/general.lua @@ -6,8 +6,8 @@ -- vim.g.python_indent.closed_paren_align_last_line = v:false vim.g.python_indent = { - open_paren = "shiftwidth()", - closed_paren_align_last_line = false, + open_paren = "shiftwidth()", + closed_paren_align_last_line = false, } -- Fuzzy file finding diff --git a/vim/lua/config/lazy.lua b/vim/lua/config/lazy.lua index 0efd9a0..a4d2201 100644 --- a/vim/lua/config/lazy.lua +++ b/vim/lua/config/lazy.lua @@ -1,40 +1,40 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "--branch=stable", - lazyrepo, - lazypath, - }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--branch=stable", + lazyrepo, + lazypath, + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) -- Setup lazy.nvim require("lazy").setup({ - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "solarized" } }, - -- automatically check for plugin updates - checker = { enabled = true }, - change_detection = { - -- automatically check for config file changes and reload the ui - enabled = true, - notify = false, -- don't get a notification when changes are found - }, + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "solarized" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = false, -- don't get a notification when changes are found + }, }) diff --git a/vim/lua/plugins/bullets.lua b/vim/lua/plugins/bullets.lua index 8599902..d432376 100644 --- a/vim/lua/plugins/bullets.lua +++ b/vim/lua/plugins/bullets.lua @@ -1,3 +1,3 @@ return { - { "bullets-vim/bullets.vim" }, + { "bullets-vim/bullets.vim" }, } diff --git a/vim/lua/plugins/csv.lua b/vim/lua/plugins/csv.lua index f318ded..995aa3f 100644 --- a/vim/lua/plugins/csv.lua +++ b/vim/lua/plugins/csv.lua @@ -1,3 +1,3 @@ return { - { "chrisbra/csv.vim" }, + { "chrisbra/csv.vim" }, } diff --git a/vim/lua/plugins/easy-align.lua b/vim/lua/plugins/easy-align.lua index 78d6456..1925cde 100644 --- a/vim/lua/plugins/easy-align.lua +++ b/vim/lua/plugins/easy-align.lua @@ -1,11 +1,11 @@ return { - { - "junegunn/vim-easy-align", - keys = { - -- Start interactive EasyAlign in visual mode (e.g. vipga) - { "ga", "(EasyAlign)", mode = "x" }, - -- Start interactive EasyAlign for a motion/text object (e.g. gaip) - { "ga", "(EasyAlign)" }, - }, - }, + { + "junegunn/vim-easy-align", + keys = { + -- Start interactive EasyAlign in visual mode (e.g. vipga) + { "ga", "(EasyAlign)", mode = "x" }, + -- Start interactive EasyAlign for a motion/text object (e.g. gaip) + { "ga", "(EasyAlign)" }, + }, + }, } diff --git a/vim/lua/plugins/fugitive.lua b/vim/lua/plugins/fugitive.lua index c0c159d..540c951 100644 --- a/vim/lua/plugins/fugitive.lua +++ b/vim/lua/plugins/fugitive.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-fugitive" }, + { "tpope/vim-fugitive" }, } diff --git a/vim/lua/plugins/gitsigns.lua b/vim/lua/plugins/gitsigns.lua index 3ac3b63..25908f9 100644 --- a/vim/lua/plugins/gitsigns.lua +++ b/vim/lua/plugins/gitsigns.lua @@ -1,62 +1,62 @@ return { - { - "lewis6991/gitsigns.nvim", - lazy = false, - config = function() - require("gitsigns").setup({ - on_attach = function(bufnr) - local gitsigns = require("gitsigns") + { + "lewis6991/gitsigns.nvim", + lazy = false, + config = function() + require("gitsigns").setup({ + on_attach = function(bufnr) + local gitsigns = require("gitsigns") - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end - -- Navigation - map("n", "]c", function() - if vim.wo.diff then - vim.cmd.normal({ "]c", bang = true }) - else - gitsigns.nav_hunk("next") - end - end) + -- Navigation + map("n", "]c", function() + if vim.wo.diff then + vim.cmd.normal({ "]c", bang = true }) + else + gitsigns.nav_hunk("next") + end + end) - map("n", "[c", function() - if vim.wo.diff then - vim.cmd.normal({ "[c", bang = true }) - else - gitsigns.nav_hunk("prev") - end - end) + map("n", "[c", function() + if vim.wo.diff then + vim.cmd.normal({ "[c", bang = true }) + else + gitsigns.nav_hunk("prev") + end + end) - -- Actions - map("n", "hs", gitsigns.stage_hunk) - map("n", "hr", gitsigns.reset_hunk) - map("v", "hs", function() - gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end) - map("v", "hr", function() - gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) - end) - map("n", "hS", gitsigns.stage_buffer) - map("n", "hu", gitsigns.undo_stage_hunk) - map("n", "hR", gitsigns.reset_buffer) - map("n", "hp", gitsigns.preview_hunk) - map("n", "hb", function() - gitsigns.blame_line({ full = true }) - end) - map("n", "tb", gitsigns.toggle_current_line_blame) - map("n", "hd", gitsigns.diffthis) - map("n", "hD", function() - gitsigns.diffthis("~") - end) - map("n", "td", gitsigns.toggle_deleted) + -- Actions + map("n", "hs", gitsigns.stage_hunk) + map("n", "hr", gitsigns.reset_hunk) + map("v", "hs", function() + gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + map("v", "hr", function() + gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end) + map("n", "hS", gitsigns.stage_buffer) + map("n", "hu", gitsigns.undo_stage_hunk) + map("n", "hR", gitsigns.reset_buffer) + map("n", "hp", gitsigns.preview_hunk) + map("n", "hb", function() + gitsigns.blame_line({ full = true }) + end) + map("n", "tb", gitsigns.toggle_current_line_blame) + map("n", "hd", gitsigns.diffthis) + map("n", "hD", function() + gitsigns.diffthis("~") + end) + map("n", "td", gitsigns.toggle_deleted) - -- Text object - map({ "o", "x" }, "ih", ":Gitsigns select_hunk") - end, - }) - end, - }, + -- Text object + map({ "o", "x" }, "ih", ":Gitsigns select_hunk") + end, + }) + end, + }, } diff --git a/vim/lua/plugins/gutentags.lua b/vim/lua/plugins/gutentags.lua index 64ddf65..ca95053 100644 --- a/vim/lua/plugins/gutentags.lua +++ b/vim/lua/plugins/gutentags.lua @@ -1,3 +1,3 @@ return { - { "ludovicchabant/vim-gutentags" }, + { "ludovicchabant/vim-gutentags" }, } diff --git a/vim/lua/plugins/highlight-colors.lua b/vim/lua/plugins/highlight-colors.lua index 2f2cdad..8b968e3 100644 --- a/vim/lua/plugins/highlight-colors.lua +++ b/vim/lua/plugins/highlight-colors.lua @@ -1,12 +1,12 @@ return { - { - "brenoprata10/nvim-highlight-colors", - lazy = false, - config = function() - require("nvim-highlight-colors").setup({ - render = "virtual", - enable_named_colors = false, - }) - end, - }, + { + "brenoprata10/nvim-highlight-colors", + lazy = false, + config = function() + require("nvim-highlight-colors").setup({ + render = "virtual", + enable_named_colors = false, + }) + end, + }, } diff --git a/vim/lua/plugins/lastplace.lua b/vim/lua/plugins/lastplace.lua index 05ab7a0..3f0c567 100644 --- a/vim/lua/plugins/lastplace.lua +++ b/vim/lua/plugins/lastplace.lua @@ -1,3 +1,3 @@ return { - { "farmergreg/vim-lastplace" }, + { "farmergreg/vim-lastplace" }, } diff --git a/vim/lua/plugins/nvim-solarized-lua.lua b/vim/lua/plugins/nvim-solarized-lua.lua index a97dbcd..a1088e8 100644 --- a/vim/lua/plugins/nvim-solarized-lua.lua +++ b/vim/lua/plugins/nvim-solarized-lua.lua @@ -1,10 +1,10 @@ return { - { - "ishan9299/nvim-solarized-lua", - lazy = false, - priority = 1000, - config = function() - vim.cmd([[ colorscheme solarized ]]) - end, - }, + { + "ishan9299/nvim-solarized-lua", + lazy = false, + priority = 1000, + config = function() + vim.cmd([[ colorscheme solarized ]]) + end, + }, } diff --git a/vim/lua/plugins/obsession.lua b/vim/lua/plugins/obsession.lua index 6e0c11f..1c98d58 100644 --- a/vim/lua/plugins/obsession.lua +++ b/vim/lua/plugins/obsession.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-obsession" }, + { "tpope/vim-obsession" }, } diff --git a/vim/lua/plugins/repeat.lua b/vim/lua/plugins/repeat.lua index da5d511..85763bc 100644 --- a/vim/lua/plugins/repeat.lua +++ b/vim/lua/plugins/repeat.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-repeat" }, + { "tpope/vim-repeat" }, } diff --git a/vim/lua/plugins/rhubarb.lua b/vim/lua/plugins/rhubarb.lua index a3d2674..ee0fc5b 100644 --- a/vim/lua/plugins/rhubarb.lua +++ b/vim/lua/plugins/rhubarb.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-rhubarb" }, + { "tpope/vim-rhubarb" }, } diff --git a/vim/lua/plugins/sleuth.lua b/vim/lua/plugins/sleuth.lua index 6c112dd..24a2dba 100644 --- a/vim/lua/plugins/sleuth.lua +++ b/vim/lua/plugins/sleuth.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-sleuth" }, + { "tpope/vim-sleuth" }, } diff --git a/vim/lua/plugins/surround.lua b/vim/lua/plugins/surround.lua index 0a05df2..06e53f0 100644 --- a/vim/lua/plugins/surround.lua +++ b/vim/lua/plugins/surround.lua @@ -1,3 +1,3 @@ return { - { "tpope/vim-surround" }, + { "tpope/vim-surround" }, } diff --git a/vim/lua/plugins/tcomment.lua b/vim/lua/plugins/tcomment.lua index d8bc85c..0efdd61 100644 --- a/vim/lua/plugins/tcomment.lua +++ b/vim/lua/plugins/tcomment.lua @@ -1,3 +1,3 @@ return { - { "tomtom/tcomment_vim" }, + { "tomtom/tcomment_vim" }, } diff --git a/vim/lua/plugins/text-objects.lua b/vim/lua/plugins/text-objects.lua index a3c93e2..6d03239 100644 --- a/vim/lua/plugins/text-objects.lua +++ b/vim/lua/plugins/text-objects.lua @@ -1,11 +1,11 @@ return { - { - "kana/vim-textobj-user", - priority = 100, - }, - { "kana/vim-textobj-line" }, - { "kana/vim-textobj-indent" }, - { "kana/vim-textobj-entire" }, - { "beloglazov/vim-textobj-quotes" }, - { "christoomey/vim-textobj-codeblock" }, + { + "kana/vim-textobj-user", + priority = 100, + }, + { "kana/vim-textobj-line" }, + { "kana/vim-textobj-indent" }, + { "kana/vim-textobj-entire" }, + { "beloglazov/vim-textobj-quotes" }, + { "christoomey/vim-textobj-codeblock" }, } diff --git a/vim/lua/plugins/wordmotion.lua b/vim/lua/plugins/wordmotion.lua index 9419fda..48749cf 100644 --- a/vim/lua/plugins/wordmotion.lua +++ b/vim/lua/plugins/wordmotion.lua @@ -1,8 +1,8 @@ return { - { - "chaoren/vim-wordmotion", - init = function() - vim.g.wordmotion_prefix = "" - end, - }, + { + "chaoren/vim-wordmotion", + init = function() + vim.g.wordmotion_prefix = "" + end, + }, }