Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
ln -s $(pwd) ~/.config/nvim
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true

-- [[ Setting options ]]
require 'options'
Expand Down
26 changes: 26 additions & 0 deletions lua/custom/plugins/cloak.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
return {
'laytan/cloak.nvim',
config = function()
require('cloak').setup {
enabled = true,
cloak_character = '*',
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
highlight_group = 'Comment',
patterns = {
{
-- Match any file starting with '.env'.
-- This can be a table to match multiple file patterns.
file_pattern = {
'.env*',
'wrangler.toml',
'.dev.vars',
},
-- Match an equals sign and any character after it.
-- This can also be a table of patterns to cloak,
-- example: cloak_pattern = { ':.+', '-.+' } for yaml files.
cloak_pattern = '=.+',
},
},
}
end,
}
39 changes: 39 additions & 0 deletions lua/custom/plugins/colors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
function ColorMyPencils(color)
color = color or 'gruvbox'
vim.cmd.colorscheme(color)

vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
end

return {
'ellisonleao/gruvbox.nvim',
name = 'gruvbox',
config = function()
require('gruvbox').setup {
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = false,
bold = true,
italic = {
strings = false,
emphasis = false,
comments = false,
operators = false,
folds = false,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = '', -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = false,
}
ColorMyPencils()
end,
}
23 changes: 23 additions & 0 deletions lua/custom/plugins/copilot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
return {
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
config = function()
require('copilot').setup {
suggestion = {
enabled = true,
auto_trigger = false,
hide_during_completion = false,
debounce = 25,
keymap = {
accept = false,
accept_word = false,
accept_line = '<Tab>',
next = false,
prev = false,
dismiss = false,
},
},
}
end,
}
36 changes: 36 additions & 0 deletions lua/custom/plugins/fugitive.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {
'tpope/vim-fugitive',
config = function()
vim.keymap.set('n', '<leader>gs', vim.cmd.Git, { desc = '[G]it [S]tatus' })

local thedondope_fugitive = vim.api.nvim_create_augroup('thedondope-fugitive', {})

local autocmd = vim.api.nvim_create_autocmd
autocmd('BufWinEnter', {
group = thedondope_fugitive,
pattern = '*',
callback = function()
if vim.bo.ft ~= 'fugitive' then
return
end

local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set('n', '<leader>p', function()
vim.cmd.Git 'push'
end, { buffer = bufnr, remap = false, desc = 'Git: Push HEAD to remote' })

-- rebase always
vim.keymap.set('n', '<leader>P', function()
vim.cmd.Git { 'pull', '--rebase' }
end, { buffer = bufnr, remap = false, desc = 'Git: Pull from remote' })

-- NOTE: It allows me to easily set the branch i am pushing and any tracking
-- needed if i did not set the branch up correctly
vim.keymap.set('n', '<leader>t', ':Git push -u origin ', { desc = 'Git: Push current branch to remote' })
end,
})

vim.keymap.set('n', 'gu', '<cmd>diffget //2<CR>', { desc = 'Git: Diff: Get changes from left' })
vim.keymap.set('n', 'gh', '<cmd>diffget //3<CR>', { desc = 'Git: Diff: Get changes from right' })
end,
}
28 changes: 28 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'

harpoon:setup()

vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end, { desc = 'Harpoon: [A]dd file to list' })
vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = 'Harpoon: Toggl[e] quick menu' })

-- NOTE: Disabled due to unused yet
-- vim.keymap.set('n', '<C-h>', function() harpoon:list():select(1) end, { desc = 'Harpoon: Go to mark 1' })
-- vim.keymap.set('n', '<C-t>', function() harpoon:list():select(2) end, { desc = 'Harpoon: Go to mark 2' })
-- vim.keymap.set('n', '<C-n>', function() harpoon:list():select(3) end, { desc = 'Harpoon: Go to mark 3' })
-- vim.keymap.set('n', '<C-s>', function() harpoon:list():select(4) end, { desc = 'Harpoon: Go to mark 4' })

-- Toggle previous & next buffers stored within Harpoon list
-- NOTE: Disabled due to conflicts with windows terminal keybinds
-- vim.keymap.set('n', '<C-S-P>', function() harpoon:list():prev() end
-- vim.keymap.set('n', '<C-S-N>', function() harpoon:list():next() end)
end,
}
4 changes: 3 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
'eandrju/cellular-automaton.nvim',
}
20 changes: 20 additions & 0 deletions lua/custom/plugins/trouble.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return {
'folke/trouble.nvim',
config = function()
require('trouble').setup {
icons = false,
}

vim.keymap.set('n', '<leader>tt', function()
require('trouble').toggle()
end, { desc = '[T]rouble: [T]oggle list' })

vim.keymap.set('n', '[t', function()
require('trouble').next { skip_groups = true, jump = true }
end, { desc = '[T]rouble: Next item' })

vim.keymap.set('n', ']t', function()
require('trouble').previous { skip_groups = true, jump = true }
end, { desc = '[T]rouble: Previos item' })
end,
}
6 changes: 6 additions & 0 deletions lua/custom/plugins/undotree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'mbbill/undotree',
config = function()
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle, { desc = '[U]ndotree: Toggle view' })
end,
}
4 changes: 4 additions & 0 deletions lua/custom/plugins/wakatime.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
'wakatime/vim-wakatime',
lazy = false,
}
33 changes: 33 additions & 0 deletions lua/custom/plugins/zenmode.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
return {
'folke/zen-mode.nvim',
config = function()
vim.keymap.set('n', '<leader>zz', function()
require('zen-mode').setup {
window = {
width = 120,
options = {},
},
}
require('zen-mode').toggle()
vim.wo.wrap = false
vim.wo.number = true
vim.wo.rnu = true
ColorMyPencils()
end, { desc = '[Z]en Mode: Toggle (wide, line numbers)' })

vim.keymap.set('n', '<leader>zZ', function()
require('zen-mode').setup {
window = {
width = 80,
options = {},
},
}
require('zen-mode').toggle()
vim.wo.wrap = false
vim.wo.number = false
vim.wo.rnu = false
vim.opt.colorcolumn = '0'
ColorMyPencils()
end, { desc = '[Z]en Mode: Toggle (narrow, no line numbers)' })
end,
}
Loading