feat: migrate to lazy.nvim
This commit is contained in:
@ -5,6 +5,11 @@ local lspkind = require("lspkind")
|
||||
local cmp = require("cmp")
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
require("lspconfig").html.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("nvim-autopairs").setup()
|
||||
require("copilot").setup()
|
||||
require("copilot_cmp").setup({
|
||||
@ -49,7 +54,7 @@ cmp.setup({
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol",
|
||||
mode = "symbol_text",
|
||||
max_width = 50,
|
||||
symbol_map = { Copilot = "" },
|
||||
}),
|
||||
@ -61,7 +66,7 @@ cmp.setup({
|
||||
{ name = "luasnip" },
|
||||
{ name = "emoji" },
|
||||
{ name = "path" },
|
||||
-- { name = "buffer" },
|
||||
{ name = "buffer" },
|
||||
{ name = "calc" },
|
||||
},
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ dashboard.section.buttons.val = {
|
||||
dashboard.button("v", " Neovim Settings ", ":set laststatus=3 | e ~/.config/nvim/init.lua <CR>"),
|
||||
dashboard.button("b", "⟳ Recent Files", ":Telescope oldfiles<CR>"),
|
||||
dashboard.button("s", " Shell Configuration", ":set laststatus=3 | e ~/.config/zsh/.zshrc <CR>"),
|
||||
dashboard.button("u", " Update Nvim Plugins", ":PackerUpdate <CR>"),
|
||||
dashboard.button("u", " Update Nvim Plugins", ":Lazy update <CR>"),
|
||||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
@ -43,6 +43,30 @@ dashboard.section.header.val = {
|
||||
[[╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
|
||||
}
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ __ ]],
|
||||
[[ /\ \ ]],
|
||||
[[ / /\ \ ]],
|
||||
[[/ /__\ \ ]],
|
||||
[[\/____\/ ]],
|
||||
}
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ____]],
|
||||
[[ /\ \]],
|
||||
[[ / \ \]],
|
||||
[[ / \ \]],
|
||||
[[ / \ \]],
|
||||
[[ / /\ \ \]],
|
||||
[[ / / \ \ \]],
|
||||
[[ / / \ \ \]],
|
||||
[[ / / / \ \ \]],
|
||||
[[ / / / \ \ \]],
|
||||
[[ / / /---------' \]],
|
||||
[[/ / /_______________\]],
|
||||
[[\ / /]],
|
||||
[[ \/_____________________/ ]],
|
||||
}
|
||||
-- Layout For Luavim ascii art
|
||||
dashboard.config.layout = {
|
||||
{ type = "padding", val = 5 },
|
||||
|
@ -6,7 +6,8 @@ require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
require("null-ls").builtins.code_actions.eslint_d,
|
||||
-- require("null-ls").builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -160,7 +160,7 @@ ins_left({
|
||||
spinner = { pre = "", post = "" },
|
||||
message = { commenced = "In Progress", completed = "Completed" },
|
||||
},
|
||||
display_components = { "lsp_client_name", "spinner", { "title", "percentage", "message" } },
|
||||
display_components = { "lsp_client_name", "spinner", "percentage" },
|
||||
timer = { progress_enddelay = 500, spinner = 1000, lsp_client_name_enddelay = 1000 },
|
||||
spinner_symbols = { "🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 " },
|
||||
})
|
||||
|
@ -41,6 +41,12 @@ ls.add_snippets("all", {
|
||||
}),
|
||||
})
|
||||
|
||||
local debugJSON = s("pcs", {
|
||||
t("<pre><code>{JSON.stringify("),
|
||||
i(0),
|
||||
t("null, 2)}</code></pre>"),
|
||||
})
|
||||
|
||||
ls.add_snippets("svelte", {
|
||||
s("slt", {
|
||||
t({ '<script lang="ts">', "" }),
|
||||
@ -52,9 +58,15 @@ ls.add_snippets("svelte", {
|
||||
i(0),
|
||||
t({ "", "</script>" }),
|
||||
}),
|
||||
debugJSON,
|
||||
})
|
||||
|
||||
ls.add_snippets("typescriptreact", {
|
||||
debugJSON,
|
||||
})
|
||||
|
||||
ls.add_snippets("typescript", {
|
||||
debugJSON,
|
||||
s("sget", {
|
||||
t('export const GET: import("./$types").RequestHandler = async function get({'),
|
||||
i(1, "params"),
|
||||
|
@ -63,7 +63,7 @@ local default = {
|
||||
telescope.setup(default)
|
||||
-- telescope.load_extension("themes");
|
||||
--
|
||||
telescope.load_extension("harpoon")
|
||||
-- telescope.load_extension("harpoon")
|
||||
telescope.load_extension("projections")
|
||||
telescope.load_extension("git_worktree")
|
||||
telescope.load_extension("notify")
|
||||
|
12
configs/nvim/lua/core/bootstrap.lua
Normal file
12
configs/nvim/lua/core/bootstrap.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"--single-branch",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
@ -1,145 +1,114 @@
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
local packer_bootstrap = false
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
packer_bootstrap = true
|
||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
||||
vim.cmd("packadd packer.nvim")
|
||||
end
|
||||
|
||||
local packer = require("packer")
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
return packer.startup(function(use)
|
||||
-- Let packer manage itself
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
-- General Helper Functions
|
||||
use("lewis6991/impatient.nvim")
|
||||
use("nvim-lua/plenary.nvim")
|
||||
local plugins = {
|
||||
|
||||
"nvim-lua/plenary.nvim",
|
||||
---------------------
|
||||
-- Theming Section --
|
||||
---------------------
|
||||
|
||||
use("rktjmp/fwatch.nvim") -- Used to check dark/light theme
|
||||
use({ "catppuccin/nvim", as = "catppuccin" })
|
||||
-- use 'folke/tokyonight.nvim'
|
||||
use("nvim-lualine/lualine.nvim")
|
||||
"rktjmp/fwatch.nvim", -- d to check dark/light theme
|
||||
{ "catppuccin/nvim", name = "catppuccin" },
|
||||
|
||||
"nvim-lualine/lualine.nvim",
|
||||
|
||||
--------------------
|
||||
-- Layout Plugins --
|
||||
--------------------
|
||||
|
||||
use({
|
||||
{
|
||||
"petertriho/nvim-scrollbar",
|
||||
config = function()
|
||||
require("configs.scrollbar")
|
||||
end,
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
})
|
||||
use("akinsho/nvim-toggleterm.lua")
|
||||
use({
|
||||
},
|
||||
"akinsho/nvim-toggleterm.lua",
|
||||
{
|
||||
"akinsho/git-conflict.nvim",
|
||||
tag = "*",
|
||||
config = function()
|
||||
require("git-conflict").setup()
|
||||
-- require("git-conflict").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
config = function()
|
||||
require("configs.notify")
|
||||
end,
|
||||
event = "VimEnter",
|
||||
})
|
||||
|
||||
use({
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
requires = { "kyazdani42/nvim-web-devicons" },
|
||||
cmd = "NvimTreeToggle",
|
||||
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("configs.tree")
|
||||
end,
|
||||
})
|
||||
use("nvim-lua/popup.nvim")
|
||||
use("goolord/alpha-nvim") -- startup screen
|
||||
use({
|
||||
},
|
||||
"nvim-lua/popup.nvim",
|
||||
"goolord/alpha-nvim", -- startup screen
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
})
|
||||
use("glepnir/lspsaga.nvim") -- better windows for lsp replace, goto definition etc...
|
||||
|
||||
},
|
||||
"glepnir/lspsaga.nvim", -- better windows for lsp replace, goto definition etc...
|
||||
---------------------
|
||||
-- Code Navigation --
|
||||
---------------------
|
||||
|
||||
use("junegunn/fzf")
|
||||
use({
|
||||
"junegunn/fzf",
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
config = function()
|
||||
local leap = require("leap")
|
||||
leap.add_default_mappings()
|
||||
leap.setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require("configs.telescope")
|
||||
end,
|
||||
})
|
||||
use("ThePrimeagen/harpoon")
|
||||
|
||||
},
|
||||
-- "ThePrimeagen/harpoon",
|
||||
---------------
|
||||
-- Lsp Setup --
|
||||
---------------
|
||||
|
||||
use("arkav/lualine-lsp-progress")
|
||||
use("neovim/nvim-lspconfig")
|
||||
use("williamboman/mason.nvim")
|
||||
use("williamboman/mason-lspconfig.nvim")
|
||||
use("jose-elias-alvarez/null-ls.nvim")
|
||||
use("folke/lsp-colors.nvim")
|
||||
use({
|
||||
"arkav/lualine-lsp-progress",
|
||||
"neovim/nvim-lspconfig",
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
-- "folke/lsp-colors.nvim",
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
event = "BufRead",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("trouble").setup({})
|
||||
end,
|
||||
})
|
||||
use("onsails/lspkind.nvim")
|
||||
use({
|
||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
},
|
||||
"onsails/lspkind.nvim",
|
||||
{
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
},
|
||||
-------------------
|
||||
-- Autocomplete --
|
||||
-------------------
|
||||
|
||||
use("tpope/vim-surround")
|
||||
use({
|
||||
"tpope/vim-surround",
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
requires = {
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
@ -147,52 +116,39 @@ return packer.startup(function(use)
|
||||
|
||||
"zbirenbaum/copilot.lua",
|
||||
"zbirenbaum/copilot-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"hrsh7th/cmp-calc",
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
event = { "BufReadPre", "CmdlineChanged" },
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
vim.schedule(function()
|
||||
require("configs.autocomplete")
|
||||
require("configs.snippets")
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
after = "nvim-cmp",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
require("lspconfig").html.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
})
|
||||
use({ "hrsh7th/cmp-cmdline", after = "nvim-cmp" })
|
||||
use({ "hrsh7th/cmp-path", after = "nvim-cmp" })
|
||||
use({ "hrsh7th/cmp-nvim-lua", after = "nvim-cmp" })
|
||||
use({ "hrsh7th/cmp-calc", after = "nvim-cmp" })
|
||||
use({ "hrsh7th/cmp-emoji", after = "nvim-cmp" })
|
||||
|
||||
use({
|
||||
"https://github.com/nat-418/boole.nvim",
|
||||
},
|
||||
{
|
||||
"nat-418/boole.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("boole").setup()
|
||||
end,
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"gaoDean/autolist.nvim",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
require("autolist").setup({})
|
||||
end,
|
||||
})
|
||||
|
||||
},
|
||||
-------------------------
|
||||
-- Syntax Highlighting --
|
||||
-------------------------
|
||||
|
||||
use({
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = "BufReadPost",
|
||||
requires = {
|
||||
@ -202,46 +158,43 @@ return packer.startup(function(use)
|
||||
require("configs.treesitter")
|
||||
end,
|
||||
run = ":TSUpdate",
|
||||
})
|
||||
|
||||
},
|
||||
--------------------
|
||||
-- IDE Type Stuff --
|
||||
--------------------
|
||||
use({
|
||||
{
|
||||
"ThePrimeagen/git-worktree.nvim",
|
||||
config = function()
|
||||
require("git-worktree").setup()
|
||||
end,
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"GnikDroy/projections.nvim",
|
||||
config = function()
|
||||
require("configs.sessions")
|
||||
end,
|
||||
})
|
||||
|
||||
},
|
||||
-- Dap Debugger -- Have not yet been able to set this up
|
||||
use({ "mfussenegger/nvim-dap" })
|
||||
use({ "rcarriga/nvim-dap-ui" })
|
||||
use({ "mxsdev/nvim-dap-vscode-js", requires = { "mfussenegger/nvim-dap" } })
|
||||
|
||||
use("editorconfig/editorconfig-vim")
|
||||
use({
|
||||
"mfussenegger/nvim-dap",
|
||||
"rcarriga/nvim-dap-ui",
|
||||
{ "mxsdev/nvim-dap-vscode-js", requires = { "mfussenegger/nvim-dap" } },
|
||||
"editorconfig/editorconfig-vim",
|
||||
{
|
||||
"michaelb/sniprun",
|
||||
event = "BufReadPost",
|
||||
config = function()
|
||||
require("configs.sniprun")
|
||||
end,
|
||||
run = "bash ./install.sh",
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"uga-rosa/translate.nvim",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("translate").setup({ default = { output = "replace" } })
|
||||
end,
|
||||
})
|
||||
use({
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
cmd = "NeoTest",
|
||||
config = function()
|
||||
@ -252,12 +205,12 @@ return packer.startup(function(use)
|
||||
"KaiSpencer/neotest-vitest",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
use("tpope/vim-dadbod")
|
||||
use("kristijanhusak/vim-dadbod-ui")
|
||||
"tpope/vim-dadbod",
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
}
|
||||
|
||||
if packer_bootstrap then
|
||||
packer.sync()
|
||||
end
|
||||
end)
|
||||
local opts = { defaults = { lazy = true } }
|
||||
|
||||
require("lazy").setup(plugins, opts)
|
||||
|
Reference in New Issue
Block a user