summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloé Vulquin <code@toast.bunkerlabs.net>2024-07-26 22:39:32 +0200
committerChloé Vulquin <code@toast.bunkerlabs.net>2024-07-26 22:39:32 +0200
commitc3c2a2f26ba27574e7b4fabd8be150c057346131 (patch)
tree76345040016b07deeb2cc4be49d64f80a6d5c90c
parentnvim/mdquote: fix negative start line bug (diff)
nvim: rename tbl to mixed-table, import it as "·"
I swear I'm not succumbing to the APL, I just couldn't find a better symbol.
Diffstat (limited to '')
-rw-r--r--dot_config/nvim/fnl/bindings/builtins.fnl6
-rw-r--r--dot_config/nvim/fnl/bindings/init.fnl10
-rw-r--r--dot_config/nvim/fnl/bindings/plugins.fnl4
-rw-r--r--dot_config/nvim/fnl/plugins/bindings/init.fnl8
-rw-r--r--dot_config/nvim/fnl/plugins/flash.fnl18
-rw-r--r--dot_config/nvim/fnl/plugins/init.fnl32
-rw-r--r--dot_config/nvim/fnl/plugins/langs.fnl44
-rw-r--r--dot_config/nvim/fnl/plugins/lsp/attach.fnl36
-rw-r--r--dot_config/nvim/fnl/plugins/lsp/init.fnl32
-rw-r--r--dot_config/nvim/fnl/plugins/mini/init.fnl40
-rw-r--r--dot_config/nvim/fnl/plugins/neo-tree.fnl16
-rw-r--r--dot_config/nvim/fnl/plugins/surround.fnl10
-rw-r--r--dot_config/nvim/fnl/plugins/telescope.fnl34
-rw-r--r--dot_config/nvim/fnl/toast/macros.fnl9
-rw-r--r--dot_config/nvim/pre.lua2
15 files changed, 151 insertions, 150 deletions
diff --git a/dot_config/nvim/fnl/bindings/builtins.fnl b/dot_config/nvim/fnl/bindings/builtins.fnl
index 8c77e35..dd96dfc 100644
--- a/dot_config/nvim/fnl/bindings/builtins.fnl
+++ b/dot_config/nvim/fnl/bindings/builtins.fnl
@@ -1,5 +1,5 @@
; document missing builtins
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(recc :which-key :add
- [(tbl :gt & :desc "Next tab")
- (tbl :gT & :desc "Previous tab")])
+ [(· :gt & :desc "Next tab")
+ (· :gT & :desc "Previous tab")])
diff --git a/dot_config/nvim/fnl/bindings/init.fnl b/dot_config/nvim/fnl/bindings/init.fnl
index c350db4..80b6733 100644
--- a/dot_config/nvim/fnl/bindings/init.fnl
+++ b/dot_config/nvim/fnl/bindings/init.fnl
@@ -1,4 +1,4 @@
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(each [_ v (ipairs [:builtins
:plugins])]
@@ -7,7 +7,7 @@
; general bindings that aren't specific to a plugin
(recc :which-key :add
; diagnostics
- [(tbl :<leader>e vim.diagnostic.open_float & :desc "diag float")
- (tbl :<leader>q vim.diagnostic.setloclist & :desc "diag locations")
- (tbl "[d" vim.diagnostic.goto_prev & :desc "prev diag")
- (tbl "]d" vim.diagnostic.goto_next & :desc "next diag")])
+ [(· :<leader>e vim.diagnostic.open_float & :desc "diag float")
+ (· :<leader>q vim.diagnostic.setloclist & :desc "diag locations")
+ (· "[d" vim.diagnostic.goto_prev & :desc "prev diag")
+ (· "]d" vim.diagnostic.goto_next & :desc "next diag")])
diff --git a/dot_config/nvim/fnl/bindings/plugins.fnl b/dot_config/nvim/fnl/bindings/plugins.fnl
index ae0348d..97f09c7 100644
--- a/dot_config/nvim/fnl/bindings/plugins.fnl
+++ b/dot_config/nvim/fnl/bindings/plugins.fnl
@@ -1,4 +1,4 @@
; plugin-specific category bindings
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(recc :which-key :add
- [(tbl :<leader>f & :desc :+find)])
+ [(· :<leader>f & :desc :+find)])
diff --git a/dot_config/nvim/fnl/plugins/bindings/init.fnl b/dot_config/nvim/fnl/plugins/bindings/init.fnl
index 4cfb558..38df910 100644
--- a/dot_config/nvim/fnl/plugins/bindings/init.fnl
+++ b/dot_config/nvim/fnl/plugins/bindings/init.fnl
@@ -1,5 +1,5 @@
-(import-macros {: tbl} :toast.macros)
-[(tbl :folke/which-key.nvim &
- :lazy true
- :opts {})
+(import-macros {:mixed-table ·} :toast.macros)
+[(· :folke/which-key.nvim &
+ :lazy true
+ :opts {})
[:tpope/vim-rsi]]
diff --git a/dot_config/nvim/fnl/plugins/flash.fnl b/dot_config/nvim/fnl/plugins/flash.fnl
index ece5de4..25ff6c7 100644
--- a/dot_config/nvim/fnl/plugins/flash.fnl
+++ b/dot_config/nvim/fnl/plugins/flash.fnl
@@ -1,19 +1,19 @@
-(import-macros {: tbl : recc} :toast.macros)
-[(tbl :folke/flash.nvim &
- :opts {:modes {:search {:enabled false}}}
- :event :VeryLazy
- :keys [(tbl :s #(recc :flash :jump) &
+(import-macros {:mixed-table · : recc} :toast.macros)
+[(· :folke/flash.nvim &
+ :opts {:modes {:search {:enabled false}}}
+ :event :VeryLazy
+ :keys [(· :s #(recc :flash :jump) &
:mode [:n :x :o]
:desc :Flash)
- (tbl :S #(recc :flash :treesitter) &
+ (· :S #(recc :flash :treesitter) &
:mode [:n :x :o]
:desc "Flash Treesitter")
- (tbl :r #(recc :flash :remote) &
+ (· :r #(recc :flash :remote) &
:mode :o
:desc "Remote Flash")
- (tbl :R #(recc :flash :treesitter_search) &
+ (· :R #(recc :flash :treesitter_search) &
:mode [:o :x]
:desc "Flash Treesitter Search")
- (tbl :<c-s> #(recc :flash :toggle) &
+ (· :<c-s> #(recc :flash :toggle) &
:mode :c
:desc "Toggle Flash Search")])]
diff --git a/dot_config/nvim/fnl/plugins/init.fnl b/dot_config/nvim/fnl/plugins/init.fnl
index a867ecc..8e2e6af 100644
--- a/dot_config/nvim/fnl/plugins/init.fnl
+++ b/dot_config/nvim/fnl/plugins/init.fnl
@@ -1,4 +1,4 @@
-(import-macros {: tbl} :toast.macros)
+(import-macros {:mixed-table ·} :toast.macros)
(local conjureft [:clojure
:fennel
:hy
@@ -10,19 +10,19 @@
; simple stuff that doesn't need any handling
; and doesn't fit in elsewhere
-[(tbl :folke/lazy.nvim & :version false)
- (tbl :Olical/nfnl & :ft :fennel)
- (tbl :stevearc/dressing.nvim &
- :opts {})
- (tbl :Olical/conjure &
- :config (fn [_ opts]
- (each [k v (pairs opts)]
- (tset vim.g (.. :conjure# k) v)))
- :opts {:mapping#prefix :<localleader>e
- :extract#tree_sitter#enabled true
- ; disabling lua, python, rust
- :filetypes conjureft
- :filetype#fennel :conjure.client.fennel.stdio
- :filetype#janet :conjure.client.janet.stdio}
- :ft conjureft)
+[(· :folke/lazy.nvim & :version false)
+ (· :Olical/nfnl & :ft :fennel)
+ (· :stevearc/dressing.nvim &
+ :opts {})
+ (· :Olical/conjure &
+ :config (fn [_ opts]
+ (each [k v (pairs opts)]
+ (tset vim.g (.. :conjure# k) v)))
+ :opts {:mapping#prefix :<localleader>e
+ :extract#tree_sitter#enabled true
+ ; disabling lua, python, rust
+ :filetypes conjureft
+ :filetype#fennel :conjure.client.fennel.stdio
+ :filetype#janet :conjure.client.janet.stdio}
+ :ft conjureft)
[:tpope/vim-repeat]]
diff --git a/dot_config/nvim/fnl/plugins/langs.fnl b/dot_config/nvim/fnl/plugins/langs.fnl
index 5bfb817..21478a8 100644
--- a/dot_config/nvim/fnl/plugins/langs.fnl
+++ b/dot_config/nvim/fnl/plugins/langs.fnl
@@ -1,25 +1,25 @@
-(import-macros {: tbl} :toast.macros)
+(import-macros {:mixed-table ·} :toast.macros)
; language support
-[(tbl :nvim-treesitter/nvim-treesitter &
- :version false
- :build ::TSUpdate
- :dependnecies [:nvim-treesitter/nvim-treesitter-textobjects]
- :main :nvim-treesitter.configs
- :opts {:ensure_installed :all
- :ignore_install [:norg]
- :sync_install :true
- :highlight {:enable true
- :disable [:markdown]
- :additional_vim_regex_highlighting [:markdown]}})
+[(· :nvim-treesitter/nvim-treesitter &
+ :version false
+ :build ::TSUpdate
+ :dependnecies [:nvim-treesitter/nvim-treesitter-textobjects]
+ :main :nvim-treesitter.configs
+ :opts {:ensure_installed :all
+ :ignore_install [:norg]
+ :sync_install :true
+ :highlight {:enable true
+ :disable [:markdown]
+ :additional_vim_regex_highlighting [:markdown]}})
; non-treesitter languages
- (tbl :janet-lang/janet.vim & :ft :janet)
- (tbl :preservim/vim-markdown &
- :version false
- :dependencies [:godlygeek/tabular]
- :ft :markdown)
+ (· :janet-lang/janet.vim & :ft :janet)
+ (· :preservim/vim-markdown &
+ :version false
+ :dependencies [:godlygeek/tabular]
+ :ft :markdown)
; helper for lisps
- (tbl :gpanders/nvim-parinfer &
- :ft [:clojure
- :fennel
- :janet
- :scm])]
+ (· :gpanders/nvim-parinfer &
+ :ft [:clojure
+ :fennel
+ :janet
+ :scm])]
diff --git a/dot_config/nvim/fnl/plugins/lsp/attach.fnl b/dot_config/nvim/fnl/plugins/lsp/attach.fnl
index 1f23015..83a68aa 100644
--- a/dot_config/nvim/fnl/plugins/lsp/attach.fnl
+++ b/dot_config/nvim/fnl/plugins/lsp/attach.fnl
@@ -1,31 +1,31 @@
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(local {: assoc : map} (require :toast.core))
(local {: insert} (require :toast.table))
(fn [c b]
(let [lsp vim.lsp
lbf lsp.buf
- ll [(tbl "" & :group :+lsp)
- (tbl :w & :group :+workspace)
+ ll [(· "" & :group :+lsp)
+ (· :w & :group :+workspace)
- (tbl :D lbf.declaration & :desc "goto declaration")
- (tbl :d lbf.definition & :desc "goto definition")
- (tbl :k lbf.hover & :desc "hover")
- (tbl :K lbf.signature_help & :desc "signature help")
- (tbl :i lbf.implementation & :desc "goto implementation")
- (tbl :t lbf.type_definition & :desc "goto type definition")
- (tbl :r lbf.rename & :desc "rename")
- (tbl :c lbf.code_action & :desc "code action")
- (tbl :R lbf.reference & :desc "list references")
+ (· :D lbf.declaration & :desc "goto declaration")
+ (· :d lbf.definition & :desc "goto definition")
+ (· :k lbf.hover & :desc "hover")
+ (· :K lbf.signature_help & :desc "signature help")
+ (· :i lbf.implementation & :desc "goto implementation")
+ (· :t lbf.type_definition & :desc "goto type definition")
+ (· :r lbf.rename & :desc "rename")
+ (· :c lbf.code_action & :desc "code action")
+ (· :R lbf.reference & :desc "list references")
- (tbl :wa lbf.add_workspace_folder & :desc "add folder")
- (tbl :wr lbf.remove_workspace_folder & :desc "remove folder")
- (tbl :wl #(print (vim.inspect (lbf.list_workspace_folders))) &
+ (· :wa lbf.add_workspace_folder & :desc "add folder")
+ (· :wr lbf.remove_workspace_folder & :desc "remove folder")
+ (· :wl #(print (vim.inspect (lbf.list_workspace_folders))) &
:desc "list folders")]
ll (map #(assoc $ 1 (.. :<localleader><localleader> (. $ 1))) ll)]
(vim.api.nvim_buf_set_option b :omnifunc :v:lua.vim.lsp.omnifunc)
(recc :which-key :add
- (tbl (insert ll
- (tbl :<leader>F #(vim.lsp.buf.format {:async true}) &
- :desc "run format")) &
+ (· (insert ll
+ (· :<leader>F #(vim.lsp.buf.format {:async true}) &
+ :desc "run format")) &
:buffer b))))
diff --git a/dot_config/nvim/fnl/plugins/lsp/init.fnl b/dot_config/nvim/fnl/plugins/lsp/init.fnl
index 10685d2..67b2b66 100644
--- a/dot_config/nvim/fnl/plugins/lsp/init.fnl
+++ b/dot_config/nvim/fnl/plugins/lsp/init.fnl
@@ -1,4 +1,4 @@
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(fn gopts [plist]
{:clangd {}
@@ -16,18 +16,18 @@
(local attach (require :plugins.lsp.attach))
(local caps (require :plugins.lsp.capabilities))
-[(tbl :neovim/nvim-lspconfig &
- :config (fn [_ opts]
- (each [k v (pairs opts)]
- (set v.on_attach (or attach v.on_attach))
- (when (= :table (type caps))
- (set v.capabilities (or v.capabilities caps)))
- (let [s (. (require :lspconfig) k)
- c (or v.cmd s.document_config.default_config.cmd)]
- (when (not= 0 (vim.fn.executable (. c 1)))
- (s.setup v)))))
- :opts (fn []
- (let [plist (fn [...]
- (local p (recc :lspconfig.util :root_pattern ...))
- #(p $))]
- (gopts plist))))]
+[(· :neovim/nvim-lspconfig &
+ :config (fn [_ opts]
+ (each [k v (pairs opts)]
+ (set v.on_attach (or attach v.on_attach))
+ (when (= :table (type caps))
+ (set v.capabilities (or v.capabilities caps)))
+ (let [s (. (require :lspconfig) k)
+ c (or v.cmd s.document_config.default_config.cmd)]
+ (when (not= 0 (vim.fn.executable (. c 1)))
+ (s.setup v)))))
+ :opts (fn []
+ (let [plist (fn [...]
+ (local p (recc :lspconfig.util :root_pattern ...))
+ #(p $))]
+ (gopts plist))))]
diff --git a/dot_config/nvim/fnl/plugins/mini/init.fnl b/dot_config/nvim/fnl/plugins/mini/init.fnl
index f175ed7..53f7f22 100644
--- a/dot_config/nvim/fnl/plugins/mini/init.fnl
+++ b/dot_config/nvim/fnl/plugins/mini/init.fnl
@@ -1,20 +1,20 @@
-(import-macros {: tbl : recc} :toast.macros)
-[(tbl :echasnovski/mini.nvim &
- :version false
- :config (fn [_ opts]
- (each [k v (pairs opts)]
- (recc (.. :mini. k) :setup v)))
- :opts (fn [] {:ai {}
- :align {}
- :basics {}
- :bracketed {:indent {:options {:change_type :diff}}}
- :comment {}
- :completion {}
- :cursorword {}
- :indentscope {}
- :move {}
- :splitjoin {}
- ; :starter (require :plugins.mini.starter)
- :statusline {}
- :tabline {}
- :trailspace {}}))]
+(import-macros {:mixed-table · : recc} :toast.macros)
+[(· :echasnovski/mini.nvim &
+ :version false
+ :config (fn [_ opts]
+ (each [k v (pairs opts)]
+ (recc (.. :mini. k) :setup v)))
+ :opts (fn [] {:ai {}
+ :align {}
+ :basics {}
+ :bracketed {:indent {:options {:change_type :diff}}}
+ :comment {}
+ :completion {}
+ :cursorword {}
+ :indentscope {}
+ :move {}
+ :splitjoin {}
+ ; :starter (require :plugins.mini.starter)
+ :statusline {}
+ :tabline {}
+ :trailspace {}}))]
diff --git a/dot_config/nvim/fnl/plugins/neo-tree.fnl b/dot_config/nvim/fnl/plugins/neo-tree.fnl
index 396f420..43a683a 100644
--- a/dot_config/nvim/fnl/plugins/neo-tree.fnl
+++ b/dot_config/nvim/fnl/plugins/neo-tree.fnl
@@ -1,8 +1,8 @@
-(import-macros {: tbl : recc} :toast.macros)
-[(tbl :nvim-neo-tree/neo-tree.nvim &
- :cmd :Neotree
- :dependencies [:nvim-lua/plenary.nvim
- :MunifTanjim/nui.nvim]
- :keys [(tbl :<leader>n #(recc :neo-tree.command :execute {:toggle true}) &
- :desc :Neotree)]
- :opts {})]
+(import-macros {:mixed-table · : recc} :toast.macros)
+[(· :nvim-neo-tree/neo-tree.nvim &
+ :cmd :Neotree
+ :dependencies [:nvim-lua/plenary.nvim
+ :MunifTanjim/nui.nvim]
+ :keys [(· :<leader>n #(recc :neo-tree.command :execute {:toggle true}) &
+ :desc :Neotree)]
+ :opts {})]
diff --git a/dot_config/nvim/fnl/plugins/surround.fnl b/dot_config/nvim/fnl/plugins/surround.fnl
index 6fdb678..7d57940 100644
--- a/dot_config/nvim/fnl/plugins/surround.fnl
+++ b/dot_config/nvim/fnl/plugins/surround.fnl
@@ -1,5 +1,5 @@
-(import-macros {: tbl} :toast.macros)
-[(tbl :kylechui/nvim-surround &
- :version :* ; omit to use main branch for latest features
- :event :VeryLazy
- :opts {})]
+(import-macros {:mixed-table ·} :toast.macros)
+[(· :kylechui/nvim-surround &
+ :version :* ; omit to use main branch for latest features
+ :event :VeryLazy
+ :opts {})]
diff --git a/dot_config/nvim/fnl/plugins/telescope.fnl b/dot_config/nvim/fnl/plugins/telescope.fnl
index 44aa9d5..90dcbe7 100644
--- a/dot_config/nvim/fnl/plugins/telescope.fnl
+++ b/dot_config/nvim/fnl/plugins/telescope.fnl
@@ -1,20 +1,20 @@
-(import-macros {: tbl : recc} :toast.macros)
+(import-macros {:mixed-table · : recc} :toast.macros)
(fn gen [key fun desc]
- (tbl (.. :<leader>f key) #(recc :telescope.builtin fun) & :desc desc))
+ (· (.. :<leader>f key) #(recc :telescope.builtin fun) & :desc desc))
-[(tbl :nvim-telescope/telescope.nvim &
- :dependencies [:nvim-lua/plenary.nvim
- (tbl :nvim-telescope/telescope-fzf-native.nvim &
- :build :make)]
- :config (fn [_ opts]
- (let [ts (require :telescope)]
- (ts.setup opts)
- (ts.load_extension :fzf)))
- :cmd :Telescope
- :keys [(gen :f :find_files "Find File")
- (gen :g :live_grep "Live Grep")
- (gen :b :buffers "Find Buffer")
- (gen :h :help_tags "Find Help")
- (gen :c :commands "Find Command")
- (gen :t :treesitter "Find Treesitter")])]
+[(· :nvim-telescope/telescope.nvim &
+ :dependencies [:nvim-lua/plenary.nvim
+ (· :nvim-telescope/telescope-fzf-native.nvim &
+ :build :make)]
+ :config (fn [_ opts]
+ (let [ts (require :telescope)]
+ (ts.setup opts)
+ (ts.load_extension :fzf)))
+ :cmd :Telescope
+ :keys [(gen :f :find_files "Find File")
+ (gen :g :live_grep "Live Grep")
+ (gen :b :buffers "Find Buffer")
+ (gen :h :help_tags "Find Help")
+ (gen :c :commands "Find Command")
+ (gen :t :treesitter "Find Treesitter")])]
diff --git a/dot_config/nvim/fnl/toast/macros.fnl b/dot_config/nvim/fnl/toast/macros.fnl
index b81d8e6..e9d5038 100644
--- a/dot_config/nvim/fnl/toast/macros.fnl
+++ b/dot_config/nvim/fnl/toast/macros.fnl
@@ -5,10 +5,11 @@
: assoc} (require :toast.core))
(local {: insert} (require :toast.table))
-(fn tbl [...]
+(fn mixed-table [...]
"Generate a mixed table.
- The format is (tbl 1 2 3 & :a :b) to produce {1; 2; 3; a = 'b'}.
- This macro simply expands to the correct data during compile-time."
+ The format is (mixed-table 1 2 3 & :a :b) to produce {1; 2; 3; a = 'b'}.
+ This macro simply expands to the correct data during compile-time.
+ It is recommended to import this as a single character macro locally."
(let [args [...]
pre (accumulate [out []
_ v (ipairs args)
@@ -24,5 +25,5 @@
The equivalent call is (recc :something :call arg1 arg2)"
`((. (require ,reqspec) ,key) ,...))
-{: tbl
+{: mixed-table
: recc}
diff --git a/dot_config/nvim/pre.lua b/dot_config/nvim/pre.lua
index d6c3f96..a7a686a 100644
--- a/dot_config/nvim/pre.lua
+++ b/dot_config/nvim/pre.lua
@@ -1,7 +1,7 @@
-- [nfnl] Compiled from pre.fnl by https://github.com/Olical/nfnl, do not edit.
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-local options = {timeoutlen = 300, clipboard = "unnamedplus", completeopt = "menu,menuone,noselect", mouse = "a", smartcase = true, smartindent = true, termguicolors = true, shiftwidth = 4, tabstop = 4, number = true, numberwidth = 2, scrolloff = 4, sidescrolloff = 4, foldmethod = "expr", foldexpr = "nvim_treesitter#foldexpr()", foldlevelstart = 99, wrap = true, expandtab = false, backup = false, swapfile = false}
+local options = {timeoutlen = 300, clipboard = "unnamedplus", completeopt = "menu,menuone,noselect", mouse = "a", smartcase = true, smartindent = true, termguicolors = true, shiftwidth = 4, tabstop = 4, number = true, numberwidth = 2, scrolloff = 4, sidescrolloff = 4, foldmethod = "expr", foldexpr = "nvim_treesitter#foldexpr()", foldlevelstart = 99, wrap = true, backup = false, expandtab = false, swapfile = false}
for k, v in pairs(options) do
vim.opt[k] = v
end