|
90 | 90 | :files ("*.el" "data"))
|
91 | 91 | :hook
|
92 | 92 | (after-init . global-emojify-mode)
|
93 |
| - :init |
94 |
| - (setq emojify-emoji-styles '(unicode github))) |
| 93 | + :custom |
| 94 | + (emojify-emoji-styles '(unicode github))) |
95 | 95 |
|
96 | 96 | (use-package dashboard
|
97 | 97 | :straight (dashboard :host github :repo "emacs-dashboard/emacs-dashboard"
|
|
145 | 145 | (use-package cnfonts
|
146 | 146 | :straight (cnfonts :host github :repo "tumashu/cnfonts")
|
147 | 147 | :after init-darwin
|
148 |
| - :init |
149 |
| - (setq cnfonts--custom-set-fontnames |
| 148 | + :custom |
| 149 | + (cnfonts--custom-set-fontnames |
150 | 150 | '(
|
151 | 151 | ("Victor Mono")
|
152 | 152 | ("Hiragino Sans GB")
|
153 | 153 | ("HanaMinB")))
|
154 | 154 |
|
155 |
| - (setq cnfonts--custom-set-fontsizes |
| 155 | + (cnfonts--custom-set-fontsizes |
156 | 156 | '(
|
157 | 157 | (14 16.5 16.5)
|
158 | 158 | ))
|
159 |
| - |
| 159 | + :init |
160 | 160 | (cnfonts-enable))
|
161 | 161 |
|
162 | 162 | (use-package all-the-icons :straight t)
|
|
324 | 324 | ;; .rst 文件禁用 flycheck
|
325 | 325 | (setq-default flycheck-disabled-checkers '(rst)))
|
326 | 326 |
|
327 |
| -(use-package pos-tip |
328 |
| - :straight t) |
| 327 | +(use-package pos-tip :straight t) |
329 | 328 |
|
330 | 329 | (use-package flycheck-pos-tip
|
331 | 330 | ;; :straight (flycheck :host github :repo "flycheck/flycheck-pos-tip")
|
|
334 | 333 | :init
|
335 | 334 | (flycheck-pos-tip-mode))
|
336 | 335 |
|
337 |
| -(use-package posframe |
338 |
| - :straight t) |
| 336 | +(use-package posframe :straight t) |
339 | 337 |
|
340 | 338 | (use-package flycheck-swiftlint
|
341 | 339 | :straight t
|
342 | 340 | :config
|
343 | 341 | (with-eval-after-load 'flycheck
|
344 | 342 | (flycheck-swiftlint-setup)))
|
345 | 343 |
|
346 |
| -;; lsp-mode must come above of all lsp-packages |
347 |
| -(use-package lsp-mode |
348 |
| - :straight (lsp-mode :host github :repo "emacs-lsp/lsp-mode") |
349 |
| - :init |
350 |
| - ;; Make sure you don't have other gofmt/goimports hooks enabled. |
351 |
| - (defun lsp-go-install-save-hooks () |
352 |
| - "Set up before-save hooks to format buffer and add/delete imports." |
353 |
| - (add-hook 'before-save-hook #'lsp-format-buffer t t) |
354 |
| - (add-hook 'before-save-hook #'lsp-organize-imports t t)) |
355 |
| - (add-hook 'go-mode-hook #'lsp-go-install-save-hooks) |
356 |
| - :hook |
357 |
| - (python-mode . lsp) |
358 |
| - (go-mode . lsp) |
359 |
| - (c++-mode . lsp) |
360 |
| - (rust-mode . lsp) |
361 |
| - (php-mode . lsp) |
362 |
| - (scala-mode . lsp) |
363 |
| - (cmake-mode . lsp) |
364 |
| - (lsp-mode . lsp-lens-mode) |
365 |
| - :custom |
366 |
| - (lsp-rust-server 'rust-analyzer) |
367 |
| - (lsp-clients-clangd-executable "/usr/local/opt/llvm/bin/clangd") |
368 |
| - :after (company flycheck)) |
369 |
| - |
370 |
| -(use-package lsp-java |
371 |
| - :straight t |
372 |
| - :after lsp-mode |
373 |
| - :hook |
374 |
| - (java-mode . lsp)) |
375 |
| - |
376 |
| -(use-package helm-lsp :straight :commands helm-lsp-workspace-symbol) |
377 |
| - |
378 |
| -;; Add metals backend for lsp-mode |
379 |
| -(use-package lsp-metals |
380 |
| - :straight (lsp-metals :host github :repo "emacs-lsp/lsp-metals") |
381 |
| - :custom (lsp-metals-treeview-show-when-views-received t)) |
382 |
| - |
383 |
| -(use-package lsp-sourcekit |
384 |
| - :straight t |
385 |
| - :after lsp-mode |
386 |
| - :custom |
387 |
| - (lsp-sourcekit-executable "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp")) |
388 |
| - |
389 |
| -(use-package dap-mode |
390 |
| - :init |
391 |
| - (dap-mode 1) |
392 |
| - (dap-ui-mode 1) |
393 |
| - (require 'dap-go) |
394 |
| - (dap-go-setup) |
395 |
| - :custom |
396 |
| - ;; (dap-go-debug-program `("node" ,(expand-file-name "~/.vscode/extensions/ms-vscode.go-0.9.2/out/src/debugAdapter/goDebug.js"))) |
397 |
| - (dap-auto-configure-features '(sessions locals controls tooltip)) |
398 |
| - (dap-print-io t) |
399 |
| - :after (lsp-mode)) |
400 |
| - |
401 |
| -(use-package lsp-ui |
402 |
| - :straight t |
403 |
| - :after lsp-mode) |
| 344 | +;; Language Server Mode |
| 345 | +(use-package init-lsp) |
404 | 346 |
|
405 | 347 | (use-package whitespace
|
406 | 348 | :straight whitespace
|
|
0 commit comments