Home Gen374 @ 2024-10-23-13:10
This commit is contained in:
@@ -136,7 +136,20 @@
|
||||
(setq ccls-initialization-options '(:index (:comments 2) :completion (:detailedLabel t) :compilationDatabaseDirectory "build" :cache (:directory ".cache/ccls" :format "binary")))
|
||||
(set-lsp-priority! 'ccls 1))
|
||||
|
||||
(map! :map (cpp-mode-map c-mode-map c++-mode-map lsp-mode-map)
|
||||
:desc "Show Doc-UI" :n "C-h" #'lsp-ui-doc-glance)
|
||||
(defun my-ui-doc-glance-then-focus ()
|
||||
"Glances UI-Doc if not present, otherwise focus"
|
||||
(interactive)
|
||||
(if lsp-ui-doc--bounds
|
||||
(progn
|
||||
(lsp-ui-doc-hide)
|
||||
(lsp-ui-doc-show)
|
||||
(lsp-ui-doc-focus-frame))
|
||||
(lsp-ui-doc-glance)))
|
||||
|
||||
(map! :map (cpp-mode-map c-mode-map c++-mode-map lsp-mode-map)
|
||||
:desc "Show Doc-UI" :n "C-h" #'my-ui-doc-glance-then-focus)
|
||||
|
||||
|
||||
;; Bind C-h to the handler function
|
||||
(map! "C-h" #'my-c-h-handler)
|
||||
(set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode))
|
||||
|
||||
Reference in New Issue
Block a user