feat: add harpoon clear, wip harpoon maybe add
parent
1a36e16bf6
commit
c41927eb3c
151
lazy-lock.json
151
lazy-lock.json
|
@ -1,32 +1,123 @@
|
||||||
{
|
{
|
||||||
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
"FTerm.nvim": {
|
||||||
"LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" },
|
"branch": "master",
|
||||||
"catppuccin": { "branch": "main", "commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720" },
|
"commit": "d1320892cc2ebab472935242d9d992a2c9570180"
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
},
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"LuaSnip": {
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"branch": "master",
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d"
|
||||||
"conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" },
|
},
|
||||||
"copilot.vim": { "branch": "release", "commit": "7097b09e52621a97d11f254e04de5e5a0f26e5f5" },
|
"catppuccin": {
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "681300934baf36f6184ca41f0b26aed22056d4ee" },
|
"branch": "main",
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "da326d0438ac68dee9b6b62a734be940a8bd8405" },
|
"commit": "aebe43db9cb26e1c70fc5b2fd4158169c405e720"
|
||||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
},
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"cmp-buffer": {
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"branch": "main",
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
|
"commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa"
|
||||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
},
|
||||||
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
"cmp-cmdline": {
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
|
"branch": "main",
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
"commit": "d250c63aa13ead745e3a40f61fdd3470efde3923"
|
||||||
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
},
|
||||||
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
|
"cmp-nvim-lsp": {
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" },
|
"branch": "main",
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "81eb8d519233c105f30dc0a278607e62b20502fd" },
|
"commit": "5af77f54de1b16c34b23cba810150689a3a90312"
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "11a3584b81c3249d2b6279305aee1c7ad273985a" },
|
},
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
"cmp-path": {
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "93ddac6966d5d3416f96df728d7b92e27aaa4452" },
|
"branch": "main",
|
||||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
"commit": "91ff86cd9c29299a64f968ebb45846c485725f23"
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
},
|
||||||
"themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" },
|
"conform.nvim": {
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }
|
"branch": "master",
|
||||||
|
"commit": "9d5ba06d6ee7418c674f498634617416d15b6239"
|
||||||
|
},
|
||||||
|
"copilot.vim": {
|
||||||
|
"branch": "release",
|
||||||
|
"commit": "7097b09e52621a97d11f254e04de5e5a0f26e5f5"
|
||||||
|
},
|
||||||
|
"dashboard-nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "681300934baf36f6184ca41f0b26aed22056d4ee"
|
||||||
|
},
|
||||||
|
"harpoon": {
|
||||||
|
"branch": "harpoon2",
|
||||||
|
"commit": "da326d0438ac68dee9b6b62a734be940a8bd8405"
|
||||||
|
},
|
||||||
|
"lazy.nvim": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8"
|
||||||
|
},
|
||||||
|
"lspkind.nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf"
|
||||||
|
},
|
||||||
|
"lualine.nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "0a5a66803c7407767b799067986b4dc3036e1983"
|
||||||
|
},
|
||||||
|
"mason-lspconfig.nvim": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "44509689b9bf3984d729cc264aacb31cb7f41668"
|
||||||
|
},
|
||||||
|
"mason.nvim": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10"
|
||||||
|
},
|
||||||
|
"monokai.nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63"
|
||||||
|
},
|
||||||
|
"nvim-autopairs": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a"
|
||||||
|
},
|
||||||
|
"nvim-cmp": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "ce16de5665c766f39c271705b17fff06f7bcb84f"
|
||||||
|
},
|
||||||
|
"nvim-comment": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "e9ac16ab056695cad6461173693069ec070d2b23"
|
||||||
|
},
|
||||||
|
"nvim-dap": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "405df1dcc2e395ab5173a9c3d00e03942c023074"
|
||||||
|
},
|
||||||
|
"nvim-lspconfig": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820"
|
||||||
|
},
|
||||||
|
"nvim-tree.lua": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "81eb8d519233c105f30dc0a278607e62b20502fd"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "11a3584b81c3249d2b6279305aee1c7ad273985a"
|
||||||
|
},
|
||||||
|
"nvim-ts-autotag": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "531f48334c422222aebc888fd36e7d109cb354cd"
|
||||||
|
},
|
||||||
|
"nvim-web-devicons": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "93ddac6966d5d3416f96df728d7b92e27aaa4452"
|
||||||
|
},
|
||||||
|
"plenary.nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "8aad4396840be7fc42896e3011751b7609ca4119"
|
||||||
|
},
|
||||||
|
"telescope.nvim": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "6312868392331c9c0f22725041f1ec2bef57c751"
|
||||||
|
},
|
||||||
|
"themery.nvim": {
|
||||||
|
"branch": "main",
|
||||||
|
"commit": "1005a58801276d29c4b1e11244cf7631250f9143"
|
||||||
|
},
|
||||||
|
"vim-maximizer": {
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ require("conform").setup({
|
||||||
python = { "isort", "black" },
|
python = { "isort", "black" },
|
||||||
javascript = { { "prettierd", "prettier" } },
|
javascript = { { "prettierd", "prettier" } },
|
||||||
json = { { "prettierd", "prettier" } },
|
json = { { "prettierd", "prettier" } },
|
||||||
|
markdown = { { "marksman", "prettierd", "prettier" } },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,9 @@ local api = vim.api
|
||||||
local fterm = require("FTerm")
|
local fterm = require("FTerm")
|
||||||
|
|
||||||
fterm.setup({
|
fterm.setup({
|
||||||
blend = 25
|
blend = 25,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Commands
|
-- Commands
|
||||||
api.nvim_create_user_command('FTermToggle', fterm.toggle, { bang = true })
|
api.nvim_create_user_command("FTermToggle", fterm.toggle, { bang = true })
|
||||||
api.nvim_create_user_command('FTermClose', fterm.close, { bang = true })
|
api.nvim_create_user_command("FTermClose", fterm.close, { bang = true })
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,49 @@
|
||||||
local api = vim.api
|
local api = vim.api
|
||||||
local harpoon = require("harpoon")
|
local harpoon = require("harpoon")
|
||||||
harpoon.setup({})
|
harpoon.setup({})
|
||||||
|
|
||||||
api.nvim_create_user_command('HarpoonAdd', function() harpoon:list():add() end, { bang = true })
|
|
||||||
api.nvim_create_user_command('HarpoonTogglePrev', function() harpoon:list():prev() end, { bang = true })
|
|
||||||
api.nvim_create_user_command('HarpoonToggleNext', function() harpoon:list():next() end, { bang = true })
|
|
||||||
|
|
||||||
-- basic telescope configuration
|
-- basic telescope configuration
|
||||||
local conf = require("telescope.config").values
|
local conf = require("telescope.config").values
|
||||||
local function toggle_telescope(harpoon_files)
|
local function toggle_telescope(harpoon_files)
|
||||||
local file_paths = {}
|
local file_paths = {}
|
||||||
for _, item in ipairs(harpoon_files.items) do
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
table.insert(file_paths, item.value)
|
table.insert(file_paths, item.value)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("telescope.pickers").new({}, {
|
require("telescope.pickers")
|
||||||
prompt_title = "Harpoon",
|
.new({}, {
|
||||||
finder = require("telescope.finders").new_table({
|
prompt_title = "Harpoon",
|
||||||
results = file_paths,
|
finder = require("telescope.finders").new_table({
|
||||||
}),
|
results = file_paths,
|
||||||
previewer = conf.file_previewer({}),
|
}),
|
||||||
sorter = conf.generic_sorter({}),
|
previewer = conf.file_previewer({}),
|
||||||
}):find()
|
sorter = conf.generic_sorter({}),
|
||||||
|
})
|
||||||
|
:find()
|
||||||
end
|
end
|
||||||
|
|
||||||
api.nvim_create_user_command('HarpoonUI', function() toggle_telescope(harpoon:list()) end, { bang = true })
|
local function maybe_remove_add()
|
||||||
|
local bufnr = api.nvim_get_current_buf()
|
||||||
|
local mark = harpoon:mark(bufnr)
|
||||||
|
if mark then
|
||||||
|
harpoon:list():add()
|
||||||
|
else
|
||||||
|
harpoon:list():remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Commands
|
||||||
|
api.nvim_create_user_command("HarpoonClear", function()
|
||||||
|
harpoon:list():clear()
|
||||||
|
end, { bang = true })
|
||||||
|
api.nvim_create_user_command("HarpoonToggleFile", function()
|
||||||
|
maybe_remove_add()
|
||||||
|
end, { bang = true })
|
||||||
|
api.nvim_create_user_command("HarpoonTogglePrev", function()
|
||||||
|
harpoon:list():prev()
|
||||||
|
end, { bang = true })
|
||||||
|
api.nvim_create_user_command("HarpoonToggleNext", function()
|
||||||
|
harpoon:list():next()
|
||||||
|
end, { bang = true })
|
||||||
|
api.nvim_create_user_command("HarpoonUI", function()
|
||||||
|
toggle_telescope(harpoon:list())
|
||||||
|
end, { bang = true })
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
-- Mason
|
-- Mason
|
||||||
require('mason').setup({
|
require("mason").setup({
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = "✓",
|
||||||
package_pending = "➜",
|
package_pending = "➜",
|
||||||
package_uninstalled = "✗"
|
package_uninstalled = "✗",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
-- A list of servers to automatically install if they're not already installed
|
-- A list of servers to automatically install if they're not already installed
|
||||||
require('mason-lspconfig').setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'cssls',
|
"cssls",
|
||||||
'cssmodules_ls',
|
"cssmodules_ls",
|
||||||
'graphql',
|
"graphql",
|
||||||
'html',
|
"html",
|
||||||
'intelephense',
|
"intelephense",
|
||||||
'tailwindcss',
|
"tailwindcss",
|
||||||
'tsserver',
|
"tsserver",
|
||||||
'jsonls',
|
"jsonls",
|
||||||
'lua_ls',
|
"lua_ls",
|
||||||
},
|
"marksman",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,7 +8,4 @@ require("nvim-tree").setup({
|
||||||
renderer = {
|
renderer = {
|
||||||
group_empty = true,
|
group_empty = true,
|
||||||
},
|
},
|
||||||
filters = {
|
|
||||||
dotfiles = true,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
122
lua/keymaps.lua
122
lua/keymaps.lua
|
@ -2,67 +2,69 @@ local keymap = vim.api.nvim_set_keymap
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
local mappings = {
|
local mappings = {
|
||||||
n = {
|
n = {
|
||||||
-- highlighting
|
-- highlighting
|
||||||
["<leader>nh"] = ":nohl<CR>",
|
["<leader>nh"] = ":nohl<CR>",
|
||||||
-- move between buffers
|
-- move between buffers
|
||||||
["<c-h>"] = "<C-w>h",
|
["<c-h>"] = "<C-w>h",
|
||||||
["<c-j>"] = "<C-w>j",
|
["<c-j>"] = "<C-w>j",
|
||||||
["<c-k>"] = "<C-w>k",
|
["<c-k>"] = "<C-w>k",
|
||||||
["<c-l>"] = "<C-w>l",
|
["<c-l>"] = "<C-w>l",
|
||||||
-- open and close buggers
|
-- open and close buggers
|
||||||
["<leader>sv"] = "<C-w>s",
|
["<leader>sv"] = "<C-w>s",
|
||||||
["<leader>sh"] = "<C-w>v",
|
["<leader>sh"] = "<C-w>v",
|
||||||
["<leader>se"] = "<C-w>=",
|
["<leader>se"] = "<C-w>=",
|
||||||
["<leader>sx"] = ":close<CR>",
|
["<leader>sx"] = ":close<CR>",
|
||||||
-- nvim-tree
|
-- nvim-tree
|
||||||
["<leader>e"] = ":NvimTreeToggle<CR>",
|
["<leader>e"] = ":NvimTreeFindFileToggle<CR>",
|
||||||
["<leader>cf"] = ":NvimTreeCollapse<CR>",
|
["<leader>cf"] = ":NvimTreeCollapseKeepBuffers<CR>",
|
||||||
-- LSP
|
-- LSP
|
||||||
["<leader>ls"] = ":lspstop<CR>",
|
["<leader>ls"] = ":lspstop<CR>",
|
||||||
["<leader>lo"] = ":lspstart<CR>",
|
["<leader>lo"] = ":lspstart<CR>",
|
||||||
-- Telescope
|
-- Telescope
|
||||||
["<leader>ff"] = "<cmd>Telescope find_files<CR>",
|
["<leader>ff"] = "<cmd>Telescope find_files<CR>",
|
||||||
["<leader>fw"] = "<cmd>Telescope live_grep<CR>",
|
["<leader>fw"] = "<cmd>Telescope live_grep<CR>",
|
||||||
["<leader>fc"] = "<cmd>Telescope grep_string<CR>",
|
["<leader>fc"] = "<cmd>Telescope grep_string<CR>",
|
||||||
["<leader>th"] = "<cmd>Themery<CR>",
|
["<leader>th"] = "<cmd>Themery<CR>",
|
||||||
["<leader>sm"] = ":MaximizerToggle<CR>",
|
["<leader>sm"] = ":MaximizerToggle<CR>",
|
||||||
-- FTerm
|
-- FTerm
|
||||||
["<leader>h"] = "<cmd>FTermToggle<CR>",
|
["<leader>h"] = "<cmd>FTermToggle<CR>",
|
||||||
-- Harpoon
|
-- Harpoon
|
||||||
["<leader>a"] = "<cmd>HarpoonAdd<CR>",
|
["<leader>a"] = "<cmd>HarpoonAdd<CR>",
|
||||||
["<C-e>"] = "<cmd>HarpoonUI<CR>",
|
["<C-e>"] = "<cmd>HarpoonUI<CR>",
|
||||||
-- Formating
|
["<leader>c"] = "<cmd>HarpoonClear<CR>",
|
||||||
["<leader>fm"] = "<cmd>Format<CR>",
|
-- Formating
|
||||||
},
|
["<leader>fm"] = "<cmd>Format<CR>",
|
||||||
x = {
|
},
|
||||||
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
x = {
|
||||||
["<A-k>"] = ":move '<-2<CR>gv-gv",
|
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
||||||
},
|
["<A-k>"] = ":move '<-2<CR>gv-gv",
|
||||||
i = {
|
},
|
||||||
["<C-Space>"] = { 'copilot#Accept("<CR>")', expr = true },
|
i = {
|
||||||
["<A-l>"] = "<esc>",
|
["<C-Space>"] = { 'copilot#Accept("<CR>")', expr = true },
|
||||||
},
|
["<A-l>"] = "<esc>",
|
||||||
t = {
|
["C-BS"] = "<cmd>HarpoonRemove<CR>"
|
||||||
["A-l"] = "<cmd>FTermClose<CR>",
|
},
|
||||||
},
|
t = {
|
||||||
|
["C-h"] = "<C-\\><C-n>:FTermClose<CR>",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for mode, mode_mappings in pairs(mappings) do
|
for mode, mode_mappings in pairs(mappings) do
|
||||||
for key, mapping in pairs(mode_mappings) do
|
for key, mapping in pairs(mode_mappings) do
|
||||||
if type(mapping) == "function" then
|
if type(mapping) == "function" then
|
||||||
-- For direct Lua function calls; ensure your function returns a string command
|
-- For direct Lua function calls; ensure your function returns a string command
|
||||||
keymap(mode, key, "<cmd>lua " .. mapping() .. "<CR>", opts)
|
keymap(mode, key, "<cmd>lua " .. mapping() .. "<CR>", opts)
|
||||||
elseif type(mapping) == "table" and mapping.expr then
|
elseif type(mapping) == "table" and mapping.expr then
|
||||||
-- For expression mappings, like for copilot
|
-- For expression mappings, like for copilot
|
||||||
local expr_opts = vim.tbl_extend("force", opts, { expr = true })
|
local expr_opts = vim.tbl_extend("force", opts, { expr = true })
|
||||||
keymap(mode, key, mapping[1], expr_opts)
|
keymap(mode, key, mapping[1], expr_opts)
|
||||||
elseif type(mapping) == "table" then
|
elseif type(mapping) == "table" then
|
||||||
-- For mappings that have their options specified directly
|
-- For mappings that have their options specified directly
|
||||||
keymap(mode, key, mapping[1], mapping[2] or opts)
|
keymap(mode, key, mapping[1], mapping[2] or opts)
|
||||||
else
|
else
|
||||||
-- For simple string command mappings
|
-- For simple string command mappings
|
||||||
keymap(mode, key, mapping, opts)
|
keymap(mode, key, mapping, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
227
lua/plugins.lua
227
lua/plugins.lua
|
@ -1,24 +1,24 @@
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
{
|
{
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
opts = function()
|
opts = function()
|
||||||
local logo = [[
|
local logo = [[
|
||||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
||||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
||||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
||||||
|
@ -27,17 +27,17 @@ require("lazy").setup({
|
||||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
]]
|
]]
|
||||||
|
|
||||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
theme = "doom",
|
theme = "doom",
|
||||||
hide = {
|
hide = {
|
||||||
-- this is taken care of by lualine
|
-- this is taken care of by lualine
|
||||||
-- enabling this messes up the actual laststatus setting after loading a file
|
-- enabling this messes up the actual laststatus setting after loading a file
|
||||||
statusline = false,
|
statusline = false,
|
||||||
},
|
},
|
||||||
config = {
|
config = {
|
||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
center = {
|
center = {
|
||||||
-- { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" },
|
-- { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" },
|
||||||
|
@ -50,97 +50,98 @@ require("lazy").setup({
|
||||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
||||||
},
|
},
|
||||||
footer = function()
|
footer = function()
|
||||||
local stats = require("lazy").stats()
|
local stats = require("lazy").stats()
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
return {
|
return {
|
||||||
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, button in ipairs(opts.config.center) do
|
for _, button in ipairs(opts.config.center) do
|
||||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
button.key_format = " %s"
|
button.key_format = " %s"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- close Lazy and re-open when the dashboard is ready
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
if vim.o.filetype == "lazy" then
|
if vim.o.filetype == "lazy" then
|
||||||
vim.cmd.close()
|
vim.cmd.close()
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
pattern = "DashboardLoaded",
|
pattern = "DashboardLoaded",
|
||||||
callback = function()
|
callback = function()
|
||||||
require("lazy").show()
|
require("lazy").show()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
"tanvirtin/monokai.nvim",
|
"tanvirtin/monokai.nvim",
|
||||||
{
|
{
|
||||||
"onsails/lspkind.nvim",
|
"onsails/lspkind.nvim",
|
||||||
event = { "VimEnter" },
|
event = { "VimEnter" },
|
||||||
},
|
},
|
||||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||||
-- Auto-completion engine
|
-- Auto-completion engine
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = { "lspkind.nvim" },
|
dependencies = { "lspkind.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("config.nvim-cmp")
|
require("config.nvim-cmp")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "hrsh7th/cmp-nvim-lsp", dependencies = { "nvim-cmp" } },
|
{ "hrsh7th/cmp-nvim-lsp", dependencies = { "nvim-cmp" } },
|
||||||
{ "hrsh7th/cmp-buffer", dependencies = { "nvim-cmp" } }, -- buffer auto-completion
|
{ "hrsh7th/cmp-buffer", dependencies = { "nvim-cmp" } }, -- buffer auto-completion
|
||||||
{ "hrsh7th/cmp-path", dependencies = { "nvim-cmp" } }, -- path auto-completion
|
{ "hrsh7th/cmp-path", dependencies = { "nvim-cmp" } }, -- path auto-completion
|
||||||
{ "hrsh7th/cmp-cmdline", dependencies = { "nvim-cmp" } }, -- cmdline auto-completion
|
{ "hrsh7th/cmp-cmdline", dependencies = { "nvim-cmp" } }, -- cmdline auto-completion
|
||||||
-- Code snippet engine
|
-- Code snippet engine
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
version = "v2.*",
|
version = "v2.*",
|
||||||
},
|
},
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
version = "*",
|
version = "*",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
tag = "0.1.6",
|
tag = "0.1.6",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
},
|
},
|
||||||
"zaldih/themery.nvim",
|
"zaldih/themery.nvim",
|
||||||
"terrortylor/nvim-comment",
|
"terrortylor/nvim-comment",
|
||||||
"szw/vim-maximizer",
|
"szw/vim-maximizer",
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
},
|
},
|
||||||
"numToStr/FTerm.nvim",
|
"numToStr/FTerm.nvim",
|
||||||
"github/copilot.vim",
|
"github/copilot.vim",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
{
|
{
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
branch = "harpoon2",
|
branch = "harpoon2",
|
||||||
requires = { { "nvim-lua/plenary.nvim" } },
|
requires = { { "nvim-lua/plenary.nvim" } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue