aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/alpha/plugins')
-rw-r--r--lua/alpha/plugins/comment.lua7
-rw-r--r--lua/alpha/plugins/completition.lua1
-rw-r--r--lua/alpha/plugins/dap.lua17
-rw-r--r--lua/alpha/plugins/database.lua3
-rw-r--r--lua/alpha/plugins/fugitive.lua12
-rw-r--r--lua/alpha/plugins/gitsigns.lua1
-rw-r--r--lua/alpha/plugins/harpoon.lua1
-rw-r--r--lua/alpha/plugins/init.lua30
-rw-r--r--lua/alpha/plugins/laravel.lua25
-rw-r--r--lua/alpha/plugins/lsp.lua7
-rw-r--r--lua/alpha/plugins/mind.lua16
-rw-r--r--lua/alpha/plugins/neotest.lua1
-rw-r--r--lua/alpha/plugins/refactoring.lua4
-rw-r--r--lua/alpha/plugins/rest.lua1
-rw-r--r--lua/alpha/plugins/telescope.lua1
-rw-r--r--lua/alpha/plugins/test.lua49
-rw-r--r--lua/alpha/plugins/trouble.lua8
-rw-r--r--lua/alpha/plugins/worktree.lua11
18 files changed, 161 insertions, 34 deletions
diff --git a/lua/alpha/plugins/comment.lua b/lua/alpha/plugins/comment.lua
new file mode 100644
index 0000000..5d1831f
--- /dev/null
+++ b/lua/alpha/plugins/comment.lua
@@ -0,0 +1,7 @@
+return {
+ "numToStr/Comment.nvim",
+ keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } },
+ config = function()
+ require("Comment").setup()
+ end,
+}
diff --git a/lua/alpha/plugins/completition.lua b/lua/alpha/plugins/completition.lua
index 0ab9b89..cf1a37d 100644
--- a/lua/alpha/plugins/completition.lua
+++ b/lua/alpha/plugins/completition.lua
@@ -7,7 +7,6 @@ return {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-git",
- "rcarriga/cmp-dap",
"saadparwaiz1/cmp_luasnip",
"onsails/lspkind-nvim",
{ "L3MON4D3/LuaSnip", version = "v1.*" },
diff --git a/lua/alpha/plugins/dap.lua b/lua/alpha/plugins/dap.lua
index 6f33484..f8a7b17 100644
--- a/lua/alpha/plugins/dap.lua
+++ b/lua/alpha/plugins/dap.lua
@@ -6,9 +6,26 @@ return {
"leoluz/nvim-dap-go",
"mxsdev/nvim-dap-vscode-js",
"anuvyklack/hydra.nvim",
+ "nvim-telescope/telescope-dap.nvim",
+ "rcarriga/cmp-dap",
},
keys = { { "<leader>d" } },
config = function()
require("alpha.dap")
+ local ok_telescope, telescope = pcall(require, "telescope")
+ if ok_telescope then
+ telescope.load_extension("dap")
+ end
+
+ local ok_cmp, cmp = pcall(require, "cmp")
+ if ok_cmp then
+ cmp.setup.filetype({ "dap-repl", "dapui_watches" }, {
+ sources = cmp.config.sources({
+ { name = "dap" },
+ }, {
+ { name = "buffer" },
+ }),
+ })
+ end
end
}
diff --git a/lua/alpha/plugins/database.lua b/lua/alpha/plugins/database.lua
index 39e42a5..fceb506 100644
--- a/lua/alpha/plugins/database.lua
+++ b/lua/alpha/plugins/database.lua
@@ -5,7 +5,8 @@ return {
"kristijanhusak/vim-dadbod-completion",
"tpope/vim-dotenv",
},
- config = function ()
+ keys = {{"<leader><leader>db", ':tab DBUI<cr>'}},
+ init = function ()
require("alpha.database")
end
}
diff --git a/lua/alpha/plugins/fugitive.lua b/lua/alpha/plugins/fugitive.lua
new file mode 100644
index 0000000..bcf7ea8
--- /dev/null
+++ b/lua/alpha/plugins/fugitive.lua
@@ -0,0 +1,12 @@
+return {
+ "tpope/vim-fugitive",
+ keys = {
+ {"<leader>ga", ":Git fetch --all -p<cr>"},
+ {"<leader>gl", ":Git pull<cr>"},
+ },
+ cmd = { "G", "Git" },
+ config = function ()
+ vim.keymap.set("n", "<leader>gdh", ":diffget //2<cr>", nil)
+ vim.keymap.set("n", "<leader>gdl", ":diffget //3<cr>", nil)
+ end
+}
diff --git a/lua/alpha/plugins/gitsigns.lua b/lua/alpha/plugins/gitsigns.lua
index 12a1840..524da78 100644
--- a/lua/alpha/plugins/gitsigns.lua
+++ b/lua/alpha/plugins/gitsigns.lua
@@ -6,6 +6,7 @@ return {
config = function()
local gitsigns = require("gitsigns")
gitsigns.setup({
+ trouble = false,
on_attach = function(bufnr)
vim.keymap.set('n', '<leader>hs', gitsigns.stage_hunk, { buffer = bufnr })
vim.keymap.set('n', '<leader>hu', gitsigns.undo_stage_hunk, { buffer = bufnr })
diff --git a/lua/alpha/plugins/harpoon.lua b/lua/alpha/plugins/harpoon.lua
index 8a4ecc6..b410c8e 100644
--- a/lua/alpha/plugins/harpoon.lua
+++ b/lua/alpha/plugins/harpoon.lua
@@ -4,6 +4,7 @@ return {
"nvim-lua/plenary.nvim",
"nvim-lua/popup.nvim",
},
+ keys = require('alpha.harpoon').keymaps,
config = function ()
require("alpha.harpoon").setup()
end
diff --git a/lua/alpha/plugins/init.lua b/lua/alpha/plugins/init.lua
index 334cb01..5fb4f25 100644
--- a/lua/alpha/plugins/init.lua
+++ b/lua/alpha/plugins/init.lua
@@ -13,42 +13,12 @@ return {
require("nvim-projectconfig").setup()
end,
},
- {
- "ThePrimeagen/git-worktree.nvim",
- config = function()
- require("git-worktree").setup({})
- end,
- },
- {
- "folke/trouble.nvim",
- dependencies = "kyazdani42/nvim-web-devicons",
- },
- "vim-test/vim-test",
"rcarriga/nvim-notify",
-
"Raimondi/delimitMate",
"lukas-reineke/indent-blankline.nvim",
-
"tpope/vim-surround",
"tpope/vim-repeat",
- "tpope/vim-fugitive",
"tpope/vim-rhubarb",
"tpope/vim-dotenv",
"tpope/vim-eunuch",
- {
- "numToStr/Comment.nvim",
- config = function()
- require("Comment").setup()
- end,
- },
- {
- "phaazon/mind.nvim",
- branch = "v2.2",
- dependencies = { "nvim-lua/plenary.nvim" },
- },
-
- { "adalessa/laravel.nvim", dev = false },
-
- "adalessa/composer.nvim",
- "adalessa/php-code-actions.nvim",
}
diff --git a/lua/alpha/plugins/laravel.lua b/lua/alpha/plugins/laravel.lua
new file mode 100644
index 0000000..0082653
--- /dev/null
+++ b/lua/alpha/plugins/laravel.lua
@@ -0,0 +1,25 @@
+return {
+ "adalessa/laravel.nvim",
+ dependencies = {
+ "rcarriga/nvim-notify",
+ "adalessa/composer.nvim",
+ },
+ cmd = {"Sali", "Artisan", "Composer"},
+ keys = {{"<leader>pa", function ()
+ require("telescope").extensions.laravel.laravel()
+ end}},
+ config = function()
+ local laravel = require("laravel")
+ local artisan = require("laravel.artisan")
+ local notify = require("notify")
+
+ laravel.setup()
+
+ vim.keymap.set("n", "<leader>ac", function()
+ artisan.clean_cmd_list_cache()
+ notify.notify("Artisan cmd list cache clean", "info", { title = "Laravel.nvim" })
+ end, { noremap = true })
+
+ require("telescope").load_extension("laravel")
+ end
+}
diff --git a/lua/alpha/plugins/lsp.lua b/lua/alpha/plugins/lsp.lua
index ac07faf..c7da38a 100644
--- a/lua/alpha/plugins/lsp.lua
+++ b/lua/alpha/plugins/lsp.lua
@@ -2,7 +2,12 @@ return {
"neovim/nvim-lspconfig",
dependencies = {
"hrsh7th/cmp-nvim-lsp-signature-help",
- "jose-elias-alvarez/null-ls.nvim",
+ {
+ "jose-elias-alvarez/null-ls.nvim",
+ dependencies = {
+ "adalessa/php-code-actions.nvim",
+ }
+ },
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
diff --git a/lua/alpha/plugins/mind.lua b/lua/alpha/plugins/mind.lua
new file mode 100644
index 0000000..70c0e23
--- /dev/null
+++ b/lua/alpha/plugins/mind.lua
@@ -0,0 +1,16 @@
+return {
+ "phaazon/mind.nvim",
+ branch = "v2.2",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ cmd = { "MindOpenMain", "MindOpenProject" },
+ config = function()
+ local dirs = {}
+ if vim.fn.isdirectory("/mnt/nas/alpha/mind/data") == 1 then
+ dirs = {
+ state_path = "/mnt/nas/alpha/mind/mind.json",
+ data_dir = "/mnt/nas/alpha/mind/data",
+ }
+ end
+ require('mind').setup({ persistence = dirs })
+ end
+}
diff --git a/lua/alpha/plugins/neotest.lua b/lua/alpha/plugins/neotest.lua
index 2cecb60..5a332be 100644
--- a/lua/alpha/plugins/neotest.lua
+++ b/lua/alpha/plugins/neotest.lua
@@ -1,5 +1,6 @@
return {
"nvim-neotest/neotest",
+ enabled = false,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
diff --git a/lua/alpha/plugins/refactoring.lua b/lua/alpha/plugins/refactoring.lua
index c8bf7fc..349cc63 100644
--- a/lua/alpha/plugins/refactoring.lua
+++ b/lua/alpha/plugins/refactoring.lua
@@ -4,7 +4,11 @@ return {
{ "nvim-lua/plenary.nvim" },
{ "nvim-treesitter/nvim-treesitter" },
},
+ keys = { { "<leader>rr", function()
+ require("telescope").extensions.refactoring.refactors()
+ end, mode = { "n", "v" } } },
config = function()
require("refactoring").setup({})
+ require("telescope").load_extension("refactoring")
end
}
diff --git a/lua/alpha/plugins/rest.lua b/lua/alpha/plugins/rest.lua
index a0ec729..7b60a9d 100644
--- a/lua/alpha/plugins/rest.lua
+++ b/lua/alpha/plugins/rest.lua
@@ -1,6 +1,7 @@
return {
"NTBBloodbath/rest.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
+ ft = "http",
config = function()
local rest_nvim = require("rest-nvim")
diff --git a/lua/alpha/plugins/telescope.lua b/lua/alpha/plugins/telescope.lua
index ba6ae58..52d7b8b 100644
--- a/lua/alpha/plugins/telescope.lua
+++ b/lua/alpha/plugins/telescope.lua
@@ -6,7 +6,6 @@ return {
{ "nvim-telescope/telescope-fzy-native.nvim" },
{ "kyazdani42/nvim-web-devicons" },
{ "nvim-telescope/telescope-file-browser.nvim" },
- { "nvim-telescope/telescope-dap.nvim" },
{ "nvim-telescope/telescope-ui-select.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
},
diff --git a/lua/alpha/plugins/test.lua b/lua/alpha/plugins/test.lua
new file mode 100644
index 0000000..7fcabc9
--- /dev/null
+++ b/lua/alpha/plugins/test.lua
@@ -0,0 +1,49 @@
+return {
+ "vim-test/vim-test",
+ keys = {{"<leader>t"}},
+ dependencies = {
+ "anuvyklack/hydra.nvim",
+ },
+ config = function()
+ local hydra = require("hydra")
+
+ vim.g["test#preserve_screen"] = 1
+
+ vim.cmd([[
+ let test#php#pest#executable = './vendor/bin/sail test'
+ let test#strategy = 'neovim'
+ let test#neovim#term_position = 'vert'
+ let g:test#preserve_screen = 1
+]] )
+
+ local hint = [[
+ Vim Tests
+ _n_: Near test _f_: Current file _s_: Test Suit ^
+ _l_: Test Last _g_: Visit
+ ^ ^ _<Esc>_ ^
+]]
+
+ hydra({
+ name = "vimtest",
+ hint = hint,
+ mode = "n",
+ config = {
+ color = "teal",
+ invoke_on_body = true,
+ hint = {
+ border = "rounded",
+ position = "bottom",
+ }
+ },
+ body = "<leader>t",
+ heads = {
+ { "n", ":TestNearest<CR>" },
+ { "f", ":TestFile<CR>" },
+ { "s", ":TestSuit<CR>" },
+ { "l", ":TestLast<CR>" },
+ { "g", ":TestVisit<CR>" },
+ { '<Esc>', nil, { exit = true } }
+ }
+ })
+ end
+}
diff --git a/lua/alpha/plugins/trouble.lua b/lua/alpha/plugins/trouble.lua
new file mode 100644
index 0000000..b3ed1c9
--- /dev/null
+++ b/lua/alpha/plugins/trouble.lua
@@ -0,0 +1,8 @@
+return {
+ "folke/trouble.nvim",
+ dependencies = "kyazdani42/nvim-web-devicons",
+ keys = { { "<leader>oo", "<cmd>TroubleToggle<cr>" } },
+ config = function()
+ require("trouble").setup()
+ end
+}
diff --git a/lua/alpha/plugins/worktree.lua b/lua/alpha/plugins/worktree.lua
new file mode 100644
index 0000000..bd7c923
--- /dev/null
+++ b/lua/alpha/plugins/worktree.lua
@@ -0,0 +1,11 @@
+return {
+ "ThePrimeagen/git-worktree.nvim",
+ keys = {
+ { "<leader>gt", function() require("telescope").extensions.git_worktree.git_worktrees() end },
+ { "<leader>gn", function() require("telescope").extensions.git_worktree.create_git_worktree() end },
+ },
+ config = function()
+ require("git-worktree").setup({})
+ require("telescope").load_extension("git_worktree")
+ end,
+}