summaryrefslogtreecommitdiff
path: root/dot_config/nvim/fnl/plugins/lsp/attach.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/nvim/fnl/plugins/lsp/attach.fnl')
-rw-r--r--dot_config/nvim/fnl/plugins/lsp/attach.fnl31
1 files changed, 0 insertions, 31 deletions
diff --git a/dot_config/nvim/fnl/plugins/lsp/attach.fnl b/dot_config/nvim/fnl/plugins/lsp/attach.fnl
deleted file mode 100644
index ed2eb2d..0000000
--- a/dot_config/nvim/fnl/plugins/lsp/attach.fnl
+++ /dev/null
@@ -1,31 +0,0 @@
-(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 [(· "" & :group :+lsp)
- (· :w & :group :+workspace)
-
- (· :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")
-
- (· :wa lbf.add_workspace_folder & :desc "add folder")
- (· :wr lbf.remove_workspace_folder & :desc "remove folder")
- (· :wl #(vim.print (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
- (· (insert ll
- (· :<leader>F #(vim.lsp.buf.format {:async true}) &
- :desc "run format")) &
- :buffer b))))