Skip to content
Open
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
1,332 changes: 796 additions & 536 deletions init.lua

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" },
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
"better-ts-errors.nvim": { "branch": "main", "commit": "d57a7794b271e1a0010d0328e5d3f18e20f1face" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "1a7ff54dcfbe1af139b11829c6d58f5ffab87707" },
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "7b4d5d48b6b5a75009d63f8f3e4ef4819b7e8139" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"no-neck-pain.nvim": { "branch": "main", "commit": "c7efdbd0b739646c58d22fa44f6fffa2973f303e" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-dap": { "branch": "master", "commit": "8517126e9323e346f6a99b3b594c5a940b914dcd" },
"nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" },
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
"nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-treesitter": { "branch": "master", "commit": "e1e3108cd23d7f967842261bd66126b6734d8907" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"oil.nvim": { "branch": "master", "commit": "8735d185b37457bd899cd4e47a4517b899407949" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"toggleterm.nvim": { "branch": "main", "commit": "022ff5594acccc8d90d2e46dc43994f7722ebdf7" },
"tokyonight.nvim": { "branch": "main", "commit": "ce91ba480070c95f40753e4663e32b4632ac6db3" },
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
}
55 changes: 55 additions & 0 deletions lua/custom/other/autocomand.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
vim.filetype.add {
pattern = {
['Podfile'] = 'ruby',
['Appfile'] = 'ruby',
['Matchfile'] = 'ruby',
['Pluginfile'] = 'ruby',
['Fastfile'] = 'ruby',
['.podspec'] = 'ruby',
},
}
vim.filetype.add {
pattern = {
['Podfile'] = 'ruby',
['Appfile'] = 'ruby',
['Matchfile'] = 'ruby',
['Pluginfile'] = 'ruby',
['Fastfile'] = 'ruby',
},
}
vim.filetype.add {
pattern = {
['Podfile'] = 'ruby',
['Appfile'] = 'ruby',
['Matchfile'] = 'ruby',
['Pluginfile'] = 'ruby',
['Fastfile'] = 'ruby',
},
}

vim.keymap.set('n', '<leader>bd', function()
local bufs = vim.api.nvim_list_bufs()
local current_buf = vim.api.nvim_get_current_buf()
for _, i in ipairs(bufs) do
if i ~= current_buf then
vim.api.nvim_buf_delete(i, {})
end
end
end, { desc = 'Delete all buffers but the one that is focused' })

-- oil fix copilot
vim.api.nvim_create_augroup('OilRelPathFix', {})
vim.api.nvim_create_autocmd('BufEnter', {
group = 'OilRelPathFix',
pattern = 'oil:///*',
callback = function()
vim.cmd 'Copilot disable'
end,
})
vim.api.nvim_create_autocmd('BufLeave', {
group = 'OilRelPathFix',
pattern = 'oil:///*',
callback = function()
vim.cmd 'Copilot enable'
end,
})
40 changes: 40 additions & 0 deletions lua/custom/plugins/alpha.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
return {
"goolord/alpha-nvim",
event = "VimEnter",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require 'alpha'.setup(require 'alpha.themes.startify'.config)
-- require 'alpha'.setup(require 'alpha.themes.dashboard'.config)

-- local alpha = require("alpha")
-- local dashboard = require("alpha.themes.dashboard")

-- -- Set header
-- dashboard.section.header.val = {
-- " ",
-- " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
-- " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
-- " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
-- " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
-- " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
-- " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
-- " ",
-- }
--
-- -- Set menu
-- dashboard.section.buttons.val = {
-- dashboard.button("e", " > New File", "<cmd>ene<CR>"),
-- dashboard.button("SPC ee", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
-- dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
-- dashboard.button("SPC fs", " > Find Word", "<cmd>Telescope live_grep<CR>"),
-- dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "<cmd>SessionRestore<CR>"),
-- dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
-- }
--
-- -- Send config to alpha
-- alpha.setup(dashboard.opts)
--
-- -- Disable folding on alpha buffer
-- vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])
end,
}
4 changes: 4 additions & 0 deletions lua/custom/plugins/auto-tag.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
'windwp/nvim-ts-autotag',
lazy = false,
}
22 changes: 22 additions & 0 deletions lua/custom/plugins/comment.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc.
--
-- Use `opts = {}` to force a plugin to be loaded.
--
-- This is equivalent to:
-- require('Comment').setup({})

-- "gc" to comment visual regions/lines
return {
'numToStr/Comment.nvim',
dependencies = {
'JoosepAlviste/nvim-ts-context-commentstring',
},
config = function()
require('Comment').setup {
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
}
end,
lazy = false,
}
18 changes: 18 additions & 0 deletions lua/custom/plugins/copilot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
return {
'zbirenbaum/copilot.lua',
event = 'InsertEnter',
cmd = 'Copilot',
opts = {
suggestion = {
auto_trigger = true,
keymap = {
accept = '<c-y>',
accept_line = '<M-l>',
accept_word = '<M-k>',
next = '<M-]>',
prev = '<M-[>',
dismiss = '<M-c>',
},
},
},
}
37 changes: 37 additions & 0 deletions lua/custom/plugins/formatting.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
return {
'stevearc/conform.nvim',
event = { 'BufReadPre', 'BufNewFile' },
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
}
end,
formatters_by_ft = {
javascript = { 'prettier' },
typescript = { 'prettier' },
javascriptreact = { 'prettier' },
typescriptreact = { 'prettier' },
svelte = { 'prettier' },
css = { 'prettier' },
html = { 'prettier' },
json = { 'prettier' },
yaml = { 'prettier' },
markdown = { 'prettier' },
graphal = { 'prettier' },
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
},
},
}
17 changes: 17 additions & 0 deletions lua/custom/plugins/gitsigns.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
-- require('gitsigns').setup({ ... })
--
-- See `:help gitsigns` to understand what the configuration keys do
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '‾' },
changedelete = { text = '~' },
},
},
}
70 changes: 70 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'

-- REQUIRED
harpoon:setup {

settings = {
save_on_toggle = true,
},
}
-- REQUIRED

vim.keymap.set('n', '<leader>a', function()
harpoon:list():append()
end, { desc = 'Add current file to harpoon list' })

vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)

vim.keymap.set('n', '<C-x>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-c>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<S-x>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<S-c>', function()
harpoon:list():select(4)
end)

-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-m>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-v>', function()
harpoon:list():next()
end)

-- -- basic telescope configuration
-- local conf = require('telescope.config').values
-- local function toggle_telescope(harpoon_files)
-- local file_paths = {}
-- for _, item in ipairs(harpoon_files.items) do
-- table.insert(file_paths, item.value)
-- end
--
-- require('telescope.pickers')
-- .new({}, {
-- prompt_title = 'Harpoon',
-- finder = require('telescope.finders').new_table {
-- results = file_paths,
-- },
-- previewer = conf.file_previewer {},
-- sorter = conf.generic_sorter {},
-- })
-- :find()
-- end
--
-- vim.keymap.set('n', '<C-e>', function()
-- toggle_telescope(harpoon:list())
-- end, { desc = 'Open harpoon window' })
end,
}
28 changes: 28 additions & 0 deletions lua/custom/plugins/iluminate.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
'RRethy/vim-illuminate',
event = 'BufReadPost',
config = function()
require('illuminate').configure {
delay = 200,
filetypes_denylist = {
'NvimTree',
'markdown',
'fugitive',
'oil',
},
providers = {
'treesitter',
'lsp',
'regex',
},
modes_allowlist = { 'n' },
min_count_to_highlight = 2,
}
-- vim.cmd [[hi IlluminatedWordText guibg=#a7c080 guifg=#424c33 gui=nocombine]]
-- vim.cmd [[hi IlluminatedWordWrite guibg=#a7c080 guifg=#424c33 gui=nocombine]]
-- vim.cmd [[hi IlluminatedWordRead guibg=#a7c080 guifg=#424c33 gui=nocombine]]
-- vim.cmd [[hi IlluminatedWordText guibg=#ff71ce]]
-- vim.cmd [[hi IlluminatedWordRead guibg=#ff71ce]]
-- vim.cmd [[hi IlluminatedWordWrite guibg=#ff71ce]]
end,
}
Loading