Configuration for my NixOS based systems and Home Manager
at shizuri 358 lines 9.7 kB view raw
1-- Bootstrap lazy.nvim 2local ensure_lazy = function() 3 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 4 if not vim.loop.fs_stat(lazypath) then 5 vim.fn.system({ 6 "git", "clone", "--filter=blob:none", 7 "https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release 8 lazypath 9 }) 10 end 11 vim.opt.rtp:prepend(lazypath) 12end 13 14local lazy_bootstrap = ensure_lazy() 15if lazy_bootstrap then print("Bootstrapped lazy.nvim") end 16 17require("lazy").setup({ 18 install = { colorscheme = { "alabaster" } }, 19 checker = { enabled = false }, 20 spec = { 21 -- Color themes 22 { "shaunsingh/nord.nvim", priority = 1000, lazy = true }, 23 { "shaunsingh/moonlight.nvim", priority = 1000, lazy = true }, 24 { "folke/tokyonight.nvim", priority = 1000, lazy = true }, 25 { "cranberry-clockworks/coal.nvim", priority = 1000, lazy = true }, 26 { "hardselius/warlock", priority = 1000, lazy = true }, 27 { "sontungexpt/witch", priority = 1000, lazy = true, config = true }, 28 { "rose-pine/neovim", priority = 1000, lazy = true }, 29 { "catppuccin/nvim", name = "catppuccin", priority = 1000, lazy = true }, 30 { "p00f/alabaster.nvim", priority = 1000, lazy = true }, 31 { 32 "neanias/everforest-nvim", 33 version = false, 34 lazy = true, 35 priority = 1000, -- make sure to load this before all the other start plugins 36 main = "everforest", 37 opts = { background = "hard" } 38 }, 39 { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true }, 40 { 41 'jesseleite/nvim-noirbuddy', 42 dependencies = { 43 'tjdevries/colorbuddy.nvim', 44 'nvim-lualine/lualine.nvim' 45 }, 46 lazy = true, 47 priority = 1000, 48 config = function(_, opts) 49 -- configure lualine 50 require('noirbuddy').setup(opts) 51 local noirbuddy_lualine = require("noirbuddy.plugins.lualine") 52 require("lualine").setup { 53 options = { 54 icons_enabled = true, 55 --theme = "auto" 56 theme = noirbuddy_lualine.theme 57 }, 58 sections = noirbuddy_lualine.sections, 59 inactive_sections = noirbuddy_lualine.inactive_sections, 60 } 61 end, 62 opts = { 63 -- All of your `setup(opts)` will go here 64 preset = "oxide", 65 colors = { 66 noir_8 = "#3A4649" 67 } 68 }, 69 }, 70 { 71 "plan9-for-vimspace/acme-colors" 72 }, 73 -- Completion 74 { 75 "hrsh7th/nvim-cmp", 76 dependencies = { 77 "hrsh7th/cmp-nvim-lsp", 78 "hrsh7th/cmp-buffer", 79 "hrsh7th/cmp-path", 80 "hrsh7th/cmp-vsnip", 81 "hrsh7th/vim-vsnip", 82 "petertriho/cmp-git", 83 "hrsh7th/cmp-cmdline" 84 }, 85 config = require('completion') 86 }, -- nvim lsp plugins 87 { 88 "neovim/nvim-lspconfig", 89 config = false 90 }, 91 -- LSP Goodness 92 { 93 "ray-x/navigator.lua", 94 dependencies = { 95 { 'ray-x/guihua.lua', build = 'cd lua/fzy && make' }, 96 { 'neovim/nvim-lspconfig' }, 97 } 98 99 }, 100 { 101 -- Syntax Highlighting from the future 102 "nvim-treesitter/nvim-treesitter", 103 --init = function() vim.cmd([[":TSUpdate"]]) end, 104 main = "nvim-treesitter.configs", 105 opts = { 106 ensure_installed = 'all', 107 ignore_install = { 'norg' }, 108 sync_intall = true, 109 highlight = { 110 enable = true, 111 }, 112 indent = { 113 enable = false, 114 }, 115 }, 116 build = ":TSUpdate", 117 version = false, 118 dependencies = { 119 "nvim-treesitter/nvim-treesitter-textobjects", 120 "nvim-treesitter/nvim-treesitter-context", 121 }, 122 }, -- Git stuff 123 -- GitGutter, shows inline difs 124 --"airblade/vim-gitgutter", 125 { 126 "NeogitOrg/neogit", 127 dependencies = { 128 "nvim-lua/plenary.nvim", -- required 129 "sindrets/diffview.nvim", -- optional - Diff integration 130 "nvim-telescope/telescope.nvim" 131 }, 132 config = true 133 }, 134 -- Auto format tool 135 { 136 "stevearc/conform.nvim", 137 lazy = true, 138 opts = { 139 python = { "isort", "black" }, 140 lua = { "lua-format" }, 141 clojure = { "cljfmt" }, 142 rust = { "rustfmt" }, 143 haskell = { "ormolu", "stylish-haskell" }, 144 go = { "goimports", "gofmt" }, 145 java = { "google-java-format" }, 146 javascript = { "prettier" }, 147 html = { "prettier" }, 148 yaml = { "prettier" }, 149 sh = { "shfmt" }, 150 c = { "clang-format" }, 151 } 152 }, 153 { 154 "hedyhli/outline.nvim", 155 lazy = true, 156 cmd = { "Outline", "OutlineOpen" }, 157 config = true, 158 keys = { 159 { "<leader>o", "<cmd>Outline<cr>", desc = "Toggle outline" }, 160 }, 161 }, 162 { 163 "ray-x/go.nvim", 164 ft = "go", 165 lazy = true, 166 dependencies = { 167 "ray-x/guihua.lua", "neovim/nvim-lspconfig", 168 "nvim-treesitter/nvim-treesitter" 169 } 170 }, 171 { 172 "nvim-lualine/lualine.nvim", 173 config = true, 174 dependencies = { "nvim-tree/nvim-web-devicons" } 175 }, 176 -- Fuzzy finding stuff 177 --"junegunn/fzf.vim", 178 "ibhagwan/fzf-lua", 179 -- A lua + nvim stdlib sort of thing 180 { "nvim-lua/plenary.nvim", lazy = true, }, 181 -- Telescope, find anything fast 182 { 183 "nvim-telescope/telescope.nvim", 184 config = true, 185 dependencies = { 186 "nvim-lua/plenary.nvim", 187 "nvim-telescope/telescope-symbols.nvim", 188 "nvim-telescope/telescope-fzf-native.nvim" 189 } 190 }, 191 { 192 "folke/trouble.nvim", 193 dependencies = "nvim-tree/nvim-web-devicons", 194 config = true, 195 }, 196 -- Which key is bound? 197 -- literally the best plugin ever 198 { 199 "folke/which-key.nvim", 200 init = function() 201 vim.o.timeout = true 202 vim.o.timeoutlen = 300 203 end, 204 config = true 205 }, 206 -- Developing my neovim 207 { 208 "folke/lazydev.nvim", 209 config = true, 210 ft = "lua", 211 lazy = true, 212 opts = { 213 library = { 214 path = "luvit-meta/library", words = { "vim%.uv" }, 215 }, 216 }, 217 dependencies = { 218 "Bilal2453/luvit-meta" 219 }, 220 }, 221 -- Lithsps 222 { 223 "windwp/nvim-autopairs", 224 event = "InsertEnter", 225 config = function() 226 local pairs = require("nvim-autopairs") 227 228 pairs.setup({ 229 check_ts = true, 230 enable_check_bracket_line = false, 231 }) 232 233 pairs.get_rules("`")[1].not_filetypes = { "clojure", "scheme", "scm", "janet" } 234 pairs.get_rules("'")[1].not_filetypes = { "clojure", "scheme", "scm", "janet", "rust" } 235 end, 236 }, 237 -- This gives me the paredit engine, it's pretty nifty 238 { 239 "gpanders/nvim-parinfer", 240 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" }, 241 lazy = true, 242 config = function() 243 --vim.g.parinfer_comment_chars = { ";" } 244 vim.g.parinfer_force_balance = true 245 end 246 }, -- )))))) 247 -- This one gives me vim-sexp like structural editing 248 { 249 "julienvincent/nvim-paredit", 250 config = function() 251 local paredit = require('nvim-paredit') 252 paredit.setup({ 253 indent = { 254 enabled = true, 255 }, 256 filetypes = { "clojure", "fennel", "janet" }, 257 }) 258 end, 259 lazy = true, 260 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } 261 }, 262 --{ "hiphish/rainbow-delimiters.nvim", priority = 1050, }, 263 -- Conjure, lisp is magical 264 { 265 "Olical/conjure", 266 dependencies = { "PaterJason/cmp-conjure" }, 267 config = function() 268 vim.g["conjure#client#scheme#stdio#command"] = "gxi" 269 vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" 270 end, 271 lazy = true, 272 ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, 273 }, 274 { "PaterJason/cmp-conjure", lazy = true }, 275 { "p1xelHer0/gerbil.nvim", lazy = true, ft = "scheme", config = true }, -- Fennel, Luasthp 276 { "jaawerth/fennel.vim", lazy = true, ft = "fennel", config = true }, 277 { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel", config = true }, 278 { "Olical/nfnl", lazy = true, ft = "fennel", config = true }, -- Rust stuff 279 { 280 "simrat39/rust-tools.nvim", 281 lazy = true, 282 ft = { "rust" }, 283 config = function() 284 local rt = require("rust-tools") 285 rt.setup({ 286 server = { 287 on_attach = function(_, bufnr) 288 -- Hover actions 289 vim.keymap.set("n", "<C-space>", 290 rt.hover_actions.hover_actions, 291 { buffer = bufnr }) 292 -- Code action groups 293 vim.keymap.set("n", "<Leader>a", 294 rt.code_action_group.code_action_group, 295 { buffer = bufnr }) 296 end 297 } 298 }) 299 end, 300 dependencies = { "nvim-lua/plenary.nvim" } 301 }, 302 { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } }, 303 { 304 "saecki/crates.nvim", 305 tag = "v0.4.0", 306 dependencies = { "nvim-lua/plenary.nvim" }, 307 config = function() require("crates").setup() end, 308 lazy = true, 309 ft = { "rust" } 310 }, -- RISC-V Assembly syntax highlighting 311 { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff 312 -- Hare stuff 313 -- Haredoc 314 { 315 url = "https://git.sr.ht/~torresjrjr/vim-haredoc", 316 lazy = true, 317 ft = { "hare" }, 318 branch = "dev" 319 }, 320 { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, 321 -- TCL 322 { "lewis6991/tree-sitter-tcl", lazy = true, build = "make" }, 323 -- LF 324 { 325 "ptzz/lf.vim", 326 lazy = true, 327 cmd = { "Lf" }, 328 dependencies = { "voldikss/vim-floaterm" } 329 }, 330 { "imsnif/kdl.vim", lazy = true, ft = "kdl" }, 331 { "catgoose/nvim-colorizer.lua", lazy = true, ft = { "css", "html", "toml", "conf" } }, 332 { "github/copilot.vim", lazy = true, cmd = { "Copilot" } }, 333 { 334 "cshuaimin/ssr.nvim", 335 config = function() 336 local ssr = require("ssr") 337 ssr.setup { 338 border = "rounded", 339 min_width = 50, 340 min_height = 5, 341 max_width = 120, 342 max_height = 25, 343 adjust_window = true, 344 keymaps = { 345 close = "q", 346 next_match = "n", 347 prev_match = "N", 348 replace_confirm = "<cr>", 349 replace_all = "<leader><cr>", 350 }, 351 } 352 vim.keymap.set({ "n", "x" }, "<leader>sr", function() ssr.open() end) 353 end 354 }, 355 { "lewis6991/gitsigns.nvim", config = true }, 356 357 } 358})