From 804f2a342d1b2002ad383ff604e75eb0caba8f65 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 13 Nov 2024 06:17:23 -0600 Subject: ton of new stuff --- fnl/plugins/bufresize.fnl | 1 - fnl/plugins/cmp.fnl | 6 +++--- fnl/plugins/compiler_explorer.fnl | 6 ++++++ fnl/plugins/dap.fnl | 20 ++++++++++++++++++++ fnl/plugins/dressing.fnl | 2 ++ fnl/plugins/edgy.fnl | 14 ++++++++++++++ fnl/plugins/gitsigns.fnl | 1 - fnl/plugins/lsp_signature.fnl | 1 - fnl/plugins/lspconfig.fnl | 2 +- fnl/plugins/matchparen.fnl | 1 - fnl/plugins/neo_tree.fnl | 3 ++- fnl/plugins/notify.fnl | 2 +- fnl/plugins/persistent_breakpoints.fnl | 2 ++ fnl/plugins/sniprun.fnl | 2 ++ fnl/plugins/startup.fnl | 2 +- fnl/plugins/toggleterm.fnl | 2 +- fnl/plugins/treesitter.fnl | 2 +- fnl/plugins/which_key.fnl | 30 +++++++++++++++++++++++++++++- fnl/plugins/wilder.fnl | 3 ++- fnl/plugins/winshift.fnl | 1 - 20 files changed, 87 insertions(+), 16 deletions(-) delete mode 100644 fnl/plugins/bufresize.fnl create mode 100644 fnl/plugins/compiler_explorer.fnl create mode 100644 fnl/plugins/dap.fnl create mode 100644 fnl/plugins/dressing.fnl create mode 100644 fnl/plugins/edgy.fnl delete mode 100644 fnl/plugins/gitsigns.fnl delete mode 100644 fnl/plugins/lsp_signature.fnl delete mode 100644 fnl/plugins/matchparen.fnl create mode 100644 fnl/plugins/persistent_breakpoints.fnl create mode 100644 fnl/plugins/sniprun.fnl delete mode 100644 fnl/plugins/winshift.fnl (limited to 'fnl/plugins') diff --git a/fnl/plugins/bufresize.fnl b/fnl/plugins/bufresize.fnl deleted file mode 100644 index e495e26..0000000 --- a/fnl/plugins/bufresize.fnl +++ /dev/null @@ -1 +0,0 @@ -((. (require :bufresize) :setup)) diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl index 8d13986..09067eb 100644 --- a/fnl/plugins/cmp.fnl +++ b/fnl/plugins/cmp.fnl @@ -1,6 +1,6 @@ -(local cmp (require :cmp)) +(local cmp (_G.util.require! :cmp)) -((. cmp :setup) { +(cmp.setup { :snippet { :expand (fn [args] (vim.snippet.expand args.body) @@ -16,7 +16,7 @@ }) :sources (cmp.config.sources [ {:name :nvim_lsp} - ;{:name :vsnip} + {:name :calc} ;to anyone new to this codebase, calc is short for calculator (no clue what this adds, but its funny) ] [{:name :buffer}]) }) diff --git a/fnl/plugins/compiler_explorer.fnl b/fnl/plugins/compiler_explorer.fnl new file mode 100644 index 0000000..cf2108e --- /dev/null +++ b/fnl/plugins/compiler_explorer.fnl @@ -0,0 +1,6 @@ +(_G.util.setup! :compiler-explorer { + :languages { + ;clang 9.0.1 x86-64 + :c {:compiler :cclang901} + } + }) diff --git a/fnl/plugins/dap.fnl b/fnl/plugins/dap.fnl new file mode 100644 index 0000000..fbaf3ba --- /dev/null +++ b/fnl/plugins/dap.fnl @@ -0,0 +1,20 @@ +;all this does is load dap configurations +; +;the full directory name starting after the source (fnl) will be used +;replace all the /'s with periods and for each file in {source}/dap, +;set the modified path as a variable to require the file at the path +; +;ie: fnl/dap/adapters/lldb.fnl will run `dap.adapters.lldb = require'dap.adapters.lldb'` +; +;if you really want to (or are lazy) you can use lua/dap/{whatever}, but make sure a fennel file +;wont override it + +(tset _G :dap (require :dap)) +(local dir (.. (vim.fn.stdpath :config) "/lua/")) +(local search (io.popen (.. "find " dir "dap/ -name '*.*'"))) +(each [conf (search:lines)] + (local path (string.gsub conf "/" ".")) + (local req (path:sub (+ (# dir) 1) -5)) + ((assert (load (.. req " = require'" req "'"))))) + +((. (require :dap-python) :setup) :python3) diff --git a/fnl/plugins/dressing.fnl b/fnl/plugins/dressing.fnl new file mode 100644 index 0000000..cc3a8d0 --- /dev/null +++ b/fnl/plugins/dressing.fnl @@ -0,0 +1,2 @@ +(_G.util.setup! :dressing { + :select {:backend [:telescope]}}) diff --git a/fnl/plugins/edgy.fnl b/fnl/plugins/edgy.fnl new file mode 100644 index 0000000..4868367 --- /dev/null +++ b/fnl/plugins/edgy.fnl @@ -0,0 +1,14 @@ +(_G.util.setup! :edgy { + :bottom [:toggleterm] + :left [:neo-tree {:ft :Outline :title (fn [] + (local buf_name (vim.api.nvim_buf_get_name 0)); or "[No Name]" + (vim.fn.fnamemodify buf_name ":t") + )}] + + :animate {:enabled false} + ;allow other window movement binds to 'work' + :keys {:c-j (fn [win] + (win:next {:focus true :pinned false})) + :c-k (fn [win] + (win:prev {:focus true :visible true}))} + :wo {:winbar false}}) diff --git a/fnl/plugins/gitsigns.fnl b/fnl/plugins/gitsigns.fnl deleted file mode 100644 index 9810906..0000000 --- a/fnl/plugins/gitsigns.fnl +++ /dev/null @@ -1 +0,0 @@ -((. (require :gitsigns) :setup)) diff --git a/fnl/plugins/lsp_signature.fnl b/fnl/plugins/lsp_signature.fnl deleted file mode 100644 index 9b5509d..0000000 --- a/fnl/plugins/lsp_signature.fnl +++ /dev/null @@ -1 +0,0 @@ -((. (require :lsp_signature) :setup)) diff --git a/fnl/plugins/lspconfig.fnl b/fnl/plugins/lspconfig.fnl index 7034e33..bcd3527 100644 --- a/fnl/plugins/lspconfig.fnl +++ b/fnl/plugins/lspconfig.fnl @@ -2,7 +2,7 @@ (set capabilities (capabilities.default_capabilities)) (local lsp _G.settings.lsp) (local config_table {}) -(local lspconfig (require :lspconfig)) +(local lspconfig (_G.util.require! :lspconfig)) (each [language (lsp:gmatch "([^,]+)")] (when (= (. config_table language) nil) (tset config_table language {})) diff --git a/fnl/plugins/matchparen.fnl b/fnl/plugins/matchparen.fnl deleted file mode 100644 index 1154b31..0000000 --- a/fnl/plugins/matchparen.fnl +++ /dev/null @@ -1 +0,0 @@ -((. (require :matchparen) :setup)) diff --git a/fnl/plugins/neo_tree.fnl b/fnl/plugins/neo_tree.fnl index 76bf708..9925d60 100644 --- a/fnl/plugins/neo_tree.fnl +++ b/fnl/plugins/neo_tree.fnl @@ -1,4 +1,5 @@ -((. (require :neo-tree) :setup) { +(_G.util.setup! :neo-tree { + :open_files_do_not_replace_types ["Outline" "terminal" "toggleterm" "edgy"] :close_if_last_window true :default_component_configs { :git_status { diff --git a/fnl/plugins/notify.fnl b/fnl/plugins/notify.fnl index 4084871..46e3cd0 100644 --- a/fnl/plugins/notify.fnl +++ b/fnl/plugins/notify.fnl @@ -1 +1 @@ -(tset vim :notify (require :notify)) +(tset vim :notify (_G.util.require! :notify)) diff --git a/fnl/plugins/persistent_breakpoints.fnl b/fnl/plugins/persistent_breakpoints.fnl new file mode 100644 index 0000000..b52ab70 --- /dev/null +++ b/fnl/plugins/persistent_breakpoints.fnl @@ -0,0 +1,2 @@ +(_G.util.setup! :persistent-breakpoints { + :load_breakpoints_event ["BufReadPost"]}) diff --git a/fnl/plugins/sniprun.fnl b/fnl/plugins/sniprun.fnl new file mode 100644 index 0000000..93123a2 --- /dev/null +++ b/fnl/plugins/sniprun.fnl @@ -0,0 +1,2 @@ +(_G.util.setup! :sniprun { + :display ["VirtualTextOk" "VirtualTextErr"]}) diff --git a/fnl/plugins/startup.fnl b/fnl/plugins/startup.fnl index dc601a4..38e583e 100644 --- a/fnl/plugins/startup.fnl +++ b/fnl/plugins/startup.fnl @@ -1,2 +1,2 @@ -((. (require :startup) :setup) { +(_G.util.setup! :startup { :theme :evil}) diff --git a/fnl/plugins/toggleterm.fnl b/fnl/plugins/toggleterm.fnl index aed1edc..12df987 100644 --- a/fnl/plugins/toggleterm.fnl +++ b/fnl/plugins/toggleterm.fnl @@ -1 +1 @@ -((. (require :toggleterm) :setup) {:persist_mode true :persistant_size true}) +(_G.util.setup! :toggleterm {:persist_mode true :persistant_size true}) diff --git a/fnl/plugins/treesitter.fnl b/fnl/plugins/treesitter.fnl index 4b2a687..a0f6156 100644 --- a/fnl/plugins/treesitter.fnl +++ b/fnl/plugins/treesitter.fnl @@ -1,3 +1,3 @@ -((. (require :nvim-treesitter.configs) :setup) +(_G.util.setup! :nvim-treesitter.configs {:highlight { :enable true}}) diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl index 6d4963f..e3279db 100644 --- a/fnl/plugins/which_key.fnl +++ b/fnl/plugins/which_key.fnl @@ -1,4 +1,4 @@ -(local whichkey (require :which-key)) +(local whichkey (_G.util.require! :which-key)) (whichkey.setup) (macro wmap [k op desc] @@ -11,11 +11,39 @@ (wmap :f "Neotree toggle" "fs") (wmap :w "WinShift" "win shift") (wmap :t "ToggleTerm direction=horizontal" "hterm") + (wmap :d "Glance references" "references") + (wmap :s "Telescope live_grep" "search") + (wmap :b "JABSOpen" "buffers") + (wmap :g (fn [] + (local buffer (vim.fn.expand :%)) + (vim.cmd "w") ;write so location is updated + (vim.cmd "tabe") + (vim.cmd (.. "buffer " buffer)) + ((. (require "dapui") :open))) "dap-ify") + (wmap :x "tabclose" "close tab") + (wmap :c (fn [] + (_G.loaded.edgy.goto_main) + (vim.cmd "DiffviewOpen")) "git diff") + + ;;layouts + (gmap :l "layout") + (wmap :li (fn [] + (vim.cmd "ToggleTerm direction=horizontal") + (vim.cmd "Neotree toggle") + (vim.cmd "Outline")) "ide") + + ;;visual + (gmap :v "visual") + (wmap :vl "lua require('nabla').toggle_virt({autogen=true})" "latex") + (wmap :vb "lua require('nvim-biscuits').toggle_biscuits()" "biscuits") ;;quick (gmap :q "quick") (wmap :qs "\"+y" "system grab") (wmap :ql "0v$" "line") + (wmap :qr "SnipRun" "run highlighted") + (wmap :qf "RunFile" "run file") + (wmap :qe "RunCode" "run code") ]) (tset mappings :mode [:n :v]) diff --git a/fnl/plugins/wilder.fnl b/fnl/plugins/wilder.fnl index 56b4155..2398ebe 100644 --- a/fnl/plugins/wilder.fnl +++ b/fnl/plugins/wilder.fnl @@ -1,8 +1,9 @@ +;trans colors :3 (local gradient [:#74d7ec :#96cde2 :#b9c3d9 :#dcb9d0 :#ffafc7 :#ffafc7 :#fec1d2 :#fdd4de :#fce6e9 :#fbf9f5 :#fbf9f5 :#fce8ea :#fdd7e0 :#fec6d5 :#ffb5cb :#ffb5cb :#dcbdd2 :#b9c5da :#96cde2 :#73d5ea]) -(local wilder (require :wilder)) +(local wilder (_G.util.require! :wilder)) (wilder.setup {:modes [:: :/ :?]}) ;this like 'builds' the gradient? idk diff --git a/fnl/plugins/winshift.fnl b/fnl/plugins/winshift.fnl deleted file mode 100644 index 542f15c..0000000 --- a/fnl/plugins/winshift.fnl +++ /dev/null @@ -1 +0,0 @@ -((. (require :winshift) :setup)) -- cgit v1.2.3