150 lines
3.4 KiB
Lua
150 lines
3.4 KiB
Lua
-- Bootstrap lazy.nvim (the modern, maintained plugin manager)
|
|
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",
|
|
lazypath,
|
|
})
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
-- ── Core configuration (no plugins needed) ───────────────────────────
|
|
require("user.options")
|
|
require("user.keymaps")
|
|
require("user.autocmds")
|
|
require("user.commands")
|
|
require("user.files_utils")
|
|
require("user.terminal")
|
|
require("user.android")
|
|
require("user.flutter")
|
|
|
|
-- Build plugin list — user modules can contribute additional specs
|
|
local test_plugins = require("user.test")
|
|
|
|
-- ── Plugin specifications ────────────────────────────────────────────
|
|
require("lazy").setup(vim.list_extend({
|
|
|
|
-- Colorscheme (high priority — loads before anything else)
|
|
{
|
|
"ellisonleao/gruvbox.nvim",
|
|
priority = 1000,
|
|
config = function()
|
|
require("user.gruvbox")
|
|
end,
|
|
},
|
|
|
|
-- LSP + Mason (LSP servers, formatters, linters, debuggers)
|
|
{
|
|
"williamboman/mason-lspconfig.nvim",
|
|
dependencies = {
|
|
{ "williamboman/mason.nvim", build = ":MasonUpdate" },
|
|
"neovim/nvim-lspconfig",
|
|
"hrsh7th/cmp-nvim-lsp", -- ensure cmp capabilities are available
|
|
},
|
|
config = function()
|
|
require("user.lsp")
|
|
end,
|
|
},
|
|
|
|
-- Completion framework
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
dependencies = {
|
|
"hrsh7th/cmp-buffer",
|
|
"hrsh7th/cmp-path",
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
"hrsh7th/cmp-nvim-lua",
|
|
"saadparwaiz1/cmp_luasnip",
|
|
"L3MON4D3/LuaSnip",
|
|
},
|
|
config = function()
|
|
require("user.cmp")
|
|
end,
|
|
},
|
|
|
|
-- Treesitter (syntax highlighting, folding, incremental selection)
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
config = function()
|
|
require("user.treesitter")
|
|
end,
|
|
},
|
|
|
|
-- Telescope (fuzzy finder — files, grep, buffers, help)
|
|
{
|
|
"nvim-telescope/telescope.nvim",
|
|
tag = "v0.1.9",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
{
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
build = "make",
|
|
},
|
|
},
|
|
config = function()
|
|
require("user.telescope")
|
|
end,
|
|
},
|
|
|
|
-- Auto pairs (automatically close brackets, quotes, etc.)
|
|
{
|
|
"windwp/nvim-autopairs",
|
|
config = function()
|
|
require("user.autopairs")
|
|
end,
|
|
},
|
|
|
|
-- TypeScript / JavaScript LSP enhancements (organize imports, etc.)
|
|
{
|
|
"pmizio/typescript-tools.nvim",
|
|
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
|
config = function()
|
|
require("user.typescript-tools")
|
|
end,
|
|
},
|
|
|
|
-- Formatters & linters (community fork of archived null-ls)
|
|
{
|
|
"nvimtools/none-ls.nvim",
|
|
config = function()
|
|
require("user.null-ls")
|
|
end,
|
|
},
|
|
|
|
-- Java LSP (eclipse.jdt.ls integration)
|
|
"mfussenegger/nvim-jdtls",
|
|
|
|
-- Markdown preview (live preview in browser)
|
|
{
|
|
"iamcco/markdown-preview.nvim",
|
|
build = function()
|
|
vim.fn["mkdp#util#install"]()
|
|
end,
|
|
},
|
|
|
|
-- Comment (gc / gb to toggle comments in any language)
|
|
{
|
|
"numToStr/Comment.nvim",
|
|
config = function()
|
|
require("user.comment")
|
|
end,
|
|
},
|
|
|
|
-- Trouble (pretty diagnostics, references, quickfix panel)
|
|
{
|
|
"folke/trouble.nvim",
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
config = function()
|
|
require("user.trouble")
|
|
end,
|
|
},
|
|
|
|
-- NERDTree (file explorer sidebar)
|
|
"preservim/nerdtree",
|
|
|
|
}, test_plugins))
|