aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/codecompanion.lua4
-rw-r--r--lua/plugins/copilot-chat.lua7
-rw-r--r--lua/plugins/dap.lua10
-rw-r--r--lua/plugins/lualine.lua4
-rw-r--r--lua/plugins/refactoring.lua3
-rw-r--r--lua/plugins/snacks.lua88
-rw-r--r--lua/plugins/telescope.lua35
-rw-r--r--lua/plugins/todo-comments.lua2
8 files changed, 103 insertions, 50 deletions
diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua
index ff00936..052b066 100644
--- a/lua/plugins/codecompanion.lua
+++ b/lua/plugins/codecompanion.lua
@@ -6,7 +6,7 @@ return {
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
- "nvim-telescope/telescope.nvim", -- Using telescope for file and buffer picker
+ -- "nvim-telescope/telescope.nvim", -- Using telescope for file and buffer picker
"jellydn/spinner.nvim", -- Show loading spinner when request is started
"ravitemer/codecompanion-history.nvim", -- History management extension
{
@@ -200,7 +200,7 @@ return {
-- Number of days after which chats are automatically deleted (0 to disable)
expiration_days = 0,
-- Picker interface (auto resolved to a valid picker)
- picker = "telescope", -- ("telescope", "snacks", "fzf-lua", or "default")
+ picker = "snacks", -- ("telescope", "snacks", "fzf-lua", or "default")
-- Optional filter function to control which chats are shown when browsing
chat_filter = nil, -- function(chat_data) return boolean end
-- Customize picker keymaps (optional)
diff --git a/lua/plugins/copilot-chat.lua b/lua/plugins/copilot-chat.lua
index c7decda..be40096 100644
--- a/lua/plugins/copilot-chat.lua
+++ b/lua/plugins/copilot-chat.lua
@@ -26,7 +26,7 @@ return {
-- version = "v3.3.0",
dependencies = {
{ "nvim-lua/plenary.nvim" },
- { "nvim-telescope/telescope.nvim" }, -- Using telescope instead of fzf-lua
+ -- { "nvim-telescope/telescope.nvim" }, -- Using telescope instead of fzf-lua
},
opts = {
-- question_header = "## User ",
@@ -34,7 +34,7 @@ return {
-- error_header = "## Error ",
prompts = prompts,
-- Turn off Claude model as it's not working well
- -- model = "claude-3.5-sonnet",
+ model = "gpt-4.1",
auto_follow_cursor = false, -- Don't follow the cursor after getting response
},
@@ -50,7 +50,8 @@ return {
-- opts.answer_header = " Copilot "
-- Override the git prompts message
opts.prompts.Commit = {
- prompt = '> #git:staged\n\nWrite commit message with commitizen convention. Write clear, informative commit messages that explain the "what" and "why" behind changes, not just the "how".',
+ prompt =
+ '> #git:staged\n\nWrite commit message with commitizen convention. Write clear, informative commit messages that explain the "what" and "why" behind changes, not just the "how".',
}
chat.setup(opts)
diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua
index 01e6567..ab84671 100644
--- a/lua/plugins/dap.lua
+++ b/lua/plugins/dap.lua
@@ -6,17 +6,17 @@ return {
"leoluz/nvim-dap-go",
"mxsdev/nvim-dap-vscode-js",
"anuvyklack/hydra.nvim",
- "nvim-telescope/telescope-dap.nvim",
+ -- "nvim-telescope/telescope-dap.nvim",
-- Note: cmp-dap removed due to migration to blink.cmp
-- blink.cmp handles DAP completions automatically
},
keys = { { "<leader>d", desc = "Open Debug menu" } },
config = function()
require "pi.dap"
- local ok_telescope, telescope = pcall(require, "telescope")
- if ok_telescope then
- telescope.load_extension "dap"
- end
+ -- local ok_telescope, telescope = pcall(require, "telescope")
+ -- if ok_telescope then
+ -- telescope.load_extension "dap"
+ -- end
-- Note: DAP completions are handled automatically by blink.cmp
-- No additional configuration needed
diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua
index aa74930..9409537 100644
--- a/lua/plugins/lualine.lua
+++ b/lua/plugins/lualine.lua
@@ -133,7 +133,7 @@ return {
{
"filename",
on_click = function()
- require("telescope.builtin").find_files()
+ Snacks.picker.files()
-- print('file name clicked')
end,
icon = " ",
@@ -147,7 +147,7 @@ return {
{
"diagnostics",
on_click = function()
- require("telescope.builtin").diagnostics()
+ Snacks.picker.diagnostics()
end,
-- separator = { left = '' },
sources = { "nvim_diagnostic" },
diff --git a/lua/plugins/refactoring.lua b/lua/plugins/refactoring.lua
index 92cdf64..7ca3989 100644
--- a/lua/plugins/refactoring.lua
+++ b/lua/plugins/refactoring.lua
@@ -8,7 +8,7 @@ return {
{
"<leader>rr",
function()
- require("telescope").extensions.refactoring.refactors()
+ require("refactoring").select_refactor()
end,
mode = { "n", "v" },
desc = "Refactoring menu",
@@ -16,6 +16,5 @@ return {
},
config = function()
require("refactoring").setup {}
- require("telescope").load_extension "refactoring"
end,
}
diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua
new file mode 100644
index 0000000..bcec3e5
--- /dev/null
+++ b/lua/plugins/snacks.lua
@@ -0,0 +1,88 @@
+return {
+ "folke/snacks.nvim",
+ priority = 1000,
+ lazy = false,
+ ---@type snacks.Config
+ opts = {
+ bigfile = { enabled = true },
+ dashboard = { enabled = true },
+ explorer = { enabled = true },
+ indent = { enabled = true },
+ input = { enabled = true },
+ notifier = { enabled = true },
+ picker = { enabled = true },
+ quickfile = { enabled = true },
+ scope = { enabled = true },
+ scroll = { enabled = true },
+ statuscolumn = { enabled = true },
+ words = { enabled = true },
+ },
+ keys = {
+ -- Top Pickers & Explorer
+ { "<leader><space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
+ { "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
+ { "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
+ { "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
+ { "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
+ { "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
+ -- find
+ { "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
+ { "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
+ { "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
+ { "<leader>gf", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
+ { "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
+ -- git
+ { "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
+ { "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
+ -- Grep
+ { "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
+ { "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
+ { "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
+ { "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
+ -- search
+ { '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
+ { '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
+ { "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
+ { "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
+ { "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
+ { "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
+ { "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
+ { "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
+ { "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
+ { "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
+ { "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
+ { "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
+ { "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
+ { "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
+ { "<leader>st", function() Snacks.picker.todo_comments() end, desc = "Todo" },
+ { "<leader>sT", function() Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
+ { "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
+ -- LSP
+ { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
+ { "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
+ { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
+ { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
+ { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
+ { "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
+ { "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
+
+ -- Migrated from Telescope
+ { "<leader>pp", function() Snacks.picker.smart() end, desc = "Open Project files" },
+ { "<leader>gc", function() Snacks.picker.git_branches() end, desc = "Git Branches selector" },
+ { "<leader>pw", function() Snacks.picker.grep_word() end, desc = "Grep word under cursor" },
+ { "<leader>ps", function() Snacks.picker.grep() end, desc = "Grep provided input string" },
+ { "<leader>rc", function() Snacks.picker.git_files({ cwd = vim.fn.expand("~/.dotfiles") }) end, desc = "Search Files in .dotfiles directory" },
+ { "<leader>rn", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Search Files in nvim config directory" },
+ { "<leader>rp", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") .. "/lua/plugins" }) end, desc = "Search Neovim plugins" },
+ { "<leader>rs", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") .. "/lua/scratchs" }) end, desc = "Search Neovim Scratchs files" },
+ { "<leader>ph", function() Snacks.picker.help() end, desc = "Neovim Help" },
+ { "<leader>pe", function() Snacks.picker.buffers() end, desc = "Open buffers" },
+ -- { "<leader>pr", function() Snacks.picker.treesitter() end, desc = "Treesitter buffer elements" }, -- Check if treesitter exists
+ { "<leader>bb", function() Snacks.explorer() end, desc = "Current directory" },
+ { "<leader>bp", function() Snacks.explorer() end, desc = "Project directory" },
+ -- { "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git status" }, -- Already in default
+ { "<leader>ve", function() Snacks.picker.diagnostics() end, desc = "Diagnostic of the buffer" },
+ { "<leader>po", function() Snacks.picker.git_files({ cwd = "./api-specification" }) end, desc = "Openapi directory" },
+ -- { "<leader>pm", "gateway", { desc = "Graphql mutations and queries" }) -- Skipped
+ },
+}
diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua
deleted file mode 100644
index c34e299..0000000
--- a/lua/plugins/telescope.lua
+++ /dev/null
@@ -1,35 +0,0 @@
-return {
- "nvim-telescope/telescope.nvim",
- dependencies = {
- { "nvim-lua/plenary.nvim" },
- { "nvim-lua/popup.nvim" },
- { "nvim-telescope/telescope-fzy-native.nvim" },
- { "kyazdani42/nvim-web-devicons" },
- { "nvim-telescope/telescope-file-browser.nvim" },
- { "nvim-telescope/telescope-ui-select.nvim" },
- { "nvim-telescope/telescope-live-grep-args.nvim" },
- {
- "nvim-telescope/telescope-fzf-native.nvim",
- build = "make",
- dependencies = {
- "junegunn/fzf.vim",
- dependencies = {
- {
- "tpope/vim-dispatch",
- cmd = { "Make", "Dispatch" },
- },
- {
- "junegunn/fzf",
- build = ":call fzf#install()",
- }
- },
- },
- },
- },
- event = "VeryLazy",
- config = function()
- require "pi.telescope.setup"
- require "pi.telescope.mappings"
- require("telescope").load_extension("live_grep_args")
- end,
-}
diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua
index fef635e..3c4c232 100644
--- a/lua/plugins/todo-comments.lua
+++ b/lua/plugins/todo-comments.lua
@@ -5,7 +5,7 @@ return {
},
config = true,
lazy = false,
- cmd = { "TodoTrouble", "TodoTelescope", "TodoQuickFix" },
+ cmd = { "TodoTrouble", "TodoQuickFix" },
keys = {
{
"]t",