Something went wrong. Try again.
Configuration for my NixOS based systems and Home Manager
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428-- Bootstrap lazy.nvimlocal ensure_lazy = function() 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", "https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release lazypath }) end vim.opt.rtp:prepend(lazypath)end
local lazy_bootstrap = ensure_lazy()if lazy_bootstrap then print("Bootstrapped lazy.nvim") end
require("lazy").setup({ install = { colorscheme = { "catppuccin-latte" } }, checker = { enabled = false }, spec = { -- Color themes { "shaunsingh/nord.nvim", priority = 1000, lazy = true }, { "shaunsingh/moonlight.nvim", priority = 1000, lazy = true }, { "folke/tokyonight.nvim", priority = 1000, lazy = true }, { "cranberry-clockworks/coal.nvim", priority = 1000, lazy = true }, { "hardselius/warlock", priority = 1000, lazy = true }, { "sontungexpt/witch", priority = 1000, lazy = true, config = true }, { "rose-pine/neovim", priority = 1000, lazy = true }, { "catppuccin/nvim", name = "catppuccin", priority = 1000, lazy = true }, { "p00f/alabaster.nvim", priority = 1000, lazy = true }, { "neanias/everforest-nvim", version = false, lazy = true, priority = 1000, -- make sure to load this before all the other start plugins main = "everforest", opts = { background = "hard" } }, { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true }, { 'jesseleite/nvim-noirbuddy', dependencies = { 'tjdevries/colorbuddy.nvim', 'nvim-lualine/lualine.nvim' }, lazy = true, priority = 1000, config = function(_, opts) -- configure lualine require('noirbuddy').setup(opts) local noirbuddy_lualine = require("noirbuddy.plugins.lualine") require("lualine").setup { options = { icons_enabled = true, --theme = "auto" theme = noirbuddy_lualine.theme }, sections = noirbuddy_lualine.sections, inactive_sections = noirbuddy_lualine.inactive_sections, } end, opts = { -- All of your `setup(opts)` will go here preset = "oxide", colors = { noir_8 = "#3A4649" } }, }, -- Completion { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", "hrsh7th/cmp-vsnip", "hrsh7th/vim-vsnip", "petertriho/cmp-git", "hrsh7th/cmp-cmdline" }, config = require('completion') }, -- nvim lsp plugins { "neovim/nvim-lspconfig", config = false }, { "chiefnoah/treecalc", name = "treecalc.nvim", lazy = false, dependencies = { "nvim-treesitter/nvim-treesitter" }, build = ":TSInstall treecalc", init = function() vim.g.treecalc_lsp_cmd = { vim.fn.expand("~/repos/treecalc/target/release/tc-lsp"), } end, }, -- LSP Goodness { "ray-x/navigator.lua", dependencies = { { 'ray-x/guihua.lua', build = 'cd lua/fzy && make' }, { 'neovim/nvim-lspconfig' }, }
}, { -- Syntax Highlighting from the future "nvim-treesitter/nvim-treesitter", branch = "main", --init = function() vim.cmd([[":TSUpdate"]]) end, main = "nvim-treesitter", opts = {}, config = function(_, opts) require("nvim-treesitter").setup(opts) vim.api.nvim_create_autocmd("FileType", { callback = function() pcall(vim.treesitter.start) end, }) end, build = ":TSUpdate", version = false, }, { "nvim-treesitter/nvim-treesitter-context", enabled = false }, -- Git stuff -- -- GitGutter, shows inline difs --"airblade/vim-gitgutter", { "NeogitOrg/neogit", dependencies = { "nvim-lua/plenary.nvim", -- required "sindrets/diffview.nvim", -- optional - Diff integration "nvim-telescope/telescope.nvim" }, config = true }, -- Auto format tool { "stevearc/conform.nvim", lazy = true, opts = { python = { "isort", "black" }, lua = { "lua-format" }, clojure = { "cljfmt" }, rust = { "rustfmt" }, haskell = { "ormolu", "stylish-haskell" }, go = { "goimports", "gofmt" }, java = { "google-java-format" }, javascript = { "prettierd", "prettier", stop_after_first = true }, typescript = { "prettierd", "prettier", stop_after_first = true }, html = { "prettierd", "prettier", stop_after_first = true }, yaml = { "prettier" }, sh = { "shfmt" }, c = { "clang-format" }, } }, --{ -- "hedyhli/outline.nvim", -- lazy = true, -- cmd = { "Outline", "OutlineOpen" }, -- config = true, -- keys = { -- { "<leader>o", "<cmd>Outline<cr>", desc = "Toggle outline" }, -- }, --}, { "ray-x/go.nvim", ft = "go", lazy = true, dependencies = { "ray-x/guihua.lua", "neovim/nvim-lspconfig", "nvim-treesitter/nvim-treesitter" } }, { "nvim-lualine/lualine.nvim", config = true, dependencies = { "nvim-tree/nvim-web-devicons" } }, -- Fuzzy finding stuff "ibhagwan/fzf-lua", { url = "git@tangled.org:ngp.computer/brokencode", name = "brokencode.nvim", config = true, }, -- A lua + nvim stdlib sort of thing { "nvim-lua/plenary.nvim", lazy = true, }, -- Telescope, find anything fast { "nvim-telescope/telescope.nvim", config = true, dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope-symbols.nvim", "nvim-telescope/telescope-fzf-native.nvim" } }, { "folke/trouble.nvim", dependencies = "nvim-tree/nvim-web-devicons", config = true, }, -- Which key is bound? -- literally the best plugin ever { "folke/which-key.nvim", init = function() vim.o.timeout = true vim.o.timeoutlen = 300 end, config = true }, -- Developing my neovim { "folke/lazydev.nvim", config = true, ft = "lua", lazy = true, opts = { library = { path = "luvit-meta/library", words = { "vim%.uv" }, }, }, dependencies = { "Bilal2453/luvit-meta" }, }, -- Lithsps { "windwp/nvim-autopairs", event = "InsertEnter", config = function() local pairs = require("nvim-autopairs")
pairs.setup({ check_ts = true, enable_check_bracket_line = false, })
pairs.get_rules("`")[1].not_filetypes = { "clojure", "scheme", "scm", "janet" } pairs.get_rules("'")[1].not_filetypes = { "clojure", "scheme", "scm", "janet", "rust" } end, }, -- This gives me the paredit engine, it's pretty nifty { "gpanders/nvim-parinfer", ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" }, lazy = true, config = function() --vim.g.parinfer_comment_chars = { ";" } vim.g.parinfer_force_balance = true end }, -- )))))) -- This one gives me vim-sexp like structural editing { "julienvincent/nvim-paredit", config = function() local paredit = require('nvim-paredit') paredit.setup({ indent = { enabled = true, }, filetypes = { "clojure", "fennel", "janet" }, }) end, lazy = true, ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } }, { "hiphish/rainbow-delimiters.nvim", priority = 1050, ft = { "scheme", "scm", "clojure", "janet", "lisp" } }, -- Conjure, lisp is magical { "Olical/conjure", dependencies = { "PaterJason/cmp-conjure" }, init = function() vim.g["conjure#mapping#doc_word"] = "K" end, config = function() vim.g["conjure#client#scheme#stdio#command"] = "gxi" vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" end, lazy = true, ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, }, { "PaterJason/cmp-conjure", lazy = true }, { "p1xelHer0/gerbil.nvim", lazy = true, ft = "scheme", config = true }, -- Fennel, Luasthp { "jaawerth/fennel.vim", lazy = true, ft = "fennel", config = true }, { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel", config = true }, { "Olical/nfnl", lazy = true, ft = "fennel", config = true }, -- Rust stuff { "mrcjkb/rustaceanvim", lazy = false, version = "^9", config = function() vim.g.rustaceanvim = { server = { settings = { ['rust-analyzer'] = { files = { excludeDirs = { "target", ".cargo", ".direnv" }, }, }, }, }, } end, }, { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } }, { "saecki/crates.nvim", tag = "v0.7.1", dependencies = { "nvim-lua/plenary.nvim" }, config = function() require("crates").setup() end, lazy = true, ft = { "rust" } }, -- TCL { "lewis6991/tree-sitter-tcl", lazy = true, build = "make", ft = { "tcl" } }, { "chiefnoah/tree-sitter-rcsh", build = "make", lazy = false, }, { "chiefnoah/tree-sitter-mk", build = "make", lazy = false, }, -- LF { "ptzz/lf.vim", lazy = true, cmd = { "Lf" }, dependencies = { "voldikss/vim-floaterm" } }, { "imsnif/kdl.vim", lazy = true, ft = "kdl" }, { "catgoose/nvim-colorizer.lua", lazy = true, ft = { "css", "html", "toml", "conf" } }, { "lewis6991/gitsigns.nvim", config = true, opts = { on_attach = function(bufnr) local gitsigns = require('gitsigns')
local function map(mode, l, r, opts) opts = opts or {} opts.buffer = bufnr vim.keymap.set(mode, l, r, opts) end
-- Navigation map('n', ']c', function() if vim.wo.diff then vim.cmd.normal({ ']c', bang = true }) else gitsigns.nav_hunk('next') end end)
map('n', '[c', function() if vim.wo.diff then vim.cmd.normal({ '[c', bang = true }) else gitsigns.nav_hunk('prev') end end)
-- Actions map('n', '<leader>gs', gitsigns.stage_hunk) map('n', '<leader>gr', gitsigns.reset_hunk)
map('v', '<leader>gs', function() gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end)
map('v', '<leader>gr', function() gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) end)
map('n', '<leader>gS', gitsigns.stage_buffer) map('n', '<leader>gR', gitsigns.reset_buffer) map('n', '<leader>gp', gitsigns.preview_hunk) map('n', '<leader>gi', gitsigns.preview_hunk_inline)
map('n', '<leader>gb', function() gitsigns.blame_line({ full = true }) end)
map('n', '<leader>gd', gitsigns.diffthis)
map('n', '<leader>gD', function() gitsigns.diffthis('~') end)
map('n', '<leader>gQ', function() gitsigns.setqflist('all') end) map('n', '<leader>gq', gitsigns.setqflist)
-- Toggles map('n', '<leader>gtb', gitsigns.toggle_current_line_blame) map('n', '<leader>gtw', gitsigns.toggle_word_diff)
-- Text object map({ 'o', 'x' }, 'ih', gitsigns.select_hunk) end } }, { "Bowuigi/acme-nvim", config = function() local acme = require('acme') local opts = { noremap = true, silent = true } vim.keymap.set("n", "<leader>ee", acme.exec, opts) vim.keymap.set("v", "<leader>ee", acme.exec, opts) vim.keymap.set("v", "<leader>et", acme.tagline, opts) vim.keymap.set("v", "<leader>em", acme.mark, opts) end }, { "rachartier/tiny-cmdline.nvim", config = true }, { "sindrets/diffview.nvim", config = true } }})