jones-nvim-config/lua/plugins.lua

149 lines
4.8 KiB
Lua
Raw Normal View History

2024-04-07 03:14:14 +00:00
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
2024-04-07 03:14:14 +00:00
end
2024-04-07 22:29:54 +00:00
2024-04-07 03:14:14 +00:00
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
opts = function()
local logo = [[
2024-04-07 22:35:46 +00:00
Z
Z
z
z
2024-04-07 22:56:08 +00:00
]]
2024-04-07 22:35:46 +00:00
logo = string.rep("\n", 8) .. logo .. "\n\n"
2024-04-07 22:35:46 +00:00
local opts = {
theme = "doom",
hide = {
-- this is taken care of by lualine
-- enabling this messes up the actual laststatus setting after loading a file
statusline = false,
},
config = {
header = vim.split(logo, "\n"),
2024-04-08 14:46:05 +00:00
-- stylua: ignore
center = {
-- { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" },
{ action = "ene | startinsert", desc = " New File", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent Files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find Text", icon = "", key = "g" },
{ action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "", key = "x" },
{ action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = "qa", desc = " Quit", icon = "", key = "q" },
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
return {
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
}
end,
},
}
2024-04-07 22:35:46 +00:00
for _, button in ipairs(opts.config.center) do
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
button.key_format = " %s"
end
2024-04-07 22:35:46 +00:00
-- close Lazy and re-open when the dashboard is ready
if vim.o.filetype == "lazy" then
vim.cmd.close()
vim.api.nvim_create_autocmd("User", {
pattern = "DashboardLoaded",
callback = function()
require("lazy").show()
end,
})
end
2024-04-07 22:35:46 +00:00
return opts
end,
},
"tanvirtin/monokai.nvim",
{
"onsails/lspkind.nvim",
event = { "VimEnter" },
},
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
-- Auto-completion engine
{
"hrsh7th/nvim-cmp",
dependencies = { "lspkind.nvim" },
config = function()
require("config.nvim-cmp")
end,
},
{ "hrsh7th/cmp-nvim-lsp", dependencies = { "nvim-cmp" } },
{ "hrsh7th/cmp-buffer", dependencies = { "nvim-cmp" } }, -- buffer auto-completion
{ "hrsh7th/cmp-path", dependencies = { "nvim-cmp" } }, -- path auto-completion
{ "hrsh7th/cmp-cmdline", dependencies = { "nvim-cmp" } }, -- cmdline auto-completion
-- Code snippet engine
{
"L3MON4D3/LuaSnip",
version = "v2.*",
},
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.6",
dependencies = { "nvim-lua/plenary.nvim" },
},
"zaldih/themery.nvim",
"terrortylor/nvim-comment",
"szw/vim-maximizer",
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
},
"numToStr/FTerm.nvim",
"github/copilot.vim",
"nvim-lua/plenary.nvim",
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
requires = { { "nvim-lua/plenary.nvim" } },
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
},
"windwp/nvim-ts-autotag",
"nvim-treesitter/nvim-treesitter",
"mfussenegger/nvim-dap",
{
"stevearc/conform.nvim",
opts = {},
},
"f-person/git-blame.nvim",
"yorickpeterse/nvim-grey",
2024-04-07 03:14:14 +00:00
})