aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/colorscheme.lua10
-rw-r--r--lua/plugins/comment.lua5
-rw-r--r--lua/plugins/completition.lua18
-rw-r--r--lua/plugins/dap.lua31
-rw-r--r--lua/plugins/database.lua12
-rw-r--r--lua/plugins/dressing.lua160
-rw-r--r--lua/plugins/easy-align.lua4
-rw-r--r--lua/plugins/fugitive.lua10
-rw-r--r--lua/plugins/gitsigns.lua21
-rw-r--r--lua/plugins/harpoon.lua11
-rw-r--r--lua/plugins/icon-picker.lua9
-rw-r--r--lua/plugins/init.lua28
-rw-r--r--lua/plugins/laravel.lua15
-rw-r--r--lua/plugins/lsp.lua28
-rw-r--r--lua/plugins/lualine.lua47
-rw-r--r--lua/plugins/mind.lua16
-rw-r--r--lua/plugins/neotest.lua64
-rw-r--r--lua/plugins/notify.lua8
-rw-r--r--lua/plugins/refactoring.lua14
-rw-r--r--lua/plugins/rest.lua42
-rw-r--r--lua/plugins/snippets.lua137
-rw-r--r--lua/plugins/telescope.lua16
-rw-r--r--lua/plugins/test.lua49
-rw-r--r--lua/plugins/transparent.lua20
-rw-r--r--lua/plugins/treesitter.lua71
-rw-r--r--lua/plugins/trouble.lua6
-rw-r--r--lua/plugins/worktree.lua11
27 files changed, 863 insertions, 0 deletions
diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua
new file mode 100644
index 0000000..9f0528e
--- /dev/null
+++ b/lua/plugins/colorscheme.lua
@@ -0,0 +1,10 @@
+return {
+ "folke/tokyonight.nvim",
+ priority=1000,
+ config = function()
+ require("tokyonight").setup({
+ style = "night"
+ })
+ vim.cmd.colorscheme("tokyonight")
+ end
+}
diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua
new file mode 100644
index 0000000..fd55eff
--- /dev/null
+++ b/lua/plugins/comment.lua
@@ -0,0 +1,5 @@
+return {
+ "numToStr/Comment.nvim",
+ keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } },
+ config = true
+}
diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua
new file mode 100644
index 0000000..cf1a37d
--- /dev/null
+++ b/lua/plugins/completition.lua
@@ -0,0 +1,18 @@
+return {
+ "hrsh7th/nvim-cmp",
+ dependencies = {
+ "hrsh7th/cmp-buffer",
+ "hrsh7th/cmp-path",
+ "hrsh7th/cmp-nvim-lua",
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-cmdline",
+ "hrsh7th/cmp-git",
+ "saadparwaiz1/cmp_luasnip",
+ "onsails/lspkind-nvim",
+ { "L3MON4D3/LuaSnip", version = "v1.*" },
+ "windwp/nvim-autopairs",
+ },
+ config = function ()
+ require("alpha.completition")
+ end
+}
diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua
new file mode 100644
index 0000000..f8a7b17
--- /dev/null
+++ b/lua/plugins/dap.lua
@@ -0,0 +1,31 @@
+return {
+ "mfussenegger/nvim-dap",
+ dependencies = {
+ "theHamsta/nvim-dap-virtual-text",
+ "rcarriga/nvim-dap-ui",
+ "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/plugins/database.lua b/lua/plugins/database.lua
new file mode 100644
index 0000000..fceb506
--- /dev/null
+++ b/lua/plugins/database.lua
@@ -0,0 +1,12 @@
+return {
+ "kristijanhusak/vim-dadbod-ui",
+ dependencies = {
+ "tpope/vim-dadbod",
+ "kristijanhusak/vim-dadbod-completion",
+ "tpope/vim-dotenv",
+ },
+ keys = {{"<leader><leader>db", ':tab DBUI<cr>'}},
+ init = function ()
+ require("alpha.database")
+ end
+}
diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua
new file mode 100644
index 0000000..d7de41b
--- /dev/null
+++ b/lua/plugins/dressing.lua
@@ -0,0 +1,160 @@
+return {
+ "stevearc/dressing.nvim",
+ event = "VeryLazy",
+ opts = {
+ input = {
+ -- Set to false to disable the vim.ui.input implementation
+ enabled = true,
+
+ -- Default prompt string
+ default_prompt = "Input:",
+
+ -- Can be 'left', 'right', or 'center'
+ prompt_align = "left",
+
+ -- When true, <Esc> will close the modal
+ insert_only = true,
+
+ -- When true, input will start in insert mode.
+ start_in_insert = true,
+
+ -- These are passed to nvim_open_win
+ anchor = "SW",
+ border = "rounded",
+ -- 'editor' and 'win' will default to being centered
+ relative = "cursor",
+
+ -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
+ prefer_width = 40,
+ width = nil,
+ -- min_width and max_width can be a list of mixed types.
+ -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
+ max_width = { 140, 0.9 },
+ min_width = { 20, 0.2 },
+ win_options = {
+ -- Window transparency (0-100)
+ winblend = 10,
+ -- Disable line wrapping
+ wrap = false,
+ },
+
+ -- Set to `false` to disable
+ mappings = {
+ n = {
+ ["<Esc>"] = "Close",
+ ["<CR>"] = "Confirm",
+ },
+ i = {
+ ["<C-c>"] = "Close",
+ ["<CR>"] = "Confirm",
+ ["<Up>"] = "HistoryPrev",
+ ["<Down>"] = "HistoryNext",
+ },
+ },
+
+ override = function(conf)
+ -- This is the config that will be passed to nvim_open_win.
+ -- Change values here to customize the layout
+ return conf
+ end,
+
+ -- see :help dressing_get_config
+ get_config = nil,
+ },
+ select = {
+ -- Set to false to disable the vim.ui.select implementation
+ enabled = true,
+
+ -- Priority list of preferred vim.select implementations
+ backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
+
+ -- Trim trailing `:` from prompt
+ trim_prompt = true,
+
+ -- Options for telescope selector
+ -- These are passed into the telescope picker directly. Can be used like:
+ -- telescope = require('telescope.themes').get_ivy({...})
+ telescope = nil,
+
+ -- Options for fzf selector
+ fzf = {
+ window = {
+ width = 0.5,
+ height = 0.4,
+ },
+ },
+
+ -- Options for fzf_lua selector
+ fzf_lua = {
+ winopts = {
+ width = 0.5,
+ height = 0.4,
+ },
+ },
+
+ -- Options for nui Menu
+ nui = {
+ position = "50%",
+ size = nil,
+ relative = "editor",
+ border = {
+ style = "rounded",
+ },
+ buf_options = {
+ swapfile = false,
+ filetype = "DressingSelect",
+ },
+ win_options = {
+ winblend = 10,
+ },
+ max_width = 80,
+ max_height = 40,
+ min_width = 40,
+ min_height = 10,
+ },
+
+ -- Options for built-in selector
+ builtin = {
+ -- These are passed to nvim_open_win
+ anchor = "NW",
+ border = "rounded",
+ -- 'editor' and 'win' will default to being centered
+ relative = "editor",
+
+ win_options = {
+ -- Window transparency (0-100)
+ winblend = 10,
+ },
+
+ -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
+ -- the min_ and max_ options can be a list of mixed types.
+ -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
+ width = nil,
+ max_width = { 140, 0.8 },
+ min_width = { 40, 0.2 },
+ height = nil,
+ max_height = 0.9,
+ min_height = { 10, 0.2 },
+
+ -- Set to `false` to disable
+ mappings = {
+ ["<Esc>"] = "Close",
+ ["<C-c>"] = "Close",
+ ["<CR>"] = "Confirm",
+ },
+
+ override = function(conf)
+ -- This is the config that will be passed to nvim_open_win.
+ -- Change values here to customize the layout
+ return conf
+ end,
+ },
+
+ -- Used to override format_item. See :help dressing-format
+ format_item_override = {},
+
+ -- see :help dressing_get_config
+ get_config = nil,
+ },
+ },
+}
diff --git a/lua/plugins/easy-align.lua b/lua/plugins/easy-align.lua
new file mode 100644
index 0000000..5f62713
--- /dev/null
+++ b/lua/plugins/easy-align.lua
@@ -0,0 +1,4 @@
+return {
+ "junegunn/vim-easy-align",
+ keys = { { "ga", "<Plug>(EasyAlign)", mode = { "n", "v" } } },
+}
diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua
new file mode 100644
index 0000000..ccce9b5
--- /dev/null
+++ b/lua/plugins/fugitive.lua
@@ -0,0 +1,10 @@
+return {
+ "tpope/vim-fugitive",
+ keys = {
+ { "<leader>ga", ":Git fetch --all -p<cr>" },
+ { "<leader>gl", ":Git pull<cr>" },
+ { "<leader>gdh", ":diffget //2<cr>" },
+ { "<leader>gdl", ":diffget //3<cr>" },
+ },
+ cmd = { "G", "Git" },
+}
diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua
new file mode 100644
index 0000000..524da78
--- /dev/null
+++ b/lua/plugins/gitsigns.lua
@@ -0,0 +1,21 @@
+return {
+ "lewis6991/gitsigns.nvim",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ },
+ 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 })
+ vim.keymap.set('n', '<leader>hr', gitsigns.reset_hunk, { buffer = bufnr })
+ vim.keymap.set('n', '<leader>hp', gitsigns.preview_hunk, { buffer = bufnr })
+ vim.keymap.set('n', '<leader>hj', gitsigns.next_hunk, { buffer = bufnr })
+ vim.keymap.set('n', '<leader>hk', gitsigns.prev_hunk, { buffer = bufnr })
+ end,
+ max_file_length = 10000,
+ })
+ end
+}
diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua
new file mode 100644
index 0000000..b410c8e
--- /dev/null
+++ b/lua/plugins/harpoon.lua
@@ -0,0 +1,11 @@
+return {
+ "ThePrimeagen/harpoon",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-lua/popup.nvim",
+ },
+ keys = require('alpha.harpoon').keymaps,
+ config = function ()
+ require("alpha.harpoon").setup()
+ end
+}
diff --git a/lua/plugins/icon-picker.lua b/lua/plugins/icon-picker.lua
new file mode 100644
index 0000000..55183db
--- /dev/null
+++ b/lua/plugins/icon-picker.lua
@@ -0,0 +1,9 @@
+return {
+ "ziontee113/icon-picker.nvim",
+ keys = {
+ { "<Leader><Leader>i", "<cmd>IconPickerNormal nerd_font<cr>", mode = "n" },
+ { "<Leader><Leader>y", "<cmd>IconPickerYank nerd_font<cr>", mode = "n" },
+ { "<C-o>", "<cmd>IconPickerInsert nerd_font<cr>", mode = "i" },
+ },
+ opts = { disable_legacy_commands = true }
+}
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
new file mode 100644
index 0000000..b126f85
--- /dev/null
+++ b/lua/plugins/init.lua
@@ -0,0 +1,28 @@
+return {
+ "jwalton512/vim-blade",
+ { "junegunn/fzf.vim" },
+ {
+ "junegunn/fzf",
+ build = function()
+ vim.fn["fzf#install"]()
+ end,
+ },
+ {
+ "windwp/nvim-projectconfig",
+ config = function()
+ require("nvim-projectconfig").setup()
+ end,
+ },
+ {
+ "tpope/vim-dispatch",
+ cmd = {"Make", "Dispatch"}
+ },
+ "Raimondi/delimitMate",
+ "lukas-reineke/indent-blankline.nvim",
+ "tpope/vim-surround",
+ "tpope/vim-repeat",
+ "tpope/vim-rhubarb",
+ "tpope/vim-dotenv",
+ "tpope/vim-eunuch",
+ "adalessa/composer.nvim",
+}
diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua
new file mode 100644
index 0000000..60f8ad2
--- /dev/null
+++ b/lua/plugins/laravel.lua
@@ -0,0 +1,15 @@
+return {
+ "adalessa/laravel.nvim",
+ dependencies = {
+ "rcarriga/nvim-notify",
+ "nvim-telescope/telescope.nvim",
+ },
+ cmd = {"Sail", "Artisan", "Composer"},
+ keys = {
+ {"<leader>pa", ":Artisan<cr>"},
+ },
+ config = function()
+ require("laravel").setup()
+ require("telescope").load_extension("laravel")
+ end
+}
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
new file mode 100644
index 0000000..8d5c36a
--- /dev/null
+++ b/lua/plugins/lsp.lua
@@ -0,0 +1,28 @@
+return {
+ "neovim/nvim-lspconfig",
+ dependencies = {
+ "hrsh7th/cmp-nvim-lsp-signature-help",
+ {
+ "jose-elias-alvarez/null-ls.nvim",
+ dependencies = {
+ "adalessa/php-code-actions.nvim",
+ }
+ },
+ "williamboman/mason.nvim",
+ "williamboman/mason-lspconfig.nvim",
+ "WhoIsSethDaniel/mason-tool-installer.nvim",
+ {
+ "j-hui/fidget.nvim",
+ opts = {
+ sources = {
+ ["null-ls"] = {
+ ignore = true
+ }
+ }
+ },
+ },
+ },
+ config = function ()
+ require("alpha.lsp")
+ end
+}
diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua
new file mode 100644
index 0000000..f63efa0
--- /dev/null
+++ b/lua/plugins/lualine.lua
@@ -0,0 +1,47 @@
+return {
+ "nvim-lualine/lualine.nvim",
+ dependencies = { "kyazdani42/nvim-web-devicons" },
+ config = function()
+ require("lualine").setup(
+ {
+ options = {
+ theme = vim.g.alpha_lualine_color,
+ icons_enabled = true,
+ globalstatus = true,
+ },
+ extensions = { "quickfix", "fugitive" },
+ sections = {
+ lualine_a = { { "mode", upper = true } },
+ lualine_b = { { "branch", icon = "" }, "db_ui#statusline" },
+ lualine_c = { { "filename", file_status = true, path = 1 } },
+ lualine_x = {
+ "diagnostics", "diff",
+ {
+ require("lazy.status").updates,
+ cond = require("lazy.status").has_updates,
+ color = { fg = "ff9e64" },
+ }
+ },
+ lualine_y = { "filetype" },
+ lualine_z = { "location" },
+ },
+ winbar = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = { "filename" },
+ lualine_x = {},
+ lualine_y = {},
+ lualine_z = {},
+ },
+ inactive_winbar = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = { "filename" },
+ lualine_x = {},
+ lualine_y = {},
+ lualine_z = {},
+ },
+ }
+ )
+ end,
+}
diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua
new file mode 100644
index 0000000..70c0e23
--- /dev/null
+++ b/lua/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/plugins/neotest.lua b/lua/plugins/neotest.lua
new file mode 100644
index 0000000..5a332be
--- /dev/null
+++ b/lua/plugins/neotest.lua
@@ -0,0 +1,64 @@
+return {
+ "nvim-neotest/neotest",
+ enabled = false,
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-treesitter/nvim-treesitter",
+ "antoinemadec/FixCursorHold.nvim",
+ "nvim-neotest/neotest-go",
+ "rouge8/neotest-rust",
+ "nvim-neotest/neotest-plenary",
+ "nvim-neotest/neotest-vim-test",
+ "anuvyklack/hydra.nvim",
+ },
+ config = function()
+ local neotest = require("neotest")
+ neotest.setup({
+ adapters = {
+ require("neotest-go"),
+ require("neotest-rust"),
+ require("neotest-plenary"),
+ require("neotest-vim-test")({
+ ignore_file_types = { "go", "lua", "rust", "php" },
+ }),
+ -- require("laravel.neotest"),
+ },
+ })
+
+ local hydra = require("hydra")
+
+ local hint = [[
+ NeoTest
+ _n_: Near test _f_: Current file _l_: Last Test _m_: Run Marked _s_: Toggle Summary ^
+ ^ ^ _<Esc>_
+ ]]
+
+ hydra({
+ name = "neotest",
+ hint = hint,
+ mode = "n",
+ config = {
+ color = "teal",
+ invoke_on_body = true,
+ hint = {
+ border = "rounded",
+ position = "bottom",
+ },
+ },
+ body = "<C-t>",
+ heads = {
+ { "n", neotest.run.run },
+ {
+ "f",
+ function()
+ neotest.run.run(vim.fn.expand("%"))
+ end,
+ },
+ { "l", neotest.run.run_last },
+ { "m", neotest.summary.run_marked },
+ { "s", neotest.summary.toggle },
+ { "<Esc>", nil, { exit = true } },
+ },
+ })
+ end
+}
diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua
new file mode 100644
index 0000000..4b2a82c
--- /dev/null
+++ b/lua/plugins/notify.lua
@@ -0,0 +1,8 @@
+return {
+ "rcarriga/nvim-notify",
+ config = function()
+ local notify = require("notify")
+ notify.setup({ background_colour = "#000000" })
+ vim.notify = notify.notify
+ end
+}
diff --git a/lua/plugins/refactoring.lua b/lua/plugins/refactoring.lua
new file mode 100644
index 0000000..349cc63
--- /dev/null
+++ b/lua/plugins/refactoring.lua
@@ -0,0 +1,14 @@
+return {
+ "ThePrimeagen/refactoring.nvim",
+ dependencies = {
+ { "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/plugins/rest.lua b/lua/plugins/rest.lua
new file mode 100644
index 0000000..7b60a9d
--- /dev/null
+++ b/lua/plugins/rest.lua
@@ -0,0 +1,42 @@
+return {
+ "NTBBloodbath/rest.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ ft = "http",
+ config = function()
+ local rest_nvim = require("rest-nvim")
+
+ rest_nvim.setup({
+ -- Open request results in a horizontal split
+ result_split_horizontal = false,
+ -- Skip SSL verification, useful for unknown certificates
+ skip_ssl_verification = false,
+ -- Highlight request on run
+ highlight = {
+ enabled = true,
+ timeout = 150,
+ },
+ result = {
+ -- toggle showing URL, HTTP info, headers at top the of result window
+ show_url = true,
+ show_http_info = true,
+ show_headers = true,
+ },
+ -- Jump to request line on run
+ jump_to_request = false,
+ env_file = ".env",
+ custom_dynamic_variables = {},
+ yank_dry_run = true,
+ })
+
+ vim.api.nvim_create_autocmd("FileType", {
+ pattern = "http",
+ callback = function()
+ local buff = tonumber(vim.fn.expand("<abuf>"), 10)
+ vim.keymap.set("n", "<leader>rn", rest_nvim.run, { noremap = true, buffer = buff })
+ vim.keymap.set("n", "<leader>rl", rest_nvim.last, { noremap = true, buffer = buff })
+ vim.keymap.set("n", "<leader>rp", function() rest_nvim.run(true) end, { noremap = true, buffer = buff })
+ end
+ })
+
+ end
+}
diff --git a/lua/plugins/snippets.lua b/lua/plugins/snippets.lua
new file mode 100644
index 0000000..cba0dd1
--- /dev/null
+++ b/lua/plugins/snippets.lua
@@ -0,0 +1,137 @@
+local config = function()
+ if vim.g.snippets ~= "luasnip" then
+ return
+ end
+
+ local ls = require("luasnip")
+ local types = require("luasnip.util.types")
+
+ ls.config.set_config({
+ -- This tells LuaSnip to remember to keep around the last snippet.
+ -- You can jump back into even if you move outside of the selection
+ history = true,
+
+ -- This one is cool cause if you have dynamic snippets, it updatesas you type!
+ updateevents = "TextChanged,TextChangedI",
+
+ -- Autosnippets:
+ enable_autosnippets = true,
+
+ ext_opts = {
+ [types.choiceNode] = {
+ active = {
+ virt_text = { { "<- Choice", "Error" } },
+ },
+ },
+ },
+ })
+
+ -- create snippet
+ -- s(context, nodes, condition, ...)
+ local snippet = ls.s
+
+ -- TODO: Write about this.
+ -- Useful for dynamic nodes and choice nodes
+ -- local snippet_from_nodes = ls.sn
+
+ -- This is the simplest node.
+ -- Creates a new text node. Places cursor after node by default.
+ -- t { "this will be inserted" }
+ --
+ -- Multiple lines are by passing a table of strings.
+ -- t { "line 1", "line 2" }
+ local t = ls.text_node
+
+ -- Insert Node
+ -- Creates a location for the cursor to jump to.
+ -- Possible options to jump to are 1 - N
+ -- If you use 0, that's the final place to jump to.
+ --
+ -- To create placeholder text, pass it as the second argument
+ -- i(2, "this is placeholder text")
+ local i = ls.insert_node
+
+ -- Function Node
+ -- Takes a function that returns text
+ -- local f = ls.function_node
+
+ -- This a choice snippet. You can move through with <c-l> (in my config)
+ -- c(1, { t {"hello"}, t {"world"}, }),
+ --
+ -- The first argument is the jump position
+ -- The second argument is a table of possible nodes.
+ -- Note, one thing that's nice is you don't have to include
+ -- the jump position for nodes that normally require one (can be nil)
+ -- local c = ls.choice_node
+
+ -- local d = ls.dynamic_node
+
+ -- TODO: Document what I've learned about lambda
+ -- local l = require("luasnip.extras").lambda
+
+ -- local events = require("luasnip.util.events")
+
+ local shortcut = function(val)
+ if type(val) == "string" then
+ return { t({ val }), i(0) }
+ end
+
+ if type(val) == "table" then
+ for k, v in ipairs(val) do
+ if type(v) == "string" then
+ val[k] = t({ v })
+ end
+ end
+ end
+
+ return val
+ end
+
+ local make = function(tbl)
+ local result = {}
+ for k, v in pairs(tbl) do
+ table.insert(result, (snippet({ trig = k, desc = v.desc }, shortcut(v))))
+ end
+
+ return result
+ end
+
+ ls.cleanup()
+ for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/alpha/snips/ft/*.lua", true)) do
+ local ft = vim.fn.fnamemodify(ft_path, ":t:r")
+ ls.add_snippets(ft, make(loadfile(ft_path)()))
+ end
+
+ -- <c-k> is my expansion key
+ -- this will expand the current item or jump to the next item within the snippet.
+ vim.keymap.set({ "i", "s" }, "<c-k>", function()
+ if ls.expand_or_jumpable() then
+ ls.expand_or_jump()
+ end
+ end, { silent = true })
+
+ -- <c-j> is my jump backwards key.
+ -- this always moves to the previous item within the snippet
+ vim.keymap.set({ "i", "s" }, "<c-j>", function()
+ if ls.jumpable(-1) then
+ ls.jump(-1)
+ end
+ end, { silent = true })
+
+ -- <c-l> is selecting within a list of options.
+ -- This is useful for choice nodes (introduced in the forthcoming episode 2)
+ vim.keymap.set("i", "<c-l>", function()
+ if ls.choice_active() then
+ ls.change_choice(1)
+ end
+ end)
+
+end
+return {
+ "L3MON4D3/LuaSnip",
+ version = "v1.*",
+ config = function()
+ config()
+ vim.keymap.set("n", "<leader><leader>s", config)
+ end
+}
diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua
new file mode 100644
index 0000000..52d7b8b
--- /dev/null
+++ b/lua/plugins/telescope.lua
@@ -0,0 +1,16 @@
+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-fzf-native.nvim", build = "make" },
+ },
+ config = function ()
+ require("alpha.telescope.setup")
+ require("alpha.telescope.mappings")
+ end
+}
diff --git a/lua/plugins/test.lua b/lua/plugins/test.lua
new file mode 100644
index 0000000..7fcabc9
--- /dev/null
+++ b/lua/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/plugins/transparent.lua b/lua/plugins/transparent.lua
new file mode 100644
index 0000000..fa0b480
--- /dev/null
+++ b/lua/plugins/transparent.lua
@@ -0,0 +1,20 @@
+return {
+ "xiyaowong/nvim-transparent",
+ config = function()
+ require("transparent").setup({
+ enable = true, -- boolean: enable transparent
+ extra_groups = { -- table/string: additional groups that should be cleared
+ -- In particular, when you set it to 'all', that means all available groups
+
+ -- example of akinsho/nvim-bufferline.lua
+ "BufferLineTabClose",
+ "BufferlineBufferSelected",
+ "BufferLineFill",</