Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

NVIM: heavy refactor, vim-sexp gone, long live paredit

+209 -91
+1 -1
nvim/init.lua
··· 160 160 "make", "meson", "ninja", "yaml", "python", "proto", "racket", "rst", 161 161 "scala", "html", "tsx", "rust", "scheme", "fennel", "lua", "markdown", 162 162 "markdown_inline", "sql", "thrift", "typescript", "verilog", "vim", 163 - "zig", "uxntal", "kdl", "vimdoc" 163 + "zig", "uxntal", "kdl", "vimdoc", "janet_simple" 164 164 } 165 165 }) 166 166
+1 -1
nvim/lua/lsp.lua
··· 49 49 "kotlin_language_server", "java_language_server", "jsonls", "pest_ls", 50 50 "ocamllsp", "reason_ls", "racket_langserver", "rust_analyzer", 51 51 "scheme_langserver", "sqls", "thriftls", "typst_lsp", "vhdl_ls", "yamlls", 52 - "zls", "tsserver", "eslint", "metals", "hare_ls", "futhark_lsp", "roc_ls", 52 + "zls", "tsserver", "eslint", "metals", "futhark_lsp", "roc_ls", 53 53 -- disabled because it's broken 54 54 -- "scheme_langserver", 55 55 }
+207 -89
nvim/lua/plugins.lua
··· 19 19 "shaunsingh/nord.nvim", "shaunsingh/moonlight.nvim", 20 20 "folke/tokyonight.nvim", "cranberry-clockworks/coal.nvim", 21 21 "hardselius/warlock", 22 - {"catppuccin/nvim", name = "catppuccin", priority = 1000}, { 22 + { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, 23 + { 23 24 "neanias/everforest-nvim", 24 25 version = false, 25 26 lazy = false, 26 27 priority = 500, -- make sure to load this before all the other start plugins 27 28 main = "everforest", 28 - opts = {background = "hard"} 29 - }, {"rebelot/kanagawa.nvim", opts = {compile = true}}, 29 + opts = { background = "hard" } 30 + }, 31 + { "rebelot/kanagawa.nvim", opts = { compile = true } }, 30 32 -- show indents and whitespace characters 31 33 "lukas-reineke/indent-blankline.nvim", -- Completion 32 34 -- Completion 33 35 { 34 36 "hrsh7th/nvim-cmp", 35 37 dependencies = { 36 - "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", 37 - "hrsh7th/cmp-vsnip", "hrsh7th/vim-vsnip", "petertriho/cmp-git", 38 + "hrsh7th/cmp-nvim-lsp", 39 + "hrsh7th/cmp-buffer", 40 + "hrsh7th/cmp-path", 41 + --"hrsh7th/cmp-vsnip", 42 + --"hrsh7th/vim-vsnip", 43 + "petertriho/cmp-git", 38 44 "hrsh7th/cmp-cmdline" 39 45 } 40 46 }, -- nvim lsp plugins 41 - "neovim/nvim-lspconfig", { 47 + "neovim/nvim-lspconfig", 48 + { 42 49 "nvimdev/lspsaga.nvim", 43 50 dependencies = { 44 51 "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter" 45 52 }, 46 - opts = {lightbulb = {enable = false}}, 53 + opts = { lightbulb = { enable = false } }, 47 54 event = "LspAttach" 48 - }, -- Syntax Highlighting from the future 55 + }, 49 56 { 57 + -- Syntax Highlighting from the future 50 58 "nvim-treesitter/nvim-treesitter", 51 - init = function() vim.cmd([[":TSUpdate"]]) end, 52 - build = ":TSUpdate" 53 - }, -- Git stuff 59 + --init = function() vim.cmd([[":TSUpdate"]]) end, 60 + main = "nvim-treesitter.configs", 61 + opts = { 62 + ensure_installed = 'all', 63 + ignore_install = { 'norg' }, 64 + sync_intall = true, 65 + highlight = { 66 + enable = true, 67 + }, 68 + }, 69 + build = ":TSUpdate", 70 + version = false, 71 + dependencies = { 72 + "nvim-treesitter/nvim-treesitter-textobjects", 73 + }, 74 + }, -- Git stuff 54 75 -- GitGutter, shows inline difs 55 76 "airblade/vim-gitgutter", -- "tpope/vim-fugitive", -- old git command 56 77 { 57 78 "NeogitOrg/neogit", 58 79 dependencies = { 59 - "nvim-lua/plenary.nvim", -- required 80 + "nvim-lua/plenary.nvim", -- required 60 81 "sindrets/diffview.nvim", -- optional - Diff integration 61 82 "nvim-telescope/telescope.nvim" 62 83 }, 63 84 config = true 64 - }, -- surround with pairs )))))) 65 - -- "tpope/vim-surround", 85 + }, 66 86 -- Auto format tool 67 87 { 68 88 "stevearc/conform.nvim", 69 89 lazy = true, 70 90 opt = { 71 - python = {"isort", "black"}, 72 - lua = {"lua-format"}, 73 - clojure = {"cljfmt"}, 74 - rust = {"rustfmt"}, 75 - haskell = {"ormolu", "stylish-haskell"}, 76 - go = { "goimports", "gofmt"}, 77 - java = {"google-java-format"}, 78 - javascript = {"prettier"}, 79 - html = {"prettier"}, 80 - yaml = {"prettier"}, 81 - sh = {"shfmt"}, 82 - c = {"clang-format"}, 91 + python = { "isort", "black" }, 92 + lua = { "lua-format" }, 93 + clojure = { "cljfmt" }, 94 + rust = { "rustfmt" }, 95 + haskell = { "ormolu", "stylish-haskell" }, 96 + go = { "goimports", "gofmt" }, 97 + java = { "google-java-format" }, 98 + javascript = { "prettier" }, 99 + html = { "prettier" }, 100 + yaml = { "prettier" }, 101 + sh = { "shfmt" }, 102 + c = { "clang-format" }, 83 103 } 84 104 }, 85 105 { ··· 102 122 }, 103 123 { 104 124 "nvim-lualine/lualine.nvim", 105 - dependencies = {"nvim-tree/nvim-web-devicons"} 106 - }, "junegunn/fzf.vim", { 125 + dependencies = { "nvim-tree/nvim-web-devicons" } 126 + }, 127 + "junegunn/fzf.vim", 128 + { 107 129 dir = "~/.fzf", 108 130 build = function() vim.fn["fzf#install"](0) end, 109 - dependencies = {"junegunn/fzf.vim"} 110 - }, -- Polyglot 111 - "sheerun/vim-polyglot", -- Telescope, find anything fast 131 + dependencies = { "junegunn/fzf.vim" } 132 + }, 133 + -- Telescope, find anything fast 112 134 "nvim-lua/plenary.nvim", 113 - {"nvim-telescope/telescope.nvim", dependencies = {"nvim-lua/plenary.nvim"}}, 114 - "nvim-telescope/telescope-symbols.nvim", 115 - {"folke/trouble.nvim", dependencies = "nvim-tree/nvim-web-devicons"}, 135 + { 136 + "nvim-telescope/telescope.nvim", 137 + dependencies = { 138 + "nvim-lua/plenary.nvim", 139 + "nvim-telescope/telescope-symbols.nvim", 140 + } 141 + }, 142 + { 143 + "folke/trouble.nvim", 144 + dependencies = "nvim-tree/nvim-web-devicons" 145 + }, 116 146 -- Which key is bound? 117 147 { 118 148 "folke/which-key.nvim", ··· 120 150 vim.o.timeout = true 121 151 vim.o.timeoutlen = 300 122 152 end, 123 - opts = {}, 124 153 config = true 125 - }, -- literally the best plugin ever 154 + }, -- literally the best plugin ever 126 155 -- Developing my neovim 127 - {"folke/neodev.nvim", opts = {}}, -- Lithsps 128 - {"m4xshen/autoclose.nvim"}, 129 - {"guns/vim-sexp", ft = {"hy", "scheme", "clojure"}}, -- )))))) 130 - {"hiphish/rainbow-delimiters.nvim"}, 131 - -- {"gpanders/nvim-parinfer", ft = {"scheme", "lisp", "fennel", "clojure", "lua"}}, 132 - -- { 133 - -- "eraserhd/parinfer-rust", 134 - -- build = "RUSTFLAGS='-C target-feature=+crt-static' cargo build --release", 135 - -- ft = {"scheme", "lisp", "fennel", "clojure", "lua"}, 136 - -- }, 156 + { "folke/neodev.nvim", config = true }, -- Lithsps 157 + --{ "m4xshen/autoclose.nvim" }, 158 + { 159 + "windwp/nvim-autopairs", 160 + event = "InsertEnter", 161 + config = function() 162 + local pairs = require("nvim-autopairs") 163 + 164 + pairs.setup({ 165 + check_ts = true, 166 + enable_check_bracket_line = false, 167 + }) 168 + 169 + pairs.get_rules("`")[1].not_filetypes = { "clojure", "scheme", "scm", "janet" } 170 + pairs.get_rules("'")[1].not_filetypes = { "clojure", "scheme", "scm", "janet", "rust" } 171 + end, 172 + }, 173 + { 174 + "gpanders/nvim-parinfer", 175 + ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } 176 + }, 177 + --'janet-lang/janet.vim', 178 + -- )))))) 179 + { 180 + "julienvincent/nvim-paredit", 181 + config = function() 182 + local paredit = require('nvim-paredit') 183 + paredit.setup({ 184 + indent = { 185 + enabled = true, 186 + }, 187 + --filetypes = {"clojure", "fennel", "janet"}, 188 + keys = { 189 + ["<localleader>w"] = { 190 + function() 191 + -- place cursor and set mode to `insert` 192 + paredit.cursor.place_cursor( 193 + -- wrap element under cursor with `( ` and `)` 194 + paredit.wrap.wrap_element_under_cursor("( ", ")"), 195 + -- cursor placement opts 196 + { placement = "inner_start", mode = "insert" } 197 + ) 198 + end, 199 + "Wrap element insert head", 200 + }, 201 + 202 + ["<localleader>W"] = { 203 + function() 204 + paredit.cursor.place_cursor( 205 + paredit.wrap.wrap_element_under_cursor("(", ")"), 206 + { placement = "inner_end", mode = "insert" } 207 + ) 208 + end, 209 + "Wrap element insert tail", 210 + }, 211 + -- same as above but for enclosing form 212 + ["<localleader>i"] = { 213 + function() 214 + paredit.cursor.place_cursor( 215 + paredit.wrap.wrap_enclosing_form_under_cursor("( ", ")"), 216 + { placement = "inner_start", mode = "insert" } 217 + ) 218 + end, 219 + "Wrap form insert head", 220 + }, 221 + ["<localleader>I"] = { 222 + function() 223 + paredit.cursor.place_cursor( 224 + paredit.wrap.wrap_enclosing_form_under_cursor("(", ")"), 225 + { placement = "inner_end", mode = "insert" } 226 + ) 227 + end, 228 + "Wrap form insert tail", 229 + }, 230 + ["<localleader>["] = { 231 + function() 232 + paredit.cursor.place_cursor( 233 + paredit.wrap.wrap_enclosing_form_under_cursor("[", "]"), 234 + { placement = "inner_start", mode = "insert" } 235 + ) 236 + end, 237 + }, 238 + ["<localleader>{"] = { 239 + function() 240 + paredit.cursor.place_cursor( 241 + paredit.wrap.wrap_enclosing_form_under_cursor("{", "}"), 242 + { placement = "inner_end", mode = "insert" } 243 + ) 244 + end, 245 + }, 246 + }, 247 + }) 248 + end, 249 + ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } 250 + }, 251 + { 252 + "chiefnoah/nvim-paredit-janet", 253 + dependencies = { "julienvincent/nvim-paredit" }, 254 + lazy = true, 255 + ft = { "janet" }, 256 + config = function() 257 + require("nvim-paredit-janet").setup() 258 + end, 259 + }, 260 + { 261 + "julienvincent/nvim-paredit-fennel", 262 + dependencies = { "julienvincent/nvim-paredit" }, 263 + ft = { "fennel" }, 264 + config = true, 265 + }, 266 + { "hiphish/rainbow-delimiters.nvim" }, 267 + --{ "gpanders/nvim-parinfer", ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" } }, 137 268 -- Conjure, lisp is magical 138 269 { 139 270 "Olical/conjure", 140 - ft = {"scheme", "lisp", "fennel", "clojure", "lua"}, 271 + ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, 141 272 config = function() 142 273 vim.g["conjure#client#scheme#stdio#command"] = "gxi" 143 274 vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" 144 275 end, 145 - dependencies = {"PaterJason/cmp-conjure"} 146 - }, {"PaterJason/cmp-conjure", lazy = true}, 147 - {"p1xelHer0/gerbil.nvim", ft = "scheme"}, -- Fennel, Luasthp 148 - {"jaawerth/fennel.vim", lazy = true, ft = "fennel"}, 149 - {"rktjmp/hotpot.nvim", lazy = true, ft = "fennel"}, 150 - {"Olical/nfnl", ft = "fennel"}, -- Rust stuff 276 + dependencies = { "PaterJason/cmp-conjure" } 277 + }, 278 + { "PaterJason/cmp-conjure", lazy = true }, 279 + { "p1xelHer0/gerbil.nvim", ft = "scheme" }, -- Fennel, Luasthp 280 + { "jaawerth/fennel.vim", lazy = true, ft = "fennel" }, 281 + { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel" }, 282 + { "Olical/nfnl", ft = "fennel" }, -- Rust stuff 151 283 { 152 284 "simrat39/rust-tools.nvim", 153 - ft = {"rust"}, 285 + ft = { "rust" }, 154 286 config = function() 155 287 local rt = require("rust-tools") 156 288 rt.setup({ ··· 158 290 on_attach = function(_, bufnr) 159 291 -- Hover actions 160 292 vim.keymap.set("n", "<C-space>", 161 - rt.hover_actions.hover_actions, 162 - {buffer = bufnr}) 293 + rt.hover_actions.hover_actions, 294 + { buffer = bufnr }) 163 295 -- Code action groups 164 296 vim.keymap.set("n", "<Leader>a", 165 - rt.code_action_group.code_action_group, 166 - {buffer = bufnr}) 297 + rt.code_action_group.code_action_group, 298 + { buffer = bufnr }) 167 299 end 168 300 } 169 301 }) 170 302 end, 171 - dependencies = {"nvim-lua/plenary.nvim"} 172 - }, {"mfussenegger/nvim-dap", lazy = true, ft = {"c", "rust"}}, { 303 + dependencies = { "nvim-lua/plenary.nvim" } 304 + }, 305 + { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } }, 306 + { 173 307 "saecki/crates.nvim", 174 308 tag = "v0.4.0", 175 - dependencies = {"nvim-lua/plenary.nvim"}, 309 + dependencies = { "nvim-lua/plenary.nvim" }, 176 310 config = function() require("crates").setup() end, 177 - ft = {"rust"} 178 - }, -- RISC-V Assembly syntax highlighting 179 - {"kylelaker/riscv.vim", ft = "riscv"}, -- Hare Stuff 311 + ft = { "rust" } 312 + }, -- RISC-V Assembly syntax highlighting 313 + { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff 180 314 -- Haredoc 181 315 { 182 316 url = "https://git.sr.ht/~torresjrjr/vim-haredoc", 183 - ft = {"hare"}, 317 + ft = { "hare" }, 184 318 branch = "dev" 185 - }, -- Hare.vim 186 - {url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = {"hare"}}, -- TCL 187 - {"lewis6991/tree-sitter-tcl", build = "make"}, -- LF 188 - {"ptzz/lf.vim", cmd = {"Lf"}, dependencies = {"voldikss/vim-floaterm"}}, 189 - -- Copilot 190 - -- use {"github/copilot.vim", lazy = true, cmd = {"Copilot"}} 319 + }, -- Hare.vim 320 + { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, -- TCL 321 + { "lewis6991/tree-sitter-tcl", build = "make" }, -- LF 322 + { "ptzz/lf.vim", cmd = { "Lf" }, dependencies = { "voldikss/vim-floaterm" } }, 191 323 -- SuperMaven, another AI coding tool 192 324 { 193 325 "supermaven-inc/supermaven-nvim", 194 - opts = {keymaps = {accept_suggestion = "<C-f>"}} 195 - -- lazy = true, 196 - -- cmd = "SupermavenActivate" 197 - }, -- Mason 198 - -- { 199 - -- "williamboman/mason.nvim", 200 - -- init = function() 201 - -- vim.cmd([[":MasonUpdate"]]) 202 - -- end, 203 - -- dependencies = { 204 - -- "williamboman/mason-lspconfig.nvim", 205 - -- "mfussenegger/nvim-dap", 206 - -- "jose-elias-alvarez/null-ls.nvim" 207 - -- }, 208 - -- config = function() 209 - -- require("mason").setup() 210 - -- end 211 - -- }, 326 + opts = { keymaps = { accept_suggestion = "<C-f>" } }, 327 + lazy = true, 328 + cmd = "SupermavenActivate" 329 + }, 212 330 "imsnif/kdl.vim" 213 331 }, nil)