mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-17 06:23:50 +02:00
Compare commits
2 commits
58be67fc31
...
d0c33ded0a
Author | SHA1 | Date | |
---|---|---|---|
LordMZTE | d0c33ded0a | ||
LordMZTE | bfe11b70bf |
|
@ -24,21 +24,37 @@
|
|||
(set utils.transform_path
|
||||
(mztenv.telescope.makePathTransformer utils.transform_path))
|
||||
|
||||
(let [mopt mztenv.utils.map_opt
|
||||
lsp-opts {:fname_width 80 :show_line false}]
|
||||
(macro nmap [map action opt]
|
||||
`(vim.keymap.set :n ,map #(,action (themes.get_ivy ,opt)) mopt))
|
||||
;; resume search
|
||||
(nmap :fr builtin.resume)
|
||||
;; file finding mappings
|
||||
(nmap :ff builtin.find_files)
|
||||
(nmap :fg builtin.live_grep)
|
||||
;; LSP mappings
|
||||
(nmap :gd builtin.lsp_definitions lsp-opts)
|
||||
(nmap :gi builtin.lsp_implementations lsp-opts)
|
||||
(nmap :gr builtin.lsp_references lsp-opts)
|
||||
(nmap :gs builtin.lsp_dynamic_workspace_symbols lsp-opts)
|
||||
(nmap :gp builtin.diagnostics {:bufnr 0})
|
||||
(nmap :gP builtin.diagnostics)
|
||||
;; harpoon
|
||||
(nmap :gm ext.harpoon.marks))
|
||||
(macro nmap [map action opt]
|
||||
`(vim.keymap.set :n ,map #(,action (themes.get_ivy ,opt))
|
||||
mztenv.utils.map_opt))
|
||||
|
||||
(macro lsp-map [suffix action extra-opts]
|
||||
(local opt {:fname_width 80 :show_line false})
|
||||
(each [k v (pairs (or extra-opts {}))]
|
||||
(tset opt k v))
|
||||
`(do
|
||||
(nmap ,(.. :g suffix) ,action ,opt)
|
||||
(nmap ,(.. :gt suffix) ,action
|
||||
,(doto (collect [k v (pairs opt)] k v)
|
||||
(tset :jump_type :tab)))
|
||||
(nmap ,(.. :gs suffix) ,action
|
||||
,(doto (collect [k v (pairs opt)] k v)
|
||||
(tset :jump_type :split)))
|
||||
(nmap ,(.. :gv suffix) ,action
|
||||
,(doto (collect [k v (pairs opt)] k v)
|
||||
(tset :jump_type :vsplit)))))
|
||||
|
||||
;; resume search
|
||||
(nmap :fr builtin.resume)
|
||||
;; file finding mappings
|
||||
(nmap :ff builtin.find_files)
|
||||
(nmap :fg builtin.live_grep)
|
||||
;; LSP mappings
|
||||
(lsp-map :d builtin.lsp_definitions)
|
||||
(lsp-map :i builtin.lsp_implementations)
|
||||
(lsp-map :r builtin.lsp_references)
|
||||
(lsp-map :s builtin.lsp_dynamic_workspace_symbols)
|
||||
(lsp-map :p builtin.diagnostics {:bufnr 0})
|
||||
(lsp-map :P builtin.diagnostics)
|
||||
;; harpoon
|
||||
(nmap :gm ext.harpoon.marks)
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
(define dirs
|
||||
(map (λ (path) (match-let-values ([(p _ _) (split-path path)]) p))
|
||||
(find-files (λ (path) (equal? (path->string (last (explode-path path))) ".git")) plugin-dir)))
|
||||
(find-files (λ (path) (equal? (path->string (last (explode-path path))) ".git"))
|
||||
plugin-dir
|
||||
#:follow-links? #f)))
|
||||
|
||||
(define git-path (find-executable-path "git"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue