Skip to content

Commit 6f0b05b

Browse files
committed
feat: apply personal configurations and plugins
1 parent 891bdd8 commit 6f0b05b

21 files changed

+656
-109
lines changed

dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
rm -rf ~/.config/nvim
4+
rm -rf ~/.local/share/nvim
5+
ln -s $(pwd) ~/.config/nvim

init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

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

9696
-- [[ Setting options ]]
9797
require 'options'

lua/custom/plugins/cloak.lua

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
return {
2+
'laytan/cloak.nvim',
3+
config = function()
4+
require('cloak').setup {
5+
enabled = true,
6+
cloak_character = '*',
7+
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
8+
highlight_group = 'Comment',
9+
patterns = {
10+
{
11+
-- Match any file starting with '.env'.
12+
-- This can be a table to match multiple file patterns.
13+
file_pattern = {
14+
'.env*',
15+
'wrangler.toml',
16+
'.dev.vars',
17+
},
18+
-- Match an equals sign and any character after it.
19+
-- This can also be a table of patterns to cloak,
20+
-- example: cloak_pattern = { ':.+', '-.+' } for yaml files.
21+
cloak_pattern = '=.+',
22+
},
23+
},
24+
}
25+
end,
26+
}

lua/custom/plugins/colors.lua

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
function ColorMyPencils(color)
2+
color = color or 'gruvbox'
3+
vim.cmd.colorscheme(color)
4+
5+
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
6+
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
7+
end
8+
9+
return {
10+
'ellisonleao/gruvbox.nvim',
11+
name = 'gruvbox',
12+
config = function()
13+
require('gruvbox').setup {
14+
terminal_colors = true, -- add neovim terminal colors
15+
undercurl = true,
16+
underline = false,
17+
bold = true,
18+
italic = {
19+
strings = false,
20+
emphasis = false,
21+
comments = false,
22+
operators = false,
23+
folds = false,
24+
},
25+
strikethrough = true,
26+
invert_selection = false,
27+
invert_signs = false,
28+
invert_tabline = false,
29+
invert_intend_guides = false,
30+
inverse = true, -- invert background for search, diffs, statuslines and errors
31+
contrast = '', -- can be "hard", "soft" or empty string
32+
palette_overrides = {},
33+
overrides = {},
34+
dim_inactive = false,
35+
transparent_mode = false,
36+
}
37+
ColorMyPencils()
38+
end,
39+
}

lua/custom/plugins/copilot.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
return {
2+
'zbirenbaum/copilot.lua',
3+
cmd = 'Copilot',
4+
event = 'InsertEnter',
5+
config = function()
6+
require('copilot').setup {
7+
suggestion = {
8+
enabled = true,
9+
auto_trigger = false,
10+
hide_during_completion = false,
11+
debounce = 25,
12+
keymap = {
13+
accept = false,
14+
accept_word = false,
15+
accept_line = '<Tab>',
16+
next = false,
17+
prev = false,
18+
dismiss = false,
19+
},
20+
},
21+
}
22+
end,
23+
}

lua/custom/plugins/fugitive.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
return {
2+
'tpope/vim-fugitive',
3+
config = function()
4+
vim.keymap.set('n', '<leader>gs', vim.cmd.Git, { desc = '[G]it [S]tatus' })
5+
6+
local thedondope_fugitive = vim.api.nvim_create_augroup('thedondope-fugitive', {})
7+
8+
local autocmd = vim.api.nvim_create_autocmd
9+
autocmd('BufWinEnter', {
10+
group = thedondope_fugitive,
11+
pattern = '*',
12+
callback = function()
13+
if vim.bo.ft ~= 'fugitive' then
14+
return
15+
end
16+
17+
local bufnr = vim.api.nvim_get_current_buf()
18+
vim.keymap.set('n', '<leader>p', function()
19+
vim.cmd.Git 'push'
20+
end, { buffer = bufnr, remap = false, desc = 'Git: Push HEAD to remote' })
21+
22+
-- rebase always
23+
vim.keymap.set('n', '<leader>P', function()
24+
vim.cmd.Git { 'pull', '--rebase' }
25+
end, { buffer = bufnr, remap = false, desc = 'Git: Pull from remote' })
26+
27+
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
28+
-- needed if i did not set the branch up correctly
29+
vim.keymap.set('n', '<leader>t', ':Git push -u origin ', { desc = 'Git: Push current branch to remote' })
30+
end,
31+
})
32+
33+
vim.keymap.set('n', 'gu', '<cmd>diffget //2<CR>', { desc = 'Git: Diff: Get changes from left' })
34+
vim.keymap.set('n', 'gh', '<cmd>diffget //3<CR>', { desc = 'Git: Diff: Get changes from right' })
35+
end,
36+
}

lua/custom/plugins/harpoon.lua

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
return {
2+
'ThePrimeagen/harpoon',
3+
branch = 'harpoon2',
4+
dependencies = { 'nvim-lua/plenary.nvim' },
5+
config = function()
6+
local harpoon = require 'harpoon'
7+
8+
harpoon:setup()
9+
10+
vim.keymap.set('n', '<leader>a', function()
11+
harpoon:list():add()
12+
end, { desc = 'Harpoon: [A]dd file to list' })
13+
vim.keymap.set('n', '<C-e>', function()
14+
harpoon.ui:toggle_quick_menu(harpoon:list())
15+
end, { desc = 'Harpoon: Toggl[e] quick menu' })
16+
17+
-- NOTE: Disabled due to unused yet
18+
-- vim.keymap.set('n', '<C-h>', function() harpoon:list():select(1) end, { desc = 'Harpoon: Go to mark 1' })
19+
-- vim.keymap.set('n', '<C-t>', function() harpoon:list():select(2) end, { desc = 'Harpoon: Go to mark 2' })
20+
-- vim.keymap.set('n', '<C-n>', function() harpoon:list():select(3) end, { desc = 'Harpoon: Go to mark 3' })
21+
-- vim.keymap.set('n', '<C-s>', function() harpoon:list():select(4) end, { desc = 'Harpoon: Go to mark 4' })
22+
23+
-- Toggle previous & next buffers stored within Harpoon list
24+
-- NOTE: Disabled due to conflicts with windows terminal keybinds
25+
-- vim.keymap.set('n', '<C-S-P>', function() harpoon:list():prev() end
26+
-- vim.keymap.set('n', '<C-S-N>', function() harpoon:list():next() end)
27+
end,
28+
}

lua/custom/plugins/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
-- I promise not to create any merge conflicts in this directory :)
33
--
44
-- See the kickstart.nvim README for more information
5-
return {}
5+
return {
6+
'eandrju/cellular-automaton.nvim',
7+
}

lua/custom/plugins/trouble.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
return {
2+
'folke/trouble.nvim',
3+
config = function()
4+
require('trouble').setup {
5+
icons = false,
6+
}
7+
8+
vim.keymap.set('n', '<leader>tt', function()
9+
require('trouble').toggle()
10+
end, { desc = '[T]rouble: [T]oggle list' })
11+
12+
vim.keymap.set('n', '[t', function()
13+
require('trouble').next { skip_groups = true, jump = true }
14+
end, { desc = '[T]rouble: Next item' })
15+
16+
vim.keymap.set('n', ']t', function()
17+
require('trouble').previous { skip_groups = true, jump = true }
18+
end, { desc = '[T]rouble: Previos item' })
19+
end,
20+
}

lua/custom/plugins/undotree.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
return {
2+
'mbbill/undotree',
3+
config = function()
4+
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle, { desc = '[U]ndotree: Toggle view' })
5+
end,
6+
}

0 commit comments

Comments
 (0)