mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-02-22 07:28:00 +00:00
[neovim] Refactor
This commit is contained in:
parent
b8fcf02379
commit
8d7675acf4
@ -1,57 +1,58 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"auto-save.nvim": { "branch": "main", "commit": "4b59610e1318f8a89501cee9d47a0e8650f0a4d5" },
|
||||
"avante.nvim": { "branch": "main", "commit": "ce55d7ac9ec80105410353527c2970b544598655" },
|
||||
"avante.nvim": { "branch": "main", "commit": "caa8342508f69bf73e19cfaf02abf3c5acdcf4c8" },
|
||||
"b64.nvim": { "branch": "main", "commit": "e93d1a7e065f6eaf5d3bae9efb9bc2c30907f471" },
|
||||
"blink-copilot": { "branch": "main", "commit": "bcd003b946e4bdce2c9da34f0704d3cca94dd13f" },
|
||||
"blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" },
|
||||
"blink.cmp": { "branch": "main", "commit": "18b352d12b35bca148427b607098df14b75a218f" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "c309423479f83f561d68d93d74c899f1683834f7" },
|
||||
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
|
||||
"copilot-lualine": { "branch": "main", "commit": "dc4b8ed0f75bc2557b3158c526624bf04ad233ea" },
|
||||
"copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" },
|
||||
"copilotchat.nvim": { "branch": "main", "commit": "804d9067d1eef0ee21dc39b5bbc86ab9f52287b7" },
|
||||
"copilotchat.nvim": { "branch": "main", "commit": "ced621672e6f4c488c7ae16f821e67e79936d8ed" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" },
|
||||
"github-nvim-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "2bc3b472bbc2484214549af4d9f38c127b886a55" },
|
||||
"go.nvim": { "branch": "master", "commit": "2f75ece028975ea2925e0cac0583754168d70fc4" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
|
||||
"go.nvim": { "branch": "master", "commit": "a9efe436c5294fa24098e81859755ec755a94a60" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" },
|
||||
"guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
|
||||
"karen-yank.nvim": { "branch": "main", "commit": "817f50c9464ce557c8f7f8f4d4c8d2f7b81fc40c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "f15a93907ddad3d9139aea465ae18336d87f5ce6" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" },
|
||||
"leap.nvim": { "branch": "main", "commit": "8b826a9fc766bffd14288aee01847cb0d6c6c383" },
|
||||
"logstash.vim": { "branch": "master", "commit": "531fe079e8c964d2b5786bcb5871c72f966adc2a" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "da8a66c53241876bba140980469876db3a183604" },
|
||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "805c31ec6bfb557975143712ecff6956d3227141" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"mini.animate": { "branch": "main", "commit": "d14190ac3040116540889e2ebc25f488b195799e" },
|
||||
"mini.comment": { "branch": "main", "commit": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7" },
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"mini.starter": { "branch": "main", "commit": "a816f50ac99a6fa1f21e0f07ee13f975444dd4a1" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "5d172e8315444dbc32867d1c7b04d8e7e68ec4e1" },
|
||||
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" },
|
||||
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
|
||||
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
|
||||
"neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" },
|
||||
"neovim-project": { "branch": "main", "commit": "a37f702103acda57735b06bd9c1a056fb73f011f" },
|
||||
"neovim-session-manager": { "branch": "master", "commit": "270e235b014f0c37bf362eb1e8913d66bba33a2e" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "02f5275d8a5546092f01306f162c00c71d6e0281" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "f41624ea1a73f020ddbd33438f74abb95ea17d55" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-dap": { "branch": "master", "commit": "04ce47fc5a6ef2b717f33c320fc003091cebac40" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "6c17f8656f667727b27f5f598463afedb7791b18" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7c8cb61b21727a473663054edec4b83633d9e442" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "e411cf2c8adea87acda6c3d634a375addbfff88e" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "4cf2da5c3a2dfd22e72713c66203d21883b149fd" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "81f5ffa6e8ba27c48403cf681d4b383d924e03e4" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "a52c92c3bbaa10f0c9b547a50adaa8c7d8b29f94" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
|
||||
"outline.nvim": { "branch": "main", "commit": "f01eae624e6170656b6fadd6d7b8717636078bd6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
@ -62,14 +63,15 @@
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "78857db9e8d819d3cc1a9a7bdc1d39d127a36495" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "84ea0b5f4651afdf50ececaf6f110fe9d9dc9458" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6f380b8826fb819c752c8fd7daaee9ef96d4c689" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" },
|
||||
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" },
|
||||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
|
||||
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "b5713e6ca3f627b46968386d6d3f24d374d3cb17" },
|
||||
"vim-kitty-navigator": { "branch": "master", "commit": "081c6f8f9eb17cddb4ff4cd1ad44db48aa76fe03" },
|
||||
"vim-markdown-toc": { "branch": "master", "commit": "aa9cc3b07791db5cbe5f29d661763bc0eb4fb7c1" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||
"yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" }
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
})
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
callback = function()
|
||||
local current_tab = vim.fn.tabpagenr()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
@ -15,7 +15,7 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
|
||||
})
|
||||
|
||||
-- Set expandtab=true in several file types
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "go", "makefile", "lua" },
|
||||
callback = function()
|
||||
vim.opt_local.expandtab = false
|
||||
@ -23,19 +23,33 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
})
|
||||
|
||||
-- Use 'q' to quit from common plugins
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"PlenaryTestPopup",
|
||||
"checkhealth",
|
||||
"dbout",
|
||||
"gitsigns-blame",
|
||||
"grug-far",
|
||||
"help",
|
||||
"lspinfo",
|
||||
"man",
|
||||
"neotest-output",
|
||||
"neotest-output-panel",
|
||||
"neotest-summary",
|
||||
"notify",
|
||||
"qf",
|
||||
"query",
|
||||
"checkhealth",
|
||||
},
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
|
||||
vim.schedule(function()
|
||||
vim.keymap.set("n", "q", function()
|
||||
vim.cmd("close")
|
||||
pcall(vim.api.nvim_buf_delete, event.buf, { force = true })
|
||||
end, {
|
||||
buffer = event.buf,
|
||||
silent = true,
|
||||
desc = "Quit buffer",
|
||||
})
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
@ -48,14 +62,10 @@ vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
]])
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "hcl",
|
||||
command = "setlocal shiftwidth=2 tabstop=2",
|
||||
})
|
||||
|
||||
-- helm files indentation
|
||||
-- Set hcl and helm indentation to 2
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "helm",
|
||||
pattern = { "hcl", "helm" },
|
||||
command = "setlocal shiftwidth=2 tabstop=2",
|
||||
})
|
||||
|
||||
|
@ -131,6 +131,12 @@ keymap(
|
||||
"<cmd>Lspsaga peek_definition<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Peek the definition of the directive under the cursor" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lt",
|
||||
"<cmd>Lspsaga peek_type_definition<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Peek the type definition of the directive under the cursor" })
|
||||
)
|
||||
keymap({ "n", "v" }, "<leader>lf", function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end, vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" }))
|
||||
@ -152,10 +158,6 @@ keymap(
|
||||
)
|
||||
|
||||
-- Copilot
|
||||
keymap({ "n", "v" }, "<leader>coh", function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
require("CopilotChat.integrations.telescope").pick(actions.help_actions())
|
||||
end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Help actions" }))
|
||||
keymap({ "n", "v" }, "<leader>cop", function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
|
||||
|
@ -264,9 +264,6 @@ require("lazy").setup({
|
||||
version = "v7",
|
||||
},
|
||||
{ "mzlogin/vim-markdown-toc" },
|
||||
{
|
||||
"jghauser/follow-md-links.nvim",
|
||||
},
|
||||
|
||||
-- Copilot
|
||||
{
|
||||
@ -288,6 +285,7 @@ require("lazy").setup({
|
||||
{
|
||||
"copilotc-nvim/copilotchat.nvim",
|
||||
branch = "main",
|
||||
build = "make tiktoken",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
require("avante").setup({
|
||||
provider = "copilot",
|
||||
-- provider = "copilot",
|
||||
provider = "claude",
|
||||
claude = {
|
||||
api_key_name = "cmd:secret-tool lookup description ANTHROPIC_API_KEY",
|
||||
},
|
||||
web_search_engine = {
|
||||
provider = "tavily",
|
||||
},
|
||||
|
@ -15,6 +15,10 @@ require("blink.cmp").setup({
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 200,
|
||||
},
|
||||
menu = {
|
||||
-- don't show completion menu automatically when searching
|
||||
auto_show = function(ctx)
|
||||
|
@ -28,10 +28,18 @@ local prompts = {
|
||||
|
||||
require("CopilotChat").setup({
|
||||
highlight_headers = false,
|
||||
separator = "———",
|
||||
-- separator = "———",
|
||||
error_header = "> [!ERROR] Error",
|
||||
debug = false,
|
||||
show_user_selection = false,
|
||||
clear_chat_on_new_prompt = false,
|
||||
prompts = prompts,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "copilot-chat",
|
||||
callback = function()
|
||||
vim.opt_local.relativenumber = false
|
||||
vim.opt_local.number = false
|
||||
end,
|
||||
})
|
||||
|
@ -7,6 +7,7 @@ require("nvim-treesitter.configs").setup({
|
||||
"gomod",
|
||||
"gosum",
|
||||
"gowork",
|
||||
"helm",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
|
Loading…
x
Reference in New Issue
Block a user