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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ spell/
# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded
# merge conflicts.
lazy-lock.json
.worktrees/

.DS_Store
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down
6 changes: 6 additions & 0 deletions lua/custom/plugins/blink-cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'saghen/blink.cmp',
opts = {
keymap = { preset = 'super-tab' },
},
}
66 changes: 66 additions & 0 deletions lua/custom/plugins/codediff.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
return {
'esmuellert/codediff.nvim',
dependencies = { 'MunifTanjim/nui.nvim' },
cmd = 'CodeDiff',
config = function()
require('codediff').setup {
-- Highlight configuration
highlights = {
-- Line-level: accepts highlight group names or hex colors (e.g., "#2ea043")
line_insert = 'DiffAdd', -- Line-level insertions
line_delete = 'DiffDelete', -- Line-level deletions

-- Character-level: accepts highlight group names or hex colors
-- If specified, these override char_brightness calculation
char_insert = nil, -- Character-level insertions (nil = auto-derive)
char_delete = nil, -- Character-level deletions (nil = auto-derive)

-- Brightness multiplier (only used when char_insert/char_delete are nil)
-- nil = auto-detect based on background (1.4 for dark, 0.92 for light)
char_brightness = nil, -- Auto-adjust based on your colorscheme
},

-- Diff view behavior
diff = {
disable_inlay_hints = true, -- Disable inlay hints in diff windows for cleaner view
max_computation_time_ms = 5000, -- Maximum time for diff computation (VSCode default)
},

-- Explorer panel configuration
explorer = {
position = 'left', -- "left" or "bottom"
width = 40, -- Width when position is "left" (columns)
height = 15, -- Height when position is "bottom" (lines)
indent_markers = true, -- Show indent markers in tree view (│, ├, └)
icons = {
folder_closed = '', -- Nerd Font folder icon (customize as needed)
folder_open = '', -- Nerd Font folder-open icon
},
view_mode = 'list', -- "list" or "tree"
file_filter = {
ignore = {}, -- Glob patterns to hide (e.g., {"*.lock", "dist/*"})
},
},

-- Keymaps in diff view
keymaps = {
view = {
quit = 'q', -- Close diff tab
toggle_explorer = '<leader>b', -- Toggle explorer visibility (explorer mode only)
next_hunk = ']c', -- Jump to next change
prev_hunk = '[c', -- Jump to previous change
next_file = ']f', -- Next file in explorer mode
prev_file = '[f', -- Previous file in explorer mode
diff_get = 'do', -- Get change from other buffer (like vimdiff)
diff_put = 'dp', -- Put change to other buffer (like vimdiff)
},
explorer = {
select = '<CR>', -- Open diff for selected file
hover = 'K', -- Show file diff preview
refresh = 'R', -- Refresh git status
toggle_view_mode = 'i', -- Toggle between 'list' and 'tree' views
},
},
}
end,
}
16 changes: 16 additions & 0 deletions lua/custom/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
'maxmx03/solarized.nvim',
lazy = false,
priority = 999,
config = function()
vim.o.background = 'dark' -- or 'light'
vim.cmd.colorscheme 'solarized'
vim.keymap.set('n', '<leader>tc', function()
if vim.o.background == 'light' then
vim.o.background = 'dark'
else
vim.o.background = 'light'
end
end, { desc = '[T]oggle the [c]olorscheme background' })
end,
}
16 changes: 16 additions & 0 deletions lua/custom/plugins/conform.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
'stevearc/conform.nvim',
opts = {
formatters_by_ft = {
json = { 'jq' },
sarif = { 'jq' },
python = { 'ruff_format', 'ruff_organize_imports' },
html = { 'prettier' },
javascript = { 'prettier' },
typescript = { 'prettier' },
typescriptreact = { 'prettier' },
markdown = { 'markdownlint' },
yaml = { 'prettier' },
},
},
}
10 changes: 10 additions & 0 deletions lua/custom/plugins/dap-projects.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
return {
'ldelossa/nvim-dap-projects',
dependencies = {
'mfussenegger/nvim-dap',
},
config = function()
local dap_projects = require 'nvim-dap-projects'
dap_projects.search_project_config()
end
}
50 changes: 50 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local harpoon = require 'harpoon'
harpoon:setup {}

local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local finder = function()
local paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(paths, item.value)
end

return require('telescope.finders').new_table {
results = paths,
}
end

require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = finder(),
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
attach_mappings = function(prompt_bufnr, map)
map('i', '<C-d>', function()
local state = require 'telescope.actions.state'
local selected_entry = state.get_selected_entry()
local current_picker = state.get_current_picker(prompt_bufnr)

table.remove(harpoon_files.items, selected_entry.index)
current_picker:refresh(finder())
end)
return true
end,
})
:find()
end

vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end, { desc = 'Harpoon: [a]dd to list' })
vim.keymap.set('n', '<C-e>', function()
toggle_telescope(harpoon:list())
end, { desc = 'Harpoon: open list' })
end
}
53 changes: 53 additions & 0 deletions lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,59 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
vim.g.have_nerd_font = true
vim.o.relativenumber = true

vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })

local function copy_path(path_type)
local path_to_copy
local msg_suffix

if path_type == 'full' then
path_to_copy = vim.fn.expand '%:p'
msg_suffix = 'full path'
elseif path_type == 'relative' then
path_to_copy = vim.fn.expand '%:.'
msg_suffix = 'relative path'
elseif path_type == 'filename' then
path_to_copy = vim.fn.expand '%:t'
msg_suffix = 'filename'
else
print 'Invalid path type specified for copy_path'
return
end

vim.fn.setreg('+', path_to_copy)
print('Copied ' .. msg_suffix .. ' to clipboard')
end
vim.keymap.set('n', '<leader>cp', function()
copy_path 'full'
end, { desc = 'Copy full file path' })
vim.keymap.set('n', '<leader>cr', function()
copy_path 'relative'
end, { desc = 'Copy relative file path' })
vim.keymap.set('n', '<leader>cf', function()
copy_path 'filename'
end, { desc = 'Copy filename' })

require('guess-indent').setup {}

-- local lspconfig = require 'lspconfig'
-- lspconfig.ruby_lsp.setup {
-- init_options = {
-- formatter = 'standard',
-- linters = { 'standard' },
-- addonSettings = {
-- ['Ruby LSP Rails}'] = {
-- enablePendingMigrtationsPrompt = false,
-- },
-- },
-- },
-- }

---@module 'lazy'
---@type LazySpec
Expand Down
8 changes: 8 additions & 0 deletions lua/custom/plugins/kickstart-enable.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
return {
require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns',
}
24 changes: 24 additions & 0 deletions lua/custom/plugins/lsp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- Pyright settings merge via vim.lsp.config deep-merge; mason-lspconfig's
-- automatic_enable fires vim.lsp.enable() for each ensure_installed server.
vim.lsp.config('pyright', {
settings = {
pyright = {
-- Using Ruff's import organizer
disableOrganizeImports = true,
},
python = {
analysis = {
-- Ignore all files for analysis to exclusively use Ruff for linting
ignore = { '*' },
},
},
},
})

return {
'mason-org/mason-lspconfig.nvim',
opts = {
ensure_installed = { 'clangd', 'gopls', 'pyright', 'ts_ls', 'ruff' },
automatic_enable = true,
},
}
17 changes: 17 additions & 0 deletions lua/custom/plugins/lspsaga.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
return {
'nvimdev/lspsaga.nvim',
config = function()
require('lspsaga').setup({
lightbulb = {
enabled = true,
sign = true,
virtual_text = false,
sign_priority = 20,
},
})
end,
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-tree/nvim-web-devicons',
},
}
9 changes: 9 additions & 0 deletions lua/custom/plugins/markdown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
}
14 changes: 14 additions & 0 deletions lua/custom/plugins/marks.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
'chentoast/marks.nvim',
keys = function(_, keys)
local marks = require 'marks'
return {
{ 'm', marks.set, { desc = '[m]arks set' } },
{ 'gn', marks.next, { desc = 'marks: [g]o to [n]ext mark' } },
{ '<leader>mp', marks.preview, { desc = '[m]arks: [p]review' } },
{ '<leader>md', marks.delete_buf, { desc = '[m]arks: [d]elete all marks' } },
unpack(keys),
}
end,
opts = {},
}
13 changes: 13 additions & 0 deletions lua/custom/plugins/mason-extras.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vim.api.nvim_create_autocmd('User', {
pattern = 'VeryLazy',
once = true,
callback = function()
local mr = require 'mason-registry'
mr.refresh(function()
local ok, p = pcall(mr.get_package, 'codelldb')
if ok and not p:is_installed() then p:install() end
end)
end,
})

return {}
5 changes: 5 additions & 0 deletions lua/custom/plugins/rustaceanvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
}
10 changes: 10 additions & 0 deletions lua/custom/plugins/sarif.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- return {
-- 'fguisso/sfer.nvim',
-- }
vim.keymap.set('n', 'fs', '<cmd>SarifView<CR>')
vim.keymap.set('n', '<M-i>', '<cmd>SarifCodeFlowNext<CR>')
vim.keymap.set('n', '<M-o>', '<cmd>SarifCodeFlowPrev<CR>')

return {
'bhendo/sarif.nvim',
}
37 changes: 37 additions & 0 deletions lua/custom/plugins/trouble.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
return {
'folke/trouble.nvim',
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = 'Trouble',
keys = {
{
'<leader>xx',
'<cmd>Trouble diagnostics toggle<cr>',
desc = 'Diagnostics (Trouble)',
},
{
'<leader>xX',
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
desc = 'Buffer Diagnostics (Trouble)',
},
{
'<leader>cs',
'<cmd>Trouble symbols toggle focus=false<cr>',
desc = 'Symbols (Trouble)',
},
{
'<leader>cl',
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
desc = 'LSP Definitions / references / ... (Trouble)',
},
{
'<leader>xL',
'<cmd>Trouble loclist toggle<cr>',
desc = 'Location List (Trouble)',
},
{
'<leader>xQ',
'<cmd>Trouble qflist toggle<cr>',
desc = 'Quickfix List (Trouble)',
},
},
}
Loading
Loading