diff --git a/nvim/init.lua b/nvim/init.lua index 054a73c..07023f9 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -4,20 +4,17 @@ vim.g.maplocalleader = "," -- These need to happend before we load plugins -- Load Plugins require("plugins") --- Color Scheme -vim.cmd.colorscheme "catppuccin" --- vim.cmd([[colorscheme kanagawa]]) -- Config for Nord, which I usually use -- vim.g.nord_italic = false -- vim.g.nord_bold = false -- vim.opt.background = "light" -vim.opt.background = "dark" +--vim.opt.background = "dark" -- Formatting and vim config vim.opt.expandtab = true vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 -vim.opt.termguicolors = true +--vim.opt.termguicolors = true vim.opt.cursorcolumn = true vim.opt.cursorline = true vim.opt.hidden = true @@ -27,21 +24,28 @@ vim.opt.number = false vim.opt.relativenumber = false -- I don't like word wrapping vim.opt.wrap = false -vim.opt.mouse = vim.opt.mouse - "a" --- TODO: revisit this -vim.opt.foldlevelstart = 20 -vim.opt.conceallevel = 3 -- Show whitespace as dots vim.opt.lcs = vim.opt.lcs + "space:ยท" vim.opt.list = true vim.opt.textwidth = 88 -- LuaLine Config -require("lualine").setup({options = {icons_enabled = true, theme = "auto"}}) + +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, +} -- CTags vim.opt.tags = vim.opt.tags + vim.fn.expand("~/.local/tmp/ctags") + - vim.fn.expand("~/repos/gerbil/src/TAGS") + vim.fn.expand("~/repos/gerbil/src/TAGS") -- Conjure @@ -71,8 +75,8 @@ vim.api.nvim_create_user_command("ConjureChicken", set_chicken, {}) -- KEYMAPS local keymap = vim.keymap.set -local noremap = {noremap = true} -local silentnoremap = {noremap = true, silent = true} +local noremap = { noremap = true } +local silentnoremap = { noremap = true, silent = true } -- Easier breaking from edit modes keymap("n", ";;", "", noremap) keymap("v", ";;", "", noremap) @@ -102,6 +106,7 @@ keymap("n", "hs", "split", noremap) -- Toggle Line Numbers keymap("n", "n", "set number! number?", silentnoremap) +keymap("n", "N", "set relativenumber! relativenumber?", silentnoremap) -- Edit this file keymap("n", "ec", "e $MYVIMRC", silentnoremap) @@ -124,22 +129,28 @@ keymap("n", "", "zh", silentnoremap) keymap("n", "", "zl", silentnoremap) -- Telescope -keymap({"n", "i", "v"}, "", "Telescope", silentnoremap) +keymap({ "n", "i", "v" }, "", "Telescope", silentnoremap) -- LSP Documentation viewer keymap("n", "K", "lua vim.lsp.buf.hover()", silentnoremap) +-- Lf +keymap("n", "L", "Lf", silentnoremap) + +-- Neogit +keymap("n", "g", "Neogit", silentnoremap) + -- Autoformat! vim.api.nvim_create_user_command("Format", function(args) - local range = nil - if args.count ~= -1 then - local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] - range = { - start = { args.line1, 0 }, - ["end"] = { args.line2, end_line:len() }, - } - end - require("conform").format({ async = true, lsp_format = "fallback", range = range }) + local range = nil + if args.count ~= -1 then + local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] + range = { + start = { args.line1, 0 }, + ["end"] = { args.line2, end_line:len() }, + } + end + require("conform").format({ async = true, lsp_format = "fallback", range = range }) end, { range = true }) keymap("n", "", "Format", silentnoremap) @@ -151,5 +162,3 @@ vim.g.python3_host_prog = vim.fn.expand("~/.envs/nvim/bin/python3") -- ######################## -- LSP require("lsp") --- Completion -require("completion") diff --git a/nvim/lua/completion.lua b/nvim/lua/completion.lua index 201e7b0..c21a2be 100644 --- a/nvim/lua/completion.lua +++ b/nvim/lua/completion.lua @@ -1,42 +1,44 @@ -- Copied from https://github.com/hrsh7th/nvim-cmp/?tab=readme-ov-file#recommended-configuration -local cmp = require('cmp') -cmp.setup({ - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - end - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered() - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }) -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }), - sources = cmp.config.sources({ - { name = 'lazydev', group_index = 0}, - { name = 'nvim_lsp' }, - { name = 'vsnip' }, -- For vsnip users. - { name = 'supermaven' }, - { name = 'conjure' }, - }, - {{ name = 'buffer' }}) -}) -require("cmp_git").setup() --- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { { name = 'buffer' } } -}) +return function() + local cmp = require('cmp') + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + end + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered() + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }) -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'lazydev', group_index = 0 }, + { name = 'nvim_lsp' }, + { name = 'vsnip' }, -- For vsnip users. + { name = 'supermaven' }, + { name = 'conjure' }, + }, + { { name = 'buffer' } }) + }) + require("cmp_git").setup() + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { { name = 'buffer' } } + }) --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), - matching = { disallow_symbol_nonprefix_matching = false } -}) + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }), + matching = { disallow_symbol_nonprefix_matching = false } + }) +end diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua index dc6b693..7f23aa5 100644 --- a/nvim/lua/lsp.lua +++ b/nvim/lua/lsp.lua @@ -15,7 +15,7 @@ nvim_lsp.pylsp.setup({ "pants.toml", "pyproject.toml", "setup.py", "setup.cfg", "Pipfile" } return util.find_git_ancestor(fname) or - util.root_pattern(unpack(root_files))(fname) + util.root_pattern(unpack(root_files))(fname) end }) nvim_lsp.lua_ls.setup { @@ -27,14 +27,14 @@ nvim_lsp.lua_ls.setup { }, diagnostics = { -- Get the language server to recognize the `vim` global - globals = {"vim"} + globals = { "vim" } }, workspace = { -- Make the server aware of Neovim runtime files library = vim.api.nvim_get_runtime_file("", true) }, -- Do not send telemetry data containing a randomized but unique identifier - telemetry = {enable = false} + telemetry = { enable = false } } } } @@ -42,14 +42,16 @@ nvim_lsp.lua_ls.setup { nvim_lsp.janet_lsp.setup { cmd = { "janet", - "/home/noah/repos/janet-lsp/src/main.janet", - "--stdio" + "-i", + "/home/noah/repos/janet-lsp/jpm_tree/lib/janet-lsp.jimage", + "--stdio", } } -- LSPs that just use default config local simple_lsps = { - "nil_ls", "htmx", "bzl", "bufls", "crystalline", "dockerls", + --"htmx", + "nil_ls", "bzl", "bufls", "crystalline", "dockerls", "erlangls", "elixirls", "fortls", "gleam", "gopls", "hls", "jsonls", "vimls", "asm_lsp", "ccls", "pyright", -- ruff", idk if this is wrong? "ruff_lsp", "clojure_lsp", "guile_ls", @@ -57,14 +59,16 @@ local simple_lsps = { "kotlin_language_server", "java_language_server", "jsonls", "pest_ls", "ocamllsp", "reason_ls", "racket_langserver", "rust_analyzer", "scheme_langserver", "sqls", "thriftls", "typst_lsp", "vhdl_ls", "yamlls", - "zls", "tsserver", "eslint", "metals", "futhark_lsp", "roc_ls", + "zls", "ts_ls", "eslint", "metals", "futhark_lsp", "roc_ls", -- disabled because it's broken -- "scheme_langserver", } -- #simple_lsps is the length of the table when treated as a list... funky! -for _, v in pairs(simple_lsps) do nvim_lsp[v].setup { - capabilities = capabilities -} end +for _, v in pairs(simple_lsps) do + nvim_lsp[v].setup { + capabilities = capabilities + } +end nvim_lsp.fennel_ls.setup({ capabilities = capabilities, @@ -76,7 +80,7 @@ local on_attach = function(ev) -- Enable completion triggered by vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' - local opts = {noremap = true, silent = true, buffer = ev.buf} + local opts = { noremap = true, silent = true, buffer = ev.buf } local protocol = require("vim.lsp.protocol") -- Mappings. -- See `:help vim.lsp.*` for documentation on any of the below functions @@ -99,7 +103,7 @@ local on_attach = function(ev) vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) vim.keymap.set("n", "q", vim.diagnostic.setloclist, opts) vim.keymap.set("n", "f", - function() vim.lsp.buf.format {async = true} end, opts) + function() vim.lsp.buf.format { async = true } end, opts) vim.keymap.set("n", "s", vim.lsp.buf.workspace_symbol, opts) -- require'completion'.on_attach(client, bufnr) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index e8b917d..d605555 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -15,339 +15,416 @@ local lazy_bootstrap = ensure_lazy() if lazy_bootstrap then print("Bootstrapped lazy.nvim") end require("lazy").setup({ - -- Color themes - "shaunsingh/nord.nvim", "shaunsingh/moonlight.nvim", - "folke/tokyonight.nvim", "cranberry-clockworks/coal.nvim", - "hardselius/warlock", - { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, - { - "neanias/everforest-nvim", - version = false, - lazy = false, - priority = 500, -- make sure to load this before all the other start plugins - main = "everforest", - opts = { background = "hard" } - }, - { "rebelot/kanagawa.nvim", opts = { compile = true } }, - -- show indents and whitespace characters - "lukas-reineke/indent-blankline.nvim", -- Completion - -- 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" - } - }, -- nvim lsp plugins - { - "neovim/nvim-lspconfig", - }, - { - "nvimdev/lspsaga.nvim", - dependencies = { - "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter" + install = { colorscheme = { "noirbuddy" } }, + checker = { enabled = true }, + 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 }, + { "catppuccin/nvim", name = "catppuccin", 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" } }, - opts = { lightbulb = { enable = false } }, - event = "LspAttach" - }, - { - -- Syntax Highlighting from the future - "nvim-treesitter/nvim-treesitter", - --init = function() vim.cmd([[":TSUpdate"]]) end, - main = "nvim-treesitter.configs", - opts = { - ensure_installed = 'all', - ignore_install = { 'norg' }, - sync_intall = true, - highlight = { - enable = true, + { "rebelot/kanagawa.nvim", opts = { compile = true }, priority = 1000, lazy = true }, + { + 'jesseleite/nvim-noirbuddy', + dependencies = { + 'tjdevries/colorbuddy.nvim', }, - indent = { - enable = false, + lazy = true, + priority = 1000, + opts = { + -- All of your `setup(opts)` will go here + preset = "oxide", + colors = { + noir_8 = "#3A4649" + } }, }, - build = ":TSUpdate", - version = false, - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", + -- 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", }, - }, -- Git stuff - -- GitGutter, shows inline difs - "airblade/vim-gitgutter", -- "tpope/vim-fugitive", -- old git command - { - "NeogitOrg/neogit", - dependencies = { - "nvim-lua/plenary.nvim", -- required - "sindrets/diffview.nvim", -- optional - Diff integration - "nvim-telescope/telescope.nvim" + -- 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", + --init = function() vim.cmd([[":TSUpdate"]]) end, + main = "nvim-treesitter.configs", + opts = { + ensure_installed = 'all', + ignore_install = { 'norg' }, + sync_intall = true, + highlight = { + enable = true, + }, + indent = { + enable = false, + }, + }, + build = ":TSUpdate", + version = false, + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + "nvim-treesitter/nvim-treesitter-context", + }, + }, -- 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 }, - config = true - }, - -- Auto format tool - { - "stevearc/conform.nvim", - lazy = true, - opt = { - python = { "isort", "black" }, - lua = { "lua-format" }, - clojure = { "cljfmt" }, - rust = { "rustfmt" }, - haskell = { "ormolu", "stylish-haskell" }, - go = { "goimports", "gofmt" }, - java = { "google-java-format" }, - javascript = { "prettier" }, - html = { "prettier" }, - yaml = { "prettier" }, - sh = { "shfmt" }, - c = { "clang-format" }, - } - }, - { - "hedyhli/outline.nvim", - lazy = true, - cmd = { "Outline", "OutlineOpen" }, - config = true, - keys = { - { "o", "Outline", desc = "Toggle outline" }, + -- 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 = { "prettier" }, + html = { "prettier" }, + yaml = { "prettier" }, + sh = { "shfmt" }, + c = { "clang-format" }, + } }, - }, - { - "ray-x/go.nvim", - ft = "go", - lazy = true, - dependencies = { - "ray-x/guihua.lua", "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter" - } - }, - { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" } - }, - "junegunn/fzf.vim", - { - dir = "~/.fzf", - build = function() vim.fn["fzf#install"](0) end, - dependencies = { "junegunn/fzf.vim" } - }, - -- Telescope, find anything fast - "nvim-lua/plenary.nvim", - { - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-symbols.nvim", - } - }, - { - "folke/trouble.nvim", - dependencies = "nvim-tree/nvim-web-devicons" - }, - -- 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", - opts = { - library = { - path = "luvit-meta/library", words = { "vim%.uv" }, + { + "hedyhli/outline.nvim", + lazy = true, + cmd = { "Outline", "OutlineOpen" }, + config = true, + keys = { + { "o", "Outline", desc = "Toggle outline" }, }, }, - dependencies = { - "Bilal2453/luvit-meta" + { + "ray-x/go.nvim", + ft = "go", + lazy = true, + dependencies = { + "ray-x/guihua.lua", "neovim/nvim-lspconfig", + "nvim-treesitter/nvim-treesitter" + } }, - }, - -- Lithsps - --{ "m4xshen/autoclose.nvim" }, - { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = function() - local pairs = require("nvim-autopairs") + { + "nvim-lualine/lualine.nvim", + config = function(_spec, _opt) + local noirbuddy_lualine = require("noirbuddy.plugins.lualine") + require("lualine").setup { + options = { + icons_enabled = true, + -- when not using noirbuddy, uncomment this + --theme = "auto" + theme = noirbuddy_lualine.theme + }, + sections = noirbuddy_lualine.sections, + inactive_sections = noirbuddy_lualine.inactive_sections, + } + end, + dependencies = { "nvim-tree/nvim-web-devicons", "jesseleite/nvim-noirbuddy" } + }, + -- Fuzzy finding stuff + "junegunn/fzf.vim", + { + dir = "~/.fzf", + build = function() vim.fn["fzf#install"](0) end, + dependencies = { "junegunn/fzf.vim" } + }, + -- 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", + } + }, + { + "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.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, - }, - { - "gpanders/nvim-parinfer", - ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" }, - config = function() - vim.g.parinfer_comment_chars = { ";", "#" } - vim.g.parinfer_force_balance = true - end - }, - -- )))))) - { - "julienvincent/nvim-paredit", - config = function() - local paredit = require('nvim-paredit') - paredit.setup({ - indent = { - enabled = true, - }, - --filetypes = {"clojure", "fennel", "janet"}, - keys = { - ["w"] = { - function() - -- place cursor and set mode to `insert` - paredit.cursor.place_cursor( - -- wrap element under cursor with `( ` and `)` - paredit.wrap.wrap_element_under_cursor("( ", ")"), - -- cursor placement opts - { placement = "inner_start", mode = "insert" } - ) - end, - "Wrap element insert head", + 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"}, + keys = { + ["w"] = { + function() + -- place cursor and set mode to `insert` + paredit.cursor.place_cursor( + -- wrap element under cursor with `( ` and `)` + paredit.wrap.wrap_element_under_cursor("( ", ")"), + -- cursor placement opts + { placement = "inner_start", mode = "insert" } + ) + end, + "Wrap element insert head", + }, - ["W"] = { - function() - paredit.cursor.place_cursor( - paredit.wrap.wrap_element_under_cursor("(", ")"), - { placement = "inner_end", mode = "insert" } - ) - end, - "Wrap element insert tail", - }, - -- same as above but for enclosing form - ["i"] = { - function() - paredit.cursor.place_cursor( - paredit.wrap.wrap_enclosing_form_under_cursor("( ", ")"), - { placement = "inner_start", mode = "insert" } - ) - end, - "Wrap form insert head", + ["W"] = { + function() + paredit.cursor.place_cursor( + paredit.wrap.wrap_element_under_cursor("(", ")"), + { placement = "inner_end", mode = "insert" } + ) + end, + "Wrap element insert tail", + }, + -- same as above but for enclosing form + ["i"] = { + function() + paredit.cursor.place_cursor( + paredit.wrap.wrap_enclosing_form_under_cursor("( ", ")"), + { placement = "inner_start", mode = "insert" } + ) + end, + "Wrap form insert head", + }, + ["I"] = { + function() + paredit.cursor.place_cursor( + paredit.wrap.wrap_enclosing_form_under_cursor("(", ")"), + { placement = "inner_end", mode = "insert" } + ) + end, + "Wrap form insert tail", + }, + ["["] = { + function() + paredit.cursor.place_cursor( + paredit.wrap.wrap_enclosing_form_under_cursor("[", "]"), + { placement = "inner_start", mode = "insert" } + ) + end, + }, + ["{"] = { + function() + paredit.cursor.place_cursor( + paredit.wrap.wrap_enclosing_form_under_cursor("{", "}"), + { placement = "inner_end", mode = "insert" } + ) + end, + }, }, - ["I"] = { - function() - paredit.cursor.place_cursor( - paredit.wrap.wrap_enclosing_form_under_cursor("(", ")"), - { placement = "inner_end", mode = "insert" } - ) - end, - "Wrap form insert tail", - }, - ["["] = { - function() - paredit.cursor.place_cursor( - paredit.wrap.wrap_enclosing_form_under_cursor("[", "]"), - { placement = "inner_start", mode = "insert" } - ) - end, - }, - ["{"] = { - function() - paredit.cursor.place_cursor( - paredit.wrap.wrap_enclosing_form_under_cursor("{", "}"), - { placement = "inner_end", mode = "insert" } - ) - end, - }, - }, - }) - end, - ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } - }, - { - "chiefnoah/nvim-paredit-janet", - dependencies = { "julienvincent/nvim-paredit" }, - lazy = true, - ft = { "janet" }, - config = function() - require("nvim-paredit-janet").setup() - end, - }, - { - "julienvincent/nvim-paredit-fennel", - dependencies = { "julienvincent/nvim-paredit" }, - ft = { "fennel" }, - config = true, - }, - { "hiphish/rainbow-delimiters.nvim" }, - --{ "gpanders/nvim-parinfer", ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" } }, - -- Conjure, lisp is magical - { - "Olical/conjure", - ft = { "scheme", "scm", "lisp", "fennel", "clojure", "lua", "janet" }, - config = function() - vim.g["conjure#client#scheme#stdio#command"] = "gxi" - vim.g["conjure#client#scheme#stdio#prompt_pattern"] = "%d*> $?" - end, - dependencies = { "PaterJason/cmp-conjure" } - }, - { "PaterJason/cmp-conjure", lazy = true }, - { "p1xelHer0/gerbil.nvim", ft = "scheme" }, -- Fennel, Luasthp - { "jaawerth/fennel.vim", lazy = true, ft = "fennel" }, - { "rktjmp/hotpot.nvim", lazy = true, ft = "fennel" }, - { "Olical/nfnl", ft = "fennel" }, -- Rust stuff - { - "simrat39/rust-tools.nvim", - ft = { "rust" }, - config = function() - local rt = require("rust-tools") - rt.setup({ - server = { - on_attach = function(_, bufnr) - -- Hover actions - vim.keymap.set("n", "", - rt.hover_actions.hover_actions, - { buffer = bufnr }) - -- Code action groups - vim.keymap.set("n", "a", - rt.code_action_group.code_action_group, - { buffer = bufnr }) - end + }) + end, + lazy = true, + ft = { "hy", "scheme", "scm", "clojure", "fennel", "janet", "lisp", "python", "lua" } + }, + { + "chiefnoah/nvim-paredit-janet", + dependencies = { "julienvincent/nvim-paredit" }, + lazy = true, + ft = { "janet" }, + config = function() + require("nvim-paredit-janet").setup() + end, + }, + { + "julienvincent/nvim-paredit-fennel", + dependencies = { "julienvincent/nvim-paredit" }, + lazy = true, + ft = { "fennel" }, + config = true, + }, + { + "ekaitz-zarraga/nvim-paredit-scheme", + lazy = true, + ft = { "scheme" }, + config = function() + require("nvim-paredit-scheme").setup(require("nvim-paredit")) + end, + }, + { "hiphish/rainbow-delimiters.nvim", priority = 1050, }, + -- Conjure, lisp is magical + { + "Olical/conjure", + dependencies = { "PaterJason/cmp-conjure" }, + 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 + { + "simrat39/rust-tools.nvim", + lazy = true, + ft = { "rust" }, + config = function() + local rt = require("rust-tools") + rt.setup({ + server = { + on_attach = function(_, bufnr) + -- Hover actions + vim.keymap.set("n", "", + rt.hover_actions.hover_actions, + { buffer = bufnr }) + -- Code action groups + vim.keymap.set("n", "a", + rt.code_action_group.code_action_group, + { buffer = bufnr }) + end + } + }) + end, + dependencies = { "nvim-lua/plenary.nvim" } + }, + { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" }, config = true }, + { + "saecki/crates.nvim", + tag = "v0.4.0", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() require("crates").setup() end, + lazy = true, + ft = { "rust" } + }, -- RISC-V Assembly syntax highlighting + { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff + -- Hare stuff + -- Haredoc + { + url = "https://git.sr.ht/~torresjrjr/vim-haredoc", + lazy = true, + ft = { "hare" }, + branch = "dev" + }, + { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, + -- TCL + { "lewis6991/tree-sitter-tcl", lazy = true, build = "make" }, + -- LF + { + "ptzz/lf.vim", + lazy = true, + cmd = { "Lf" }, + dependencies = { "voldikss/vim-floaterm" } + }, + -- SuperMaven, another AI coding tool + { + "supermaven-inc/supermaven-nvim", + opts = { keymaps = { accept_suggestion = "" } }, + lazy = true, + cmd = "SupermavenStart" + }, + { "imsnif/kdl.vim", lazy = true, ft = "kdl" }, + { + "epwalsh/obsidian.nvim", + lazy = true, + ft = "markdown", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + workspaces = { + { name = "Athenaeum", path = "~/Documents/Athenaeum" }, + -- Mage, the Awakening and other Chronicles of Darkness + { name = "Celestial Grimoire", path = "~/Documents/Celestial Grimoire" }, + { name = "Infleqtion", path = "~/Documents/infleqtion-vault" }, } - }) - end, - dependencies = { "nvim-lua/plenary.nvim" } - }, - { "mfussenegger/nvim-dap", lazy = true, ft = { "c", "rust" } }, - { - "saecki/crates.nvim", - tag = "v0.4.0", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() require("crates").setup() end, - ft = { "rust" } - }, -- RISC-V Assembly syntax highlighting - { "kylelaker/riscv.vim", ft = "riscv" }, -- Hare Stuff - -- Haredoc - { - url = "https://git.sr.ht/~torresjrjr/vim-haredoc", - ft = { "hare" }, - branch = "dev" - }, -- Hare.vim - { url = "https://git.sr.ht/~sircmpwn/hare.vim", ft = { "hare" } }, -- TCL - { "lewis6991/tree-sitter-tcl", build = "make" }, -- LF - { "ptzz/lf.vim", cmd = { "Lf" }, dependencies = { "voldikss/vim-floaterm" } }, - -- SuperMaven, another AI coding tool - { - "supermaven-inc/supermaven-nvim", - opts = { keymaps = { accept_suggestion = "" } }, - lazy = true, - cmd = "SupermavenStart" - }, - "imsnif/kdl.vim" -}, nil) + } + }, + } +})