Configuration for my NixOS based systems and Home Manager
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 = { "noirbuddy" } },
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 { "catppuccin/nvim", name = "catppuccin", priority = 1000, lazy = true },
29 {
30 "neanias/everforest-nvim",
31 version = false,
32 lazy = true,
33 priority = 1000, -- make sure to load this before all the other start plugins
34 main = "everforest",
35 opts = { background = "hard" }
36 },
37 { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true },
38 {
39 'jesseleite/nvim-noirbuddy',
40 dependencies = {
41 'tjdevries/colorbuddy.nvim',
42 },
43 lazy = true,
44 priority = 1000,
45 opts = {
46 -- All of your `setup(opts)` will go here
47 preset = "oxide",
48 colors = {
49 noir_8 = "#3A4649"
50 }
51 },
52 },
53 {
54 "plan9-for-vimspace/acme-colors"
55 },
56 -- Completion
57 {
58 "hrsh7th/nvim-cmp",
59 dependencies = {
60 "hrsh7th/cmp-nvim-lsp",
61 "hrsh7th/cmp-buffer",
62 "hrsh7th/cmp-path",
63 "hrsh7th/cmp-vsnip",
64 "hrsh7th/vim-vsnip",
65 "petertriho/cmp-git",
66 "hrsh7th/cmp-cmdline"
67 },
68 config = require('completion')
69 }, -- nvim lsp plugins
70 {
71 "neovim/nvim-lspconfig",
72 },
73 -- LSP Goodness
74 {
75 "ray-x/navigator.lua",
76 dependencies = {
77 { 'ray-x/guihua.lua', build = 'cd lua/fzy && make' },
78 { 'neovim/nvim-lspconfig' },
79 }
80
81 },
82 {
83 -- Syntax Highlighting from the future
84 "nvim-treesitter/nvim-treesitter",
85 --init = function() vim.cmd([[":TSUpdate"]]) end,
86 main = "nvim-treesitter.configs",
87 opts = {
88 ensure_installed = 'all',
89 ignore_install = { 'norg' },
90 sync_intall = true,
91 highlight = {
92 enable = true,
93 },
94 indent = {
95 enable = false,
96 },
97 },
98 build = ":TSUpdate",
99 version = false,
100 dependencies = {
101 "nvim-treesitter/nvim-treesitter-textobjects",
102 "nvim-treesitter/nvim-treesitter-context",
103 },
104 }, -- Git stuff
105 -- GitGutter, shows inline difs
106 "airblade/vim-gitgutter",
107 {
108 "NeogitOrg/neogit",
109 dependencies = {
110 "nvim-lua/plenary.nvim", -- required
111 "sindrets/diffview.nvim", -- optional - Diff integration
112 "nvim-telescope/telescope.nvim"
113 },
114 config = true
115 },
116 -- Auto format tool
117 {
118 "stevearc/conform.nvim",
119 lazy = true,
120 opts = {
121 python = { "isort", "black" },
122 lua = { "lua-format" },
123 clojure = { "cljfmt" },
124 rust = { "rustfmt" },
125 haskell = { "ormolu", "stylish-haskell" },
126 go = { "goimports", "gofmt" },
127 java = { "google-java-format" },
128 javascript = { "prettier" },
129 html = { "prettier" },
130 yaml = { "prettier" },
131 sh = { "shfmt" },
132 c = { "clang-format" },
133 }
134 },
135 {
136 "hedyhli/outline.nvim",
137 lazy = true,
138 cmd = { "Outline", "OutlineOpen" },
139 config = true,
140 keys = {
141 { "<leader>o", "<cmd>Outline<cr>", desc = "Toggle outline" },
142 },
143 },
144 {
145 "ray-x/go.nvim",
146 ft = "go",
147 lazy = true,
148 dependencies = {
149 "ray-x/guihua.lua", "neovim/nvim-lspconfig",
150 "nvim-treesitter/nvim-treesitter"
151 }
152 },
153 {
154 "nvim-lualine/lualine.nvim",
155 config = function(_spec, _opt)
156 local noirbuddy_lualine = require("noirbuddy.plugins.lualine")
157 require("lualine").setup {
158 options = {
159 icons_enabled = true,
160 -- when not using noirbuddy, uncomment this
161 --theme = "auto"
162 theme = noirbuddy_lualine.theme
163 },
164 sections = noirbuddy_lualine.sections,
165 inactive_sections = noirbuddy_lualine.inactive_sections,
166 }
167 end,
168 dependencies = { "nvim-tree/nvim-web-devicons", "jesseleite/nvim-noirbuddy" }
169 },
170 -- Fuzzy finding stuff
171 "junegunn/fzf.vim",
172 -- A lua + nvim stdlib sort of thing
173 { "nvim-lua/plenary.nvim", lazy = true, },
174 -- Telescope, find anything fast
175 {
176 "nvim-telescope/telescope.nvim",
177 config = true,
178 dependencies = {
179 "nvim-lua/plenary.nvim",
180 "nvim-telescope/telescope-symbols.nvim",
181 "nvim-telescope/telescope-fzf-native.nvim"
182 }
183 },
184 {
185 "folke/trouble.nvim",
186 dependencies = "nvim-tree/nvim-web-devicons",
187 config = true,
188 },
189 -- Which key is bound?
190 -- literally the best plugin ever
191 {
192 "folke/which-key.nvim",
193 init = function()
194 vim.o.timeout = true
195 vim.o.timeoutlen = 300
196 end,
197 config = true
198 },
199 -- Developing my neovim
200 {
201 "folke/lazydev.nvim",
202 config = true,
203 ft = "lua",
204 lazy = true,
205 opts = {
206 library = {
207 path = "luvit-meta/library", words = { "vim%.uv" },
208 },
209 },
210 dependencies = {
211 "Bilal2453/luvit-meta"
212 },
213 },
214 -- Lithsps
215 {
216 "windwp/nvim-autopairs",
217 event = "InsertEnter",
218 config = function()
219 local pairs = require("nvim-autopairs")
220
221 pairs.setup({
222 check_ts = true,
223 enable_check_bracket_line = false,
224 })
225
226 pairs.get_rules("`")[1].not_filetypes = { "clojure", "scheme", "scm", "janet" }
227 pairs.get_rules("'")[1].not_filetypes = { "clojure", "scheme", "scm", "janet", "rust" }
228 end,
229 },
230 -- This gives me the paredit engine, it's pretty nifty
231 {
232 "gpanders/nvim-parinfer",
233 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" },
234 lazy = true,
235 config = function()
236 vim.g.parinfer_comment_chars = { ";", "#" }
237 vim.g.parinfer_force_balance = true
238 end
239 }, -- ))))))
240 -- This one gives me vim-sexp like structural editing
241 {
242 "julienvincent/nvim-paredit",
243 config = function()
244 local paredit = require('nvim-paredit')
245 paredit.setup({
246 indent = {
247 enabled = true,
248 },
249 --filetypes = {"clojure", "fennel", "janet"},
250 keys = {
251 ["<localleader>w"] = {
252 function()
253 -- place cursor and set mode to `insert`
254 paredit.cursor.place_cursor(
255 -- wrap element under cursor with `( ` and `)`
256 paredit.wrap.wrap_element_under_cursor("( ", ")"),
257 -- cursor placement opts
258 { placement = "inner_start", mode = "insert" }
259 )
260 end,
261 "Wrap element insert head",
262 },
263
264 ["<localleader>W"] = {
265 function()
266 paredit.cursor.place_cursor(
267 paredit.wrap.wrap_element_under_cursor("(", ")"),
268 { placement = "inner_end", mode = "insert" }
269 )
270 end,
271 "Wrap element insert tail",
272 },
273 -- same as above but for enclosing form
274 ["<localleader>i"] = {
275 function()
276 paredit.cursor.place_cursor(
277 paredit.wrap.wrap_enclosing_form_under_cursor("( ", ")"),
278 { placement = "inner_start", mode = "insert" }
279 )
280 end,
281 "Wrap form insert head",
282 },
283 ["<localleader>I"] = {
284 function()
285 paredit.cursor.place_cursor(
286 paredit.wrap.wrap_enclosing_form_under_cursor("(", ")"),
287 { placement = "inner_end", mode = "insert" }
288 )
289 end,
290 "Wrap form insert tail",
291 },
292 ["<localleader>["] = {
293 function()
294 paredit.cursor.place_cursor(
295 paredit.wrap.wrap_enclosing_form_under_cursor("[", "]"),
296 { placement = "inner_start", mode = "insert" }
297 )
298 end,
299 },
300 ["<localleader>{"] = {
301 function()
302 paredit.cursor.place_cursor(
303 paredit.wrap.wrap_enclosing_form_under_cursor("{", "}"),
304 { placement = "inner_end", mode = "insert" }
305 )
306 end,
307 },
308 },
309 })
310 end,
311 lazy = true,
312 ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" }
313 },
314 {
315 "chiefnoah/nvim-paredit-janet",
316 dependencies = { "julienvincent/nvim-paredit" },
317 lazy = true,
318 ft = { "janet" },
319 config = function()
320 require("nvim-paredit-janet").setup()
321 end,
322 },
323 {
324 "julienvincent/nvim-paredit-fennel",
325 dependencies = { "julienvincent/nvim-paredit" },
326 lazy = true,
327 ft = { "fennel" },
328 config = true,
329 },
330 {
331 "ekaitz-zarraga/nvim-paredit-scheme",
332 lazy = true,
333 ft = { "scheme" },
334 config = function()
335 require("nvim-paredit-scheme").setup(require("nvim-paredit"))
336 end,
337 },
338 --{ "hiphish/rainbow-delimiters.nvim", priority = 1050, },
339 -- Conjure, lisp is magical
340 {
341 "Olical/conjure",
342 dependencies = { "PaterJason/cmp-conjure" },
343 config = function()
344 vim.g["conjure#client#scheme#stdio#command"] = "gxi"
345 vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?"
346 end,
347 lazy = true,
348 ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" },
349 },
350 { "PaterJason/cmp-conjure", lazy = true },
351 { "p1xelHer0/gerbil.nvim", lazy = true, ft = "scheme", config = true }, -- Fennel, Luasthp
352 { "jaawerth/fennel.vim", lazy = true, ft = "fennel", config = true },
353 { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel", config = true },
354 { "Olical/nfnl", lazy = true, ft = "fennel", config = true }, -- Rust stuff
355 {
356 "simrat39/rust-tools.nvim",
357 lazy = true,
358 ft = { "rust" },
359 config = function()
360 local rt = require("rust-tools")
361 rt.setup({
362 server = {
363 on_attach = function(_, bufnr)
364 -- Hover actions
365 vim.keymap.set("n", "<C-space>",
366 rt.hover_actions.hover_actions,
367 { buffer = bufnr })
368 -- Code action groups
369 vim.keymap.set("n", "<Leader>a",
370 rt.code_action_group.code_action_group,
371 { buffer = bufnr })
372 end
373 }
374 })
375 end,
376 dependencies = { "nvim-lua/plenary.nvim" }
377 },
378 { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } },
379 {
380 "saecki/crates.nvim",
381 tag = "v0.4.0",
382 dependencies = { "nvim-lua/plenary.nvim" },
383 config = function() require("crates").setup() end,
384 lazy = true,
385 ft = { "rust" }
386 }, -- RISC-V Assembly syntax highlighting
387 { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff
388 -- Hare stuff
389 -- Haredoc
390 {
391 url = "https://git.sr.ht/~torresjrjr/vim-haredoc",
392 lazy = true,
393 ft = { "hare" },
394 branch = "dev"
395 },
396 { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } },
397 -- TCL
398 { "lewis6991/tree-sitter-tcl", lazy = true, build = "make" },
399 -- LF
400 {
401 "ptzz/lf.vim",
402 lazy = true,
403 cmd = { "Lf" },
404 dependencies = { "voldikss/vim-floaterm" }
405 },
406 -- SuperMaven, another AI coding tool
407 {
408 "supermaven-inc/supermaven-nvim",
409 opts = { keymaps = { accept_suggestion = "<C-f>" } },
410 lazy = true,
411 cmd = "SupermavenStart"
412 },
413 { "imsnif/kdl.vim", lazy = true, ft = "kdl" },
414 }
415})