summaryrefslogtreecommitdiff
path: root/dot_config/nvim/fnl/plugins/lsp
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 /dot_config/nvim/fnl/plugins/lsp
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/plugins/lsp/attach.fnl36
-rw-r--r--dot_config/nvim/fnl/plugins/lsp/init.fnl32
2 files changed, 34 insertions, 34 deletions
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))))]