Initial commit 🚀
This commit is contained in:
18
nvim/lua/core/colors.lua
Normal file
18
nvim/lua/core/colors.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local status, color = pcall(vim.cmd.colorscheme, "catppuccin")
|
||||
if not status then
|
||||
print(color, 'using murphy instead')
|
||||
vim.cmd.colorscheme("murphy")
|
||||
end
|
||||
|
||||
vim.opt.fillchars:append { eob = " " } -- Gets rid of tilde after line numbers
|
||||
vim.cmd.set("noshowmode") -- Hide mode mode at bottom
|
||||
vim.cmd.set("noruler")
|
||||
|
||||
---------- These are now handled by the transparent nvim plugin --------
|
||||
-- vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "NonText", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "LineNr", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "SignColumn", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "VertSplit", {bg = "none"})
|
||||
-- vim.api.nvim_set_hl(0, "TabLine", {bg = "none"})
|
112
nvim/lua/core/functions.lua
Normal file
112
nvim/lua/core/functions.lua
Normal file
@@ -0,0 +1,112 @@
|
||||
function edit_nvim()
|
||||
vim.cmd(":e $MYVIMRC")
|
||||
vim.cmd(":cd ~/.config/nvim")
|
||||
vim.cmd(":NvimTreeOpen")
|
||||
end
|
||||
|
||||
function randomquote()
|
||||
local quote = {
|
||||
"Bing Chilling",
|
||||
"The Stink Boys",
|
||||
"Whopper Whopper Whopper Whopper Junior Double Triple Whopper",
|
||||
"White Monster",
|
||||
"The system plays us everday...",
|
||||
"sudo systemctl restart justinlime",
|
||||
"sudo systemctl start justinlime",
|
||||
"sudo systemctl stop justinlime",
|
||||
"sudo systemctl enable justinlime",
|
||||
"sudo systemctl disable justinlime",
|
||||
}
|
||||
return quote[math.random(1,#quote)]
|
||||
end
|
||||
|
||||
function randomsplash()
|
||||
local splash = {
|
||||
{
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀⠀ ⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝ ]],
|
||||
[[ ⠀ ⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇ ]],
|
||||
[[ ⠀⠀ ⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏ ⠀]],
|
||||
[[ ⠀ ⠀ ⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀ ⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀ ⠀]],
|
||||
[[ ⠀ ⠀⠀⠀ ⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀ ]],
|
||||
[[ ⠀⠀ ⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀ ⠀]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⣴⣿⣾⣿⣿⣿⡿⡽⡑⢌⠪⡢⡣⣣⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⡟⡾⣿⢿⢿⢵⣽⣾⣼⣘⢸⢸⣞⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ ⠀ ⠀⠀⠀⠁⠇⠡⠩⡫⢿⣝⡻⡮⣒⢽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ]],
|
||||
[[ ⠀ _ _ _ ___ ]],
|
||||
[[ ⠀ | \ | | (_) |__ \ ]],
|
||||
[[ ⠀ | \| | ___ ___ __ __ _ _ __ ___ ) | ]],
|
||||
[[ ⠀ | . ` | / _ \ / _ \\ \ / /| || '_ ` _ \ / / ]],
|
||||
[[ ⠀ | |\ || __/| (_) |\ V / | || | | | | ||_| ]],
|
||||
[[ ⠀ |_| \_| \___| \___/ \_/ |_||_| |_| |_|(_) ]],
|
||||
[[ ⠀ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀ ]],
|
||||
},
|
||||
{
|
||||
[[ ⠀ ]],
|
||||
[[⠀⠀⠀⠀⠀⡰⢂⣾⠿⠛⠒⠚⠛⠃⠺⢶⡀⠀⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⢠⡣⠋⠁⠀⠀⠀⠀⠀⢀⡐⠒⢙⣄⠀⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⡘⠀⠀⠀⠀⠀⠀⢄⠉⠀⠐⠀⠀⠙⢦⠀⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠀⣾⠁⠀⠀⠄⠂⢈⣠⠎⠀⠀⣸⣿⡿⠓⢬⡇⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⢸⡟⠀⠔⣁⣤⣶⣿⠋⢰⠀⠀⣿⡟⠻⣦⠀⢳⠀⠀⠀⠀⠀]],
|
||||
[[⠀⠀⣷⡇⢠⣾⢟⢭⣭⡭⡄⠀⡆⠀⣿⣷⣶⠺⡆⢸⡄⠀⠀⠀⠀]],
|
||||
[[⠀⠀⠇⡇⠛⠡⣑⣈⣛⠝⢁⡀⠇⠀⣿⡿⠛⠒⣡⠇⣧⣀⠀⠀⠀]],
|
||||
[[⠀⠀⢠⠁⠈⠐⠤⠄⠀⣠⢸⠈⠢⠀⣿⡇⠀⠀⠠⠚⣿⣿⠀⠀⠀]],
|
||||
[[⡄⠀⢾⠀⡆⠠⣴⠞⠯⡀⠈⠙⠲⣶⣿⡇⠑⣦⡄⠀⣿⣿⠀⠀⠀]],
|
||||
[[⠈⠺⡮⠀⢡⠀⠀⠀⠀⠀⠁⠐⠒⠒⠛⠃⠈⠛⠇⠀⡏⡏⠀⠀⠀]],
|
||||
[[⠀⢰⠁⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⢷⠀⠀⠀]],
|
||||
[[⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠃⠀⢸⠀⠀⠀]],
|
||||
[[⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀]],
|
||||
[[⠀⠀⢣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠸⡳⡀⠀]],
|
||||
[[⠀⠀⠀⠑⢄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣯⣼⡇⠑⣄]],
|
||||
[[ ]],
|
||||
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
|
||||
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
|
||||
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
|
||||
[[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
|
||||
[[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
|
||||
[[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
|
||||
[[ ⠀ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ⠀ ]],
|
||||
[[ ⠀ ]],
|
||||
},
|
||||
{
|
||||
[[ ]],
|
||||
[[⣿⣿⣿⣿⡏⣀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿]],
|
||||
[[⣿⣿⣿⢏⣴⣿⣷⠀⠀⠀⠀⠀⢾⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿]],
|
||||
[[⣿⣿⣟⣾⣿⡟⠁⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣷⢢⠀⠀⠀⠀⠀⠀⠀⢸⣿]],
|
||||
[[⣿⣿⣿⣿⣟⠀⡴⠄⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⣿]],
|
||||
[[⣿⣿⣿⠟⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⢴⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⣿]],
|
||||
[[⣿⣁⡀⠀⠀⢰⢠⣦⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⡄⠀⣴⣶⣿⡄⣿]],
|
||||
[[⣿⡋⠀⠀⠀⠎⢸⣿⡆⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⠗⢘⣿⣟⠛⠿⣼]],
|
||||
[[⣿⣿⠋⢀⡌⢰⣿⡿⢿⡀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⡇⠀⢸⣿⣿⣧⢀⣼]],
|
||||
[[⣿⣿⣷⢻⠄⠘⠛⠋⠛⠃⠀⠀⠀⠀⠀⢿⣧⠈⠉⠙⠛⠋⠀⠀⠀⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣧⠀⠈⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠟⠀⠀⠀⠀⢀⢃⠀⠀⢸⣿⣿⣿⣿]],
|
||||
[[⣿⣿⡿⠀⠴⢗⣠⣤⣴⡶⠶⠖⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡸⠀⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⡀⢠⣾⣿⠏⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠉⠀⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣧⠈⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⡄⠈⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[⣿⣿⣿⣿⣿⣦⣄⣀⣀⣀⣀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]],
|
||||
[[ __ ]],
|
||||
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
|
||||
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
|
||||
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
|
||||
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
|
||||
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
|
||||
[[ ]],
|
||||
[[______________________________________________________]],
|
||||
[[ ]],
|
||||
[[ ]],
|
||||
},
|
||||
}
|
||||
return splash[math.random(1,#splash)]
|
||||
end
|
93
nvim/lua/core/keymaps.lua
Normal file
93
nvim/lua/core/keymaps.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
local opts = { noremap = true, silent = true }
|
||||
local map = vim.keymap.set
|
||||
|
||||
--Leader Key
|
||||
map("", "<Space>", "<Nop>", opts)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
---------- Normal Mode ----------
|
||||
|
||||
--Window Resize
|
||||
map("n", "<S-h>", ":vertical resize +2<CR>", opts)
|
||||
map("n", "<S-j>", ":resize +2<CR>", opts)
|
||||
map("n", "<S-k>", ":resize -2<CR>", opts)
|
||||
map("n", "<S-l>", ":vertical resize -2<CR>", opts)
|
||||
|
||||
---------- Insert Mode ----------
|
||||
|
||||
--jj gang rise up
|
||||
map("i", "jj", "<ESC>", opts)
|
||||
|
||||
---------- Visual Mode -----------
|
||||
|
||||
--Move Selections
|
||||
map("v", "<S-h>", "< gv", opts)
|
||||
map("v", "<S-j>", ":m '>+1<CR>gv=gv", opts)
|
||||
map("v", "<S-k>", ":m '<-2<CR>gv=gv", opts)
|
||||
map("v", "<S-l>", "> gv", opts)
|
||||
|
||||
---------- Terminal Mode ----------
|
||||
|
||||
--Escape Terminal
|
||||
map('t', 'jj', [[<C-\><C-n>]], opts)
|
||||
map('t', '<C-[>', [[<C-\><C-n>]], opts)
|
||||
map('t', '<esc>', [[<C-\><C-n>]], opts)
|
||||
|
||||
--------- Custom Functions ----------
|
||||
|
||||
--Edit Nvim
|
||||
map("n", "<leader>en", ":lua edit_nvim()<CR>", opts)
|
||||
|
||||
---------- Plugins ----------------
|
||||
|
||||
--Fugative
|
||||
map("n", "<leader>ga", ":G add<Space>", opts)
|
||||
map("n", "<leader>gs", ":G status<CR>", opts)
|
||||
map("n", "<leader>gb", ":G branch<Space>", opts)
|
||||
map("n", "<leader>gm", ":G merge<Space>", opts)
|
||||
map("n", "<leader>gpl", ":G pull<Space>", opts)
|
||||
map("n", "<leader>gplo", ":G pull origin<Space>", opts)
|
||||
map("n", "<leader>gps", ":G push<Space>", opts)
|
||||
map("n", "<leader>gpso", ":G push origin<Space>", opts)
|
||||
map("n", "<leader>gc", ":G commit<Space>", opts)
|
||||
map("n", "<leader>gcm", ":G commit -m<Space>", opts)
|
||||
map("n", "<leader>gch", ":G checkout<Space>", opts)
|
||||
map("n", "<leader>gchb", ":G checkout -b<Space>", opts)
|
||||
map("n", "<leader>gcoe", ":G config user.email<Space>", opts)
|
||||
map("n", "<leader>gcon", ":G config user.name<Space>", opts)
|
||||
|
||||
--Nvim Tree
|
||||
map("n", "<leader>dt", ":NvimTreeToggle<CR>", opts)
|
||||
|
||||
--Transparency
|
||||
map("n", "<leader>tt", ":TransparentToggle<CR>", opts)
|
||||
|
||||
--Telescope
|
||||
map('n', '<leader>ff', ":Telescope find_files<CR>", opts)
|
||||
map('n', '<leader>fw', ":Telescope live_grep<CR>", opts)
|
||||
map('n', '<leader>fgc', ":Telescope git_commits<CR>", opts)
|
||||
map('n', '<leader>fgs', ":Telescope git_stash<CR>", opts)
|
||||
map('n', '<leader>fgb', ":Telescope git_branches<CR>", opts)
|
||||
map('n', '<leader>fv', ":Telescope treesitter<CR>", opts)
|
||||
map('n', '<leader>fs', ":Telescope spell_suggest<CR>", opts)
|
||||
map('n', '<leader>fc', ":Telescope colorscheme<CR>", opts)
|
||||
|
||||
--BufferLine
|
||||
map("n", "<leader>1", ":BufferLineGoToBuffer 1<CR>", opts)
|
||||
map("n", "<leader>2", ":BufferLineGoToBuffer 2<CR>", opts)
|
||||
map("n", "<leader>3", ":BufferLineGoToBuffer 3<CR>", opts)
|
||||
map("n", "<leader>4", ":BufferLineGoToBuffer 4<CR>", opts)
|
||||
map("n", "<leader>5", ":BufferLineGoToBuffer 5<CR>", opts)
|
||||
map("n", "<leader>6", ":BufferLineGoToBuffer 6<CR>", opts)
|
||||
map("n", "<leader>7", ":BufferLineGoToBuffer 7<CR>", opts)
|
||||
map("n", "<leader>8", ":BufferLineGoToBuffer 8<CR>", opts)
|
||||
map("n", "<leader>9", ":BufferLineGoToBuffer 9<CR>", opts)
|
||||
|
||||
map("n", "<leader>h", ":BufferLineCyclePrev<CR>", opts)
|
||||
map("n", "<leader>l", ":BufferLineCycleNext<CR>", opts)
|
||||
|
||||
map("n", "<leader><S-h>", ":BufferLineMovePrev<CR>", opts)
|
||||
map("n", "<leader><S-l>", ":BufferLineMoveNext<CR>", opts)
|
||||
|
||||
map("n", "<leader>qq", ":bdelete<CR>", opts) -- Close current buffer
|
33
nvim/lua/core/options.lua
Normal file
33
nvim/lua/core/options.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
local opt = vim.opt
|
||||
opt.clipboard = "unnamedplus"
|
||||
opt.guicursor = "a:blinkon0" --Disable cursor blink
|
||||
opt.guicursor = "i:ver25-iCursor" --Change to beam cursor when in insert mode
|
||||
opt.mouse = "a"
|
||||
opt.smartcase = true
|
||||
opt.smartindent = true
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.cursorline = false
|
||||
opt.cursorlineopt='number'
|
||||
opt.wrap = false
|
||||
opt.shiftwidth = 4
|
||||
opt.softtabstop = 4
|
||||
opt.tabstop = 4
|
||||
opt.backupdir = vim.fn.expand("~/.local/share/nvim/data/backup")
|
||||
opt.undodir = vim.fn.expand("~/.local/share/nvim/data/undo")
|
||||
opt.directory = vim.fn.expand("~/.local/share/nvim/data/swap")
|
||||
opt.ignorecase = true
|
||||
opt.splitbelow = true
|
||||
opt.splitright = true
|
||||
opt.swapfile = false
|
||||
opt.undofile = true
|
||||
opt.backup = false
|
||||
opt.expandtab = true
|
||||
opt.termguicolors = true
|
||||
opt.scrolloff = 8
|
||||
opt.updatetime = 50
|
||||
opt.cursorline = true
|
||||
vim.api.nvim_create_autocmd("FileType", { --Set indentation to 2 spaces for nix files
|
||||
pattern = "nix",
|
||||
command = "setlocal shiftwidth=2 tabstop=2"
|
||||
})
|
Reference in New Issue
Block a user