Finished the bulk of the config
This commit is contained in:
parent
b0387c6965
commit
d70730791f
@ -1,26 +1,30 @@
|
||||
{
|
||||
"auto-session": { "branch": "main", "commit": "292492ab7af4bd8b9e37e28508bc8ce995722fd5" },
|
||||
"folkeTokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"incline.nvim": { "branch": "main", "commit": "8b54c59bcb23366645ae10edca6edfb9d3a0853e" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mini.comment": { "branch": "main", "commit": "a0c721115faff8d05505c0a12dab410084d9e536" },
|
||||
"mini.files": { "branch": "main", "commit": "fafacfecdd6c5a66bb10d173a749f3c098e84498" },
|
||||
"mini.nvim": { "branch": "main", "commit": "f28cd08c8be826355d64080400fab1764c9693dd" },
|
||||
"mini.nvim": { "branch": "main", "commit": "8c40d95931cbe6138391af9180e59439ed2e69df" },
|
||||
"mini.splitjoin": { "branch": "main", "commit": "9fcd8856efb95a505090c3225726466494076127" },
|
||||
"mini.surround": { "branch": "main", "commit": "d648a5601e1c48f175b07d10eba141da338a0a2a" },
|
||||
"mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "70a9fecaf5aeae70c765d4c51a8038165a91aa06" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "92c9b016d16473dabd2bf3760196cf2d928edacc" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
|
||||
"showkeys": { "branch": "main", "commit": "cb0a50296f11f1e585acffba8c253b9e8afc1f84" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"solarized-osaka.nvim": { "branch": "main", "commit": "f0c2f0ba0bd56108d53c9bfae4bb28ff6c67bbdb" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
@ -30,5 +34,8 @@
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"undotree": { "branch": "master", "commit": "fc28931fbfba66ab75d9af23fe46ffbbb9de6e8c" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
|
||||
}
|
||||
|
||||
@ -4,14 +4,17 @@ vim.cmd("let g:netrw_banner = 0")
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- indentation
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undofile = true -- Keeps ability to undo even after quitting nvim
|
||||
|
||||
|
||||
vim.opt.incsearch = true
|
||||
@ -19,8 +22,22 @@ vim.opt.inccommand = "split"
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
vim.opt.backspace = {"start", "eol", "indent" }
|
||||
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
-- lets you copy text from NVim into others apps.
|
||||
-- vim.opt.clipboard:append("unnamedplus")
|
||||
|
||||
-- highlights the files you search for.
|
||||
vim.opt.hlsearch = true
|
||||
|
||||
|
||||
72
lua/themenacesauce/plugins/gitstuff.lua
Normal file
72
lua/themenacesauce/plugins/gitstuff.lua
Normal file
@ -0,0 +1,72 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
config = function()
|
||||
|
||||
local myFugitive = vim.api.nvim_create_augroup("myFugitive", {})
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
autocmd("BufWinEnter", {
|
||||
group = myFugitive,
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.bo.ft ~= "fugitive" then
|
||||
return
|
||||
end
|
||||
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local opts = {buffer = bufnr, remap = false}
|
||||
|
||||
vim.keymap.set("n", "<leader>P", function()
|
||||
vim.cmd.Git('push')
|
||||
end, opts)
|
||||
|
||||
-- NOTE: rebase always
|
||||
vim.keymap.set("n", "<leader>p", function()
|
||||
vim.cmd.Git({'pull', '--rebase'})
|
||||
end, opts)
|
||||
|
||||
-- NOTE: easy set up branch that wasn't setup properly
|
||||
vim.keymap.set("n", "<leader>t", ":Git push -u origin", opts);
|
||||
end
|
||||
})
|
||||
vim.keymap.set("n", "<leader>gg", vim.cmd.Git)
|
||||
end
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = package.loaded.gitsigns
|
||||
local function map(mode, l, r, desc)
|
||||
vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc})
|
||||
end
|
||||
|
||||
-- Actions
|
||||
map("n", "<leader>gs", gs.stage_hunk, "Stage hunk")
|
||||
map("n", "<leader>gr", gs.reset_hunk, "Reset hunk")
|
||||
map("v", "<leader>gs", function()
|
||||
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, "Stage hunk")
|
||||
map("v", "<leader>gr", function()
|
||||
gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, "Reset hunk")
|
||||
map("n", "<leader>gS", gs.stage_buffer, "Stage buffer") -- stage whole buffer
|
||||
map("n", "<leader>gR", gs.reset_buffer, "Reset buffer") -- unstage whole buffer
|
||||
|
||||
map("n", "<leader>gu", gs.undo_stage_hunk, "Undo stage hunk")
|
||||
map("n", "<leader<gp", gs.preview_hunk, "Preview hunk")
|
||||
|
||||
map("n", "<leader>gbl", function() gs.blame_line({ full = true }) end, "Blame line")
|
||||
map("n", "<leader>gD", function() gs.diffthis("~") end, "Diff this ~")
|
||||
|
||||
-- Navigation
|
||||
map("n", "]h", gs.next_hunk, "Next Hunk")
|
||||
map("n", "[h", gs.prev_hunk, "Prev Hunk")
|
||||
|
||||
map({"o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Gitsigns select hunk")
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
36
lua/themenacesauce/plugins/incline.lua
Normal file
36
lua/themenacesauce/plugins/incline.lua
Normal file
@ -0,0 +1,36 @@
|
||||
return {
|
||||
-- Adding a filename to the Top Right
|
||||
{
|
||||
"b0o/incline.nvim",
|
||||
enabled = true, --change false to disable
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local devicons = require("nvim-web-devicons")
|
||||
local incline = require("incline")
|
||||
|
||||
incline.setup({
|
||||
hide = {
|
||||
only_win = false,
|
||||
},
|
||||
|
||||
render = function(props)
|
||||
local bufname = vim.api.nvim_buf_get_name(props.buf)
|
||||
local filename = vim.fn.fnamemodify(bufname, ":t")
|
||||
if filename == '' then filename = '[No Name]' end
|
||||
|
||||
local ext = vim.fn.fnamemodify(bufname, ":e")
|
||||
local icon, icon_color = devicons.get_icon(filename, ext, { default = true })
|
||||
|
||||
local modified = vim.bo[props.buf].modified
|
||||
|
||||
return {
|
||||
{ " ", icon, " ", guifg = icon_color },
|
||||
{ filename, gui = modified and "bold" or "none" },
|
||||
modified and { " [+]", guifg = "#ff9e64" } or "",
|
||||
" ",
|
||||
}
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
20
lua/themenacesauce/plugins/showkey.lua
Normal file
20
lua/themenacesauce/plugins/showkey.lua
Normal file
@ -0,0 +1,20 @@
|
||||
return {
|
||||
{
|
||||
"nvzone/showkeys",
|
||||
cmd = "ShowkeysToggle",
|
||||
opts = {
|
||||
-- position = "bottom-right",
|
||||
maxkeys = 3,
|
||||
show_count = true,
|
||||
winopts = {
|
||||
focusable = false,
|
||||
relative = "editor",
|
||||
style = "minimal",
|
||||
border = "single",
|
||||
height = 1,
|
||||
row = 1,
|
||||
col = 0,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
6
lua/themenacesauce/plugins/vim-maximizer.lua
Normal file
6
lua/themenacesauce/plugins/vim-maximizer.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"szw/vim-maximizer",
|
||||
keys = {
|
||||
{ "<leader>sm", "<cmd>MaximizeToggle<CR>", desc = "Maximize/minimize a split" },
|
||||
},
|
||||
}
|
||||
42
lua/themenacesauce/plugins/wilder.lua
Normal file
42
lua/themenacesauce/plugins/wilder.lua
Normal file
@ -0,0 +1,42 @@
|
||||
return {
|
||||
"gelguy/wilder.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"romgrk/fzy-lua-native",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local wilder = require("wilder")
|
||||
wilder.setup({ modes = { ":", "/", "?" } })
|
||||
|
||||
-- Define custom highlight groups
|
||||
wilder.set_option(
|
||||
"renderer",
|
||||
wilder.popupmenu_renderer(wilder.popupmenu_border_theme({
|
||||
min_width = "20%", -- minimum height of the popupmenu, can also be a number
|
||||
max_height = "15%", -- to set a fixed height, set max_height to the same value
|
||||
reverse = 0, -- if 1, shows the candidates from bottom to top
|
||||
highlighter = {
|
||||
wilder.lua_pcre2_highlighter(), -- Requires luarocks install pcre2
|
||||
wilder.lua_fzy_highlighter(), -- Requires fzy-lua-native
|
||||
},
|
||||
highlights = {
|
||||
default = wilder.make_hl(
|
||||
"WilderPopupMenu",
|
||||
"Pmenu",
|
||||
{ {a = 1}, {a = 1}, { background = "#1E212B" } } -- Adjust background color
|
||||
),
|
||||
accent = wilder.make_hl(
|
||||
"WilderAccent",
|
||||
"Pmenu",
|
||||
{ { a = 1}, { a = 1}, { foreground = "#58FFD6", background = "#1e1e2e" } }
|
||||
),
|
||||
},
|
||||
-- 'single', 'double', 'rounded', or 'solid'
|
||||
-- can also be a list of 8 characters, see :h wilder#popupmenu_border_theme() for more details
|
||||
border = "single",
|
||||
}))
|
||||
)
|
||||
end,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user