Various updates
This commit is contained in:
parent
a6a553c6b0
commit
c670bf843f
@ -88,7 +88,8 @@
|
||||
`(use ,output))
|
||||
|
||||
;; Call a plugin's `setup function'
|
||||
(lambda setup! [pkg ...] (local output [ ])
|
||||
(lambda setup! [pkg ...]
|
||||
(local output [ ])
|
||||
(var last_key nil)
|
||||
(each [_ val (ipairs [...])]
|
||||
(if last_key
|
||||
@ -116,16 +117,10 @@
|
||||
`(let [save# (vim.fn.winsaveview)]
|
||||
,(unpack args))))
|
||||
|
||||
;; Returns the keys for table
|
||||
;; Careful, this finds them will a loop every time it is called!
|
||||
(lambda keys! [table]
|
||||
`(icollect [key# _# (pairs ,table)] key#))
|
||||
|
||||
{: bind!
|
||||
: hook!
|
||||
: use!
|
||||
: setup!
|
||||
: module-call!
|
||||
: module-fn!
|
||||
: save-excursion!
|
||||
: keys!}
|
||||
: save-excursion!}
|
||||
|
@ -85,6 +85,7 @@
|
||||
:TroubleToggle
|
||||
:TroubleClose
|
||||
:TroubleRefresh ]
|
||||
:module :trouble
|
||||
:config
|
||||
(setup! :trouble))
|
||||
|
||||
@ -176,9 +177,9 @@
|
||||
|
||||
; oil (file manager)
|
||||
(use! :stevearc/oil.nvim
|
||||
:config
|
||||
:confi
|
||||
(setup! :oil
|
||||
:columns { :icon :permissions :size: :mtime }))
|
||||
:columns [ :icon :permissions :size: :mtime ]))
|
||||
|
||||
;; guess style from buffer
|
||||
(use! :NMAC427/guess-indent.nvim
|
||||
@ -211,7 +212,7 @@
|
||||
; :config
|
||||
; (setup! :formatter
|
||||
; :logging true
|
||||
; :log_level _G.vim.log.levels.WARN
|
||||
; :log_level _G.vim.log.levels.WA;RN
|
||||
; :filetype {
|
||||
; :c [ (module-fn! :formatter.filetypes.c :astyle) ]
|
||||
; :cpp [ (module-fn! :formatter.filetypes.cpp :astyle) ]
|
||||
|
@ -44,10 +44,21 @@
|
||||
(bind! :n :gd "<cmd>Telescope lsp_definitions<cr>" buf)
|
||||
(bind! :n :gI "<cmd>Telescope lsp_implementations<cr>" buf)
|
||||
(bind! :n :D "<cmd>Telescope lsp_type_definitions<cr>" buf)
|
||||
(bind! :n :<leader>fq "<cmd>Telescope diagnostics<cr>" buf)
|
||||
|
||||
;; Some trouble commands
|
||||
(bind! :n :<leader>q "<cmd>TroubleToggle document_diagnostics<cr>")
|
||||
(bind! :n :<leader>Q "<cmd>TroubleToggle workspace_diagnostics<cr>"))
|
||||
(bind! :n :<leader>q (fn []
|
||||
(let [trouble (require :trouble)]
|
||||
(if (trouble.is_open)
|
||||
(trouble.close)
|
||||
true
|
||||
(trouble.open :document_diagnostics)))))
|
||||
(bind! :n :<leader>Q (fn []
|
||||
(let [trouble (require :trouble)]
|
||||
(if (trouble.is_open)
|
||||
(trouble.close)
|
||||
true
|
||||
(trouble.open :workspace_diagnostics))))))
|
||||
|
||||
(fn get-data-dir [server root]
|
||||
(let [resolved_path (vim.fn.resolve root)
|
||||
|
Reference in New Issue
Block a user