Skip to content

Commit

Permalink
2022-11-19 20:32:11
Browse files Browse the repository at this point in the history
  • Loading branch information
gcclll committed Nov 19, 2022
1 parent 0e24121 commit dc64ac4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
17 changes: 12 additions & 5 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ so-long
)
#+end_src

** 逗号前缀
** 逗号前缀(各种 hydras)

#+begin_src emacs-lisp
(general-create-definer global-leader
Expand Down Expand Up @@ -1303,9 +1303,9 @@ node 包路径:
(lsp-completion-provider :none)
;; (lsp-auto-configure nil)
:commands lsp
:config
(setq lsp-disabled-clients '(vls))
;; (setq lsp-enabled-clients '(lsp-volar))
;; :config
;; (add-to-list 'lsp-disabled-clients 'vls)
;; (add-to-list 'lsp-enabled-clients 'volar)
)


Expand All @@ -1329,7 +1329,6 @@ node 包路径:
"C-c l r" 'lsp-ui-peek-find-references
"C-c l a" 'lsp-organize-imports
"C-c l e" 'lsp-treemacs-errors-list)

#+end_src

** lsp-bridge
Expand Down Expand Up @@ -2705,6 +2704,14 @@ kbd:C-c_C-c <kbd:C-c C-c>
(unless (server-running-p)
(server-start))
(error (message "Could not start server")))

(defun my-cleanup-gc ()
"Clean up gc."
(setq gc-cons-threshold (* 1024 200)) ; 200MB
(setq gc-cons-percentage 0.5) ; 0.5s
(garbage-collect))

(run-with-idle-timer 4 nil #'my-cleanup-gc)
#+end_src
* 参考配置

Expand Down
14 changes: 11 additions & 3 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -1098,9 +1098,9 @@ _k_: down _a_: combine _q_: quit
(lsp-completion-provider :none)
;; (lsp-auto-configure nil)
:commands lsp
:config
(setq lsp-disabled-clients '(vls))
;; (setq lsp-enabled-clients '(lsp-volar))
;; :config
;; (add-to-list 'lsp-disabled-clients 'vls)
;; (add-to-list 'lsp-enabled-clients 'volar)
)


Expand Down Expand Up @@ -2269,3 +2269,11 @@ The test for presence of the car of ELT-CONS is done with `equal'."
(unless (server-running-p)
(server-start))
(error (message "Could not start server")))

(defun my-cleanup-gc ()
"Clean up gc."
(setq gc-cons-threshold (* 1024 200)) ; 200MB
(setq gc-cons-percentage 0.5) ; 0.5s
(garbage-collect))

(run-with-idle-timer 4 nil #'my-cleanup-gc)

0 comments on commit dc64ac4

Please sign in to comment.