aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'home/.config/nvim/init.lua')
-rw-r--r--home/.config/nvim/init.lua147
1 files changed, 114 insertions, 33 deletions
diff --git a/home/.config/nvim/init.lua b/home/.config/nvim/init.lua
index 860c876..e3334a7 100644
--- a/home/.config/nvim/init.lua
+++ b/home/.config/nvim/init.lua
@@ -7,41 +7,122 @@ _G.P = function(v)
return v
end
-local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-if not (vim.uv or vim.loop).fs_stat(lazypath) then
- local lazyrepo = "https://github.com/folke/lazy.nvim.git"
- local out = vim.fn.system({
- "git",
- "clone",
- "--filter=blob:none",
- "--branch=stable",
- lazyrepo,
- lazypath,
- })
- if vim.v.shell_error ~= 0 then
- vim.api.nvim_echo({
- { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
- { out, "WarningMsg" },
- { "\nPress any key to exit..." },
- }, true, {})
- vim.fn.getchar()
- os.exit(1)
- end
-end
-vim.opt.rtp:prepend(lazypath)
+-- Pre-load globals (must be set before plugins load)
+vim.g.copilot_nes_debounce = 500
-require("lazy").setup({ import = "plugins" }, {
- defaults = {
- version = "*",
- },
- change_detection = {
- notify = false,
- },
- rocks = {
- enabled = false,
- hererocks = false,
- },
+-- Build hooks for plugins that need post-install steps
+vim.api.nvim_create_autocmd("User", {
+ pattern = "PackChanged",
+ callback = function(ev)
+ if ev.data.kind ~= "install" and ev.data.kind ~= "update" then
+ return
+ end
+ if ev.data.spec.name == "markdown-preview.nvim" then
+ vim.system({ "yarn", "install" }, { cwd = ev.data.path .. "/app" })
+ end
+ end,
})
+local gh = function(x)
+ return "https://github.com/" .. x
+end
+
+vim.pack.add({
+ -- UI
+ gh("ellisonleao/gruvbox.nvim"),
+ gh("saghen/blink.indent"),
+ gh("nvim-lualine/lualine.nvim"),
+ gh("AndreM222/copilot-lualine"),
+
+ -- Treesitter
+ { src = gh("nvim-treesitter/nvim-treesitter"), version = "main" },
+ gh("RRethy/nvim-treesitter-endwise"),
+ gh("nvim-treesitter/nvim-treesitter-context"),
+ gh("JoosepAlviste/nvim-ts-context-commentstring"),
+ gh("aaronik/treewalker.nvim"),
+ gh("LiadOz/nvim-dap-repl-highlights"),
+
+ -- Completion
+ gh("saghen/blink.compat"),
+ { src = gh("saghen/blink.cmp"), version = vim.version.range("*") },
+ gh("rafamadriz/friendly-snippets"),
+ gh("fang2hou/blink-copilot"),
+ gh("rcarriga/cmp-dap"),
+ gh("xzbdmw/colorful-menu.nvim"),
+ { src = gh("saghen/blink.pairs"), version = vim.version.range("*") },
+ { src = gh("saghen/blink.download"), version = vim.version.range("*") },
+
+ -- Editing
+ gh("nmac427/guess-indent.nvim"),
+ gh("kylechui/nvim-surround"),
+ gh("chrisgrieser/nvim-various-textobjs"),
+ gh("monaqa/dial.nvim"),
+ gh("ThePrimeagen/refactoring.nvim"),
+ gh("nvim-lua/plenary.nvim"),
+
+ -- Git
+ gh("akinsho/git-conflict.nvim"),
+ gh("NeogitOrg/neogit"),
+ gh("ruifm/gitlinker.nvim"),
+ gh("lewis6991/gitsigns.nvim"),
+
+ -- LSP
+ gh("folke/lazydev.nvim"),
+ gh("neovim/nvim-lspconfig"),
+ gh("j-hui/fidget.nvim"),
+ gh("williamboman/mason.nvim"),
+ gh("williamboman/mason-lspconfig.nvim"),
+ gh("WhoIsSethDaniel/mason-tool-installer.nvim"),
+ gh("stevearc/conform.nvim"),
+ gh("mrcjkb/rustaceanvim"),
+ gh("mfussenegger/nvim-lint"),
+ gh("rachartier/tiny-inline-diagnostic.nvim"),
+
+ -- Debug
+ { src = gh("miroshQa/debugmaster.nvim"), version = "dashboard" },
+ gh("mfussenegger/nvim-dap"),
+ gh("theHamsta/nvim-dap-virtual-text"),
+ gh("jay-babu/mason-nvim-dap.nvim"),
+
+ -- Runner
+ gh("stevearc/overseer.nvim"),
+
+ -- Search
+ { src = gh("ibhagwan/fzf-lua"), version = "main" },
+
+ -- Session
+ gh("rmagatti/auto-session"),
+
+ -- AI
+ gh("zbirenbaum/copilot.lua"),
+ gh("copilotlsp-nvim/copilot-lsp"),
+
+ -- Misc
+ gh("iamcco/markdown-preview.nvim"),
+ gh("aserowy/tmux.nvim"),
+ gh("folke/which-key.nvim"),
+ gh("stevearc/quicker.nvim"),
+ gh("stevearc/oil.nvim"),
+}, { confirm = false })
+
+-- Colorscheme (must be set immediately after plugins are on rtp)
+require("gruvbox").setup({})
+vim.o.background = "dark"
+vim.cmd.colorscheme("gruvbox")
+
+-- Plugin configurations (order matters for dependencies)
+require("plugins.ui")
+require("plugins.treesitter")
+require("plugins.completion")
+require("plugins.editing")
+require("plugins.git")
+require("plugins.lsp")
+require("plugins.debug")
+require("plugins.runner")
+require("plugins.search")
+require("plugins.session")
+require("plugins.ai")
+require("plugins.init")
+
require("config.keymaps")
require("config.autocmds")