Skip to content

Commit

Permalink
fix: re-indent existing Lua code to use spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vicnett committed Nov 10, 2024
1 parent a3fa9f8 commit ab0a8b4
Show file tree
Hide file tree
Showing 19 changed files with 141 additions and 141 deletions.
4 changes: 2 additions & 2 deletions vim/lua/config/general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
62 changes: 31 additions & 31 deletions vim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
@@ -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
},
})
2 changes: 1 addition & 1 deletion vim/lua/plugins/bullets.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "bullets-vim/bullets.vim" },
{ "bullets-vim/bullets.vim" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/csv.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "chrisbra/csv.vim" },
{ "chrisbra/csv.vim" },
}
18 changes: 9 additions & 9 deletions vim/lua/plugins/easy-align.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
return {
{
"junegunn/vim-easy-align",
keys = {
-- Start interactive EasyAlign in visual mode (e.g. vipga)
{ "ga", "<Plug>(EasyAlign)", mode = "x" },
-- Start interactive EasyAlign for a motion/text object (e.g. gaip)
{ "ga", "<Plug>(EasyAlign)" },
},
},
{
"junegunn/vim-easy-align",
keys = {
-- Start interactive EasyAlign in visual mode (e.g. vipga)
{ "ga", "<Plug>(EasyAlign)", mode = "x" },
-- Start interactive EasyAlign for a motion/text object (e.g. gaip)
{ "ga", "<Plug>(EasyAlign)" },
},
},
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/fugitive.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-fugitive" },
{ "tpope/vim-fugitive" },
}
110 changes: 55 additions & 55 deletions vim/lua/plugins/gitsigns.lua
Original file line number Diff line number Diff line change
@@ -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", "<leader>hs", gitsigns.stage_hunk)
map("n", "<leader>hr", gitsigns.reset_hunk)
map("v", "<leader>hs", function()
gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end)
map("v", "<leader>hr", function()
gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
end)
map("n", "<leader>hS", gitsigns.stage_buffer)
map("n", "<leader>hu", gitsigns.undo_stage_hunk)
map("n", "<leader>hR", gitsigns.reset_buffer)
map("n", "<leader>hp", gitsigns.preview_hunk)
map("n", "<leader>hb", function()
gitsigns.blame_line({ full = true })
end)
map("n", "<leader>tb", gitsigns.toggle_current_line_blame)
map("n", "<leader>hd", gitsigns.diffthis)
map("n", "<leader>hD", function()
gitsigns.diffthis("~")
end)
map("n", "<leader>td", gitsigns.toggle_deleted)
-- Actions
map("n", "<leader>hs", gitsigns.stage_hunk)
map("n", "<leader>hr", gitsigns.reset_hunk)
map("v", "<leader>hs", function()
gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end)
map("v", "<leader>hr", function()
gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
end)
map("n", "<leader>hS", gitsigns.stage_buffer)
map("n", "<leader>hu", gitsigns.undo_stage_hunk)
map("n", "<leader>hR", gitsigns.reset_buffer)
map("n", "<leader>hp", gitsigns.preview_hunk)
map("n", "<leader>hb", function()
gitsigns.blame_line({ full = true })
end)
map("n", "<leader>tb", gitsigns.toggle_current_line_blame)
map("n", "<leader>hd", gitsigns.diffthis)
map("n", "<leader>hD", function()
gitsigns.diffthis("~")
end)
map("n", "<leader>td", gitsigns.toggle_deleted)

-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
})
end,
},
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")
end,
})
end,
},
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/gutentags.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "ludovicchabant/vim-gutentags" },
{ "ludovicchabant/vim-gutentags" },
}
20 changes: 10 additions & 10 deletions vim/lua/plugins/highlight-colors.lua
Original file line number Diff line number Diff line change
@@ -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,
},
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/lastplace.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "farmergreg/vim-lastplace" },
{ "farmergreg/vim-lastplace" },
}
16 changes: 8 additions & 8 deletions vim/lua/plugins/nvim-solarized-lua.lua
Original file line number Diff line number Diff line change
@@ -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,
},
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/obsession.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-obsession" },
{ "tpope/vim-obsession" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/repeat.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-repeat" },
{ "tpope/vim-repeat" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/rhubarb.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-rhubarb" },
{ "tpope/vim-rhubarb" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/sleuth.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-sleuth" },
{ "tpope/vim-sleuth" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/surround.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tpope/vim-surround" },
{ "tpope/vim-surround" },
}
2 changes: 1 addition & 1 deletion vim/lua/plugins/tcomment.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
{ "tomtom/tcomment_vim" },
{ "tomtom/tcomment_vim" },
}
18 changes: 9 additions & 9 deletions vim/lua/plugins/text-objects.lua
Original file line number Diff line number Diff line change
@@ -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" },
}
12 changes: 6 additions & 6 deletions vim/lua/plugins/wordmotion.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
return {
{
"chaoren/vim-wordmotion",
init = function()
vim.g.wordmotion_prefix = "<leader>"
end,
},
{
"chaoren/vim-wordmotion",
init = function()
vim.g.wordmotion_prefix = "<leader>"
end,
},
}

0 comments on commit ab0a8b4

Please sign in to comment.