Sitelet https://github.com/TilakMaddy/nvim-config/commit/eaff7899daf482f318e65a55b69b1dacc30d7e43
Skip to content

Commit eaff789

Browse files
committed
chore: add undo tree and remove copilot in favor avante
1 parent 9db91f2 commit eaff789

11 files changed

Lines changed: 202 additions & 52 deletions

File tree

‎lazy-lock.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
3+
"avante.nvim": { "branch": "main", "commit": "ecc669a87deb2be95db49e53041c05a2d0980fd4" },
34
"blade-nav.nvim": { "branch": "main", "commit": "6d8e34f66430afe20066845f13607037893dd900" },
45
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
56
"catppuccin": { "branch": "main", "commit": "0a5de4da015a175f416d6ef1eda84661623e0500" },
@@ -11,14 +12,17 @@
1112
"gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
1213
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
1314
"image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" },
15+
"img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" },
1416
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
1517
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
1618
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
1719
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
20+
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
1821
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
1922
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
2023
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
2124
"mini.nvim": { "branch": "main", "commit": "0a6fe4ec57377526e9056fffb4204dbdfe860ebc" },
25+
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
2226
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
2327
"nvim-highlight-colors": { "branch": "main", "commit": "e2cb22089cc2358b2b995c09578224f142de6039" },
2428
"nvim-lint": { "branch": "master", "commit": "486474c2ace8d78d28995074dbdbe29011bc63d0" },
@@ -27,14 +31,17 @@
2731
"nvim-treesitter": { "branch": "main", "commit": "dc42c209f3820bdfaae0956f15de29689aa6b451" },
2832
"nvim-treesitter-textobjects": { "branch": "main", "commit": "a0e182ae21fda68c59d1f36c9ed45600aef50311" },
2933
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
34+
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
3035
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
36+
"render-markdown.nvim": { "branch": "main", "commit": "48b4175dbca8439d30c1f52231cbe5a712c8f9d9" },
3137
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
3238
"rustaceanvim": { "branch": "master", "commit": "13f7f5c46d2db0b8daee64a842d8faebfe9064c0" },
3339
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
3440
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
3541
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
3642
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
3743
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
44+
"undotree": { "branch": "master", "commit": "d8f99084d98c32f651860eb0baaf89759f91debc" },
3845
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
3946
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
4047
}

‎lua/core/options.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ vim.opt.smartcase = true
1818
vim.opt.inccommand = "split"
1919

2020
-- Appearance
21+
vim.opt.wrap = false
2122
vim.opt.termguicolors = true
2223
vim.opt.cursorline = true
2324
vim.opt.signcolumn = "yes"

‎lua/plugins/avante.lua‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
return {
2+
"yetone/avante.nvim",
3+
cmd = { "AvanteToggle", "AvanteAsk", "AvanteEdit", "AvanteNewChat", "AvanteModels", "AvanteSwitchProvider" },
4+
version = false,
5+
build = "make",
6+
config = function(_, opts)
7+
require("avante").setup(opts)
8+
local Sidebar = require("avante.sidebar")
9+
Sidebar.get_todos_container_height = function(self)
10+
local Path = require("avante.path")
11+
local history = Path.history.load(self.code.bufnr)
12+
if #history.todos == 0 then return 0 end
13+
return 5
14+
end
15+
end,
16+
---@type table
17+
opts = {
18+
provider = "openrouter",
19+
providers = {
20+
openrouter = {
21+
__inherited_from = "openai",
22+
endpoint = "https://openrouter.ai/api/v1",
23+
api_key_name = [[cmd:sed -n 's/^export OPENROUTER_API_KEY="\(.*\)"/\1/p' ~/.zshrc]],
24+
model = "anthropic/claude-sonnet-4",
25+
},
26+
},
27+
input = {
28+
provider = "snacks",
29+
},
30+
},
31+
keys = {
32+
{
33+
"<leader>aa",
34+
function()
35+
local sidebar = require("avante").get()
36+
if sidebar and sidebar:is_open() then
37+
require("avante").close_sidebar()
38+
else
39+
require("avante.api").zen_mode()
40+
end
41+
end,
42+
desc = "Avante Zen Toggle",
43+
},
44+
{
45+
"<leader>aa",
46+
function() require("avante.api").zen_mode() end,
47+
mode = "v",
48+
desc = "Avante Zen Mode",
49+
},
50+
{
51+
"<leader>an",
52+
function()
53+
require("avante.api").ask({
54+
new_chat = true,
55+
show_logo = true,
56+
sidebar_post_render = function(sidebar) sidebar:toggle_code_window() end,
57+
})
58+
end,
59+
desc = "Avante New Chat (Zen)",
60+
},
61+
{ "<leader>am", "<cmd>AvanteModels<cr>", desc = "Avante Models" },
62+
},
63+
dependencies = {
64+
"MunifTanjim/nui.nvim",
65+
{
66+
"HakonHarnes/img-clip.nvim",
67+
event = "VeryLazy",
68+
opts = {
69+
default = {
70+
embed_image_as_base64 = false,
71+
prompt_for_file_name = false,
72+
drag_and_drop = {
73+
insert_mode = true,
74+
},
75+
},
76+
},
77+
},
78+
{
79+
"MeanderingProgrammer/render-markdown.nvim",
80+
opts = {
81+
file_types = { "markdown", "Avante" },
82+
},
83+
ft = { "markdown", "Avante" },
84+
},
85+
},
86+
}

‎lua/plugins/completion.lua‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ return {
1414
end)(),
1515
},
1616
},
17-
---@module 'blink.cmp'
18-
---@type blink.cmp.Config
17+
---@type table
1918
opts = {
2019
snippets = { preset = "luasnip" },
2120
keymap = {

‎lua/plugins/copilot.lua‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎lua/plugins/flash.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
return {
22
"folke/flash.nvim",
33
event = "VeryLazy",
4-
---@type Flash.Config
4+
---@type table
55
opts = {
66
modes = {
77
char = {

‎lua/plugins/markdown-preview.lua‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
return {
2+
"iamcco/markdown-preview.nvim",
3+
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
4+
ft = "markdown",
5+
build = "cd app && npm install",
6+
keys = {
7+
{ "<leader>mp", "<cmd>MarkdownPreviewToggle<cr>", desc = "[M]arkdown [P]review" },
8+
},
9+
}

‎lua/plugins/oil.lua‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
return {
2+
"stevearc/oil.nvim",
3+
cmd = "Oil",
4+
keys = {
5+
{ "-", "<cmd>Oil<cr>", desc = "Open parent directory (Oil)" },
6+
},
7+
opts = {
8+
default_file_explorer = false,
9+
view_options = {
10+
show_hidden = true,
11+
},
12+
float = {
13+
padding = 4,
14+
max_width = 120,
15+
max_height = 40,
16+
},
17+
keymaps = {
18+
["q"] = "actions.close",
19+
["<C-s>"] = false, -- don't override split
20+
},
21+
},
22+
}

‎lua/plugins/snacks.lua‎

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,58 @@
1+
---@diagnostic disable: undefined-global
12
return {
2-
"folke/snacks.nvim",
3-
lazy = false,
4-
priority = 1000,
5-
---@type snacks.Config
6-
opts = {
7-
notifier = { enabled = true, width = { min = 60, max = 100 } },
8-
styles = {
9-
notification_history = {
10-
width = 0.9,
11-
height = 0.9,
12-
wo = { wrap = true },
13-
},
14-
},
15-
input = { enabled = true },
16-
lazygit = {
17-
enabled = true,
18-
win = {
19-
width = 0,
20-
height = 0,
21-
},
22-
},
23-
bigfile = { enabled = true },
24-
terminal = {
25-
win = {
26-
position = "float",
27-
border = "rounded",
28-
width = 0.8,
29-
height = 0.8,
30-
},
31-
},
3+
'folke/snacks.nvim',
4+
lazy = false,
5+
priority = 1000,
6+
---@type table
7+
opts = {
8+
notifier = { enabled = true, width = { min = 60, max = 100 } },
9+
styles = {
10+
notification_history = {
11+
width = 0.9,
12+
height = 0.9,
13+
wo = { wrap = true },
14+
},
3215
},
33-
keys = {
34-
{ "<c-\\>", function() Snacks.terminal.toggle() end, desc = "Toggle Terminal", mode = { "n", "t" } },
35-
{ "<leader>nh", function() Snacks.notifier.show_history() end, desc = "[N]otification [H]istory" },
36-
{ "<leader>gg", function() Snacks.lazygit.open() end, desc = "Lazygit" },
16+
input = { enabled = true },
17+
lazygit = {
18+
enabled = true,
19+
win = {
20+
width = 0,
21+
height = 0,
22+
},
3723
},
24+
bigfile = { enabled = true },
25+
terminal = {
26+
win = {
27+
position = 'float',
28+
border = 'rounded',
29+
width = 0.8,
30+
height = 0.8,
31+
},
32+
},
33+
},
34+
keys = {
35+
{
36+
'<c-\\>',
37+
function()
38+
Snacks.terminal.toggle()
39+
end,
40+
desc = 'Toggle Terminal',
41+
mode = { 'n', 't' },
42+
},
43+
{
44+
'<leader>nh',
45+
function()
46+
Snacks.notifier.show_history()
47+
end,
48+
desc = '[N]otification [H]istory',
49+
},
50+
{
51+
'<leader>gg',
52+
function()
53+
Snacks.lazygit.open()
54+
end,
55+
desc = 'Lazygit',
56+
},
57+
},
3858
}

‎lua/plugins/telescope.lua‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,14 @@ return {
9494
vim.keymap.set("n", "<leader>sn", function()
9595
builtin.find_files({ cwd = vim.fn.stdpath("config") })
9696
end, { desc = "[S]earch [N]eovim files" })
97+
98+
vim.keymap.set("n", "<leader>sF", function()
99+
vim.cmd('let g:_telescope_dir = input("Directory: ", "", "dir")')
100+
local dir = vim.g._telescope_dir
101+
vim.g._telescope_dir = nil
102+
if dir and dir ~= "" then
103+
builtin.find_files({ cwd = dir, prompt_title = "Find Files in " .. dir })
104+
end
105+
end, { desc = "[S]earch [F]iles in directory" })
97106
end,
98107
}

0 commit comments

Comments
 (0)