Install lsp-mode instead of eglot
This commit is contained in:
parent
55888360d4
commit
c7d23ff90f
3 changed files with 21 additions and 17 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
;; early-init.el --- -*- no-byte-compile: t -*-
|
;; early-init.el --- -*- no-byte-compile: t -*-
|
||||||
|
|
||||||
|
(setq gc-cons-threshold 100000000)
|
||||||
|
(setq read-process-output-max (* 1024 1024))
|
||||||
|
|
||||||
(setq byte-compile-warnings '(not obsolete))
|
(setq byte-compile-warnings '(not obsolete))
|
||||||
(setq warning-suppress-log-types '((comp) (bytecomp)))
|
(setq warning-suppress-log-types '((comp) (bytecomp)))
|
||||||
(setq native-comp-async-report-warnings-errors 'silent)
|
(setq native-comp-async-report-warnings-errors 'silent)
|
||||||
|
|
|
||||||
|
|
@ -139,22 +139,6 @@
|
||||||
ediff-split-window-function 'split-window-horizontally
|
ediff-split-window-function 'split-window-horizontally
|
||||||
ediff-window-setup-function 'ediff-setup-windows-plain))
|
ediff-window-setup-function 'ediff-setup-windows-plain))
|
||||||
|
|
||||||
(use-package eglot
|
|
||||||
:hook
|
|
||||||
(swift-mode . eglot-ensure)
|
|
||||||
(swift-ts-mode . eglot-ensure)
|
|
||||||
(nix-mode . eglot-ensure)
|
|
||||||
(python-mode . eglot-ensure)
|
|
||||||
(python-ts-mode . eglot-ensure)
|
|
||||||
:config
|
|
||||||
(setq eglot-autoshutdown t
|
|
||||||
eglot-send-idle-time 0.1)
|
|
||||||
(add-to-list 'eglot-server-programs '(swift-mode . ("xcrun" "sourcekit-lsp")))
|
|
||||||
(add-to-list 'eglot-server-programs '(swift-ts-mode . ("xcrun" "sourcekit-lsp")))
|
|
||||||
(add-to-list 'eglot-server-programs '(nix-mode . ("nixd")))
|
|
||||||
(add-to-list 'eglot-server-programs '(python-mode . ("pylsp")))
|
|
||||||
(add-to-list 'eglot-server-programs '(python-ts-mode . ("pylsp"))))
|
|
||||||
|
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:demand t
|
:demand t
|
||||||
|
|
@ -357,12 +341,28 @@
|
||||||
(to/set-ligatures-for-font (face-attribute 'default :family))
|
(to/set-ligatures-for-font (face-attribute 'default :family))
|
||||||
(global-ligature-mode t))
|
(global-ligature-mode t))
|
||||||
|
|
||||||
|
(use-package lsp-mode
|
||||||
|
:hook
|
||||||
|
((python-mode python-ts-mode) . lsp)
|
||||||
|
(nix-mode . lsp)
|
||||||
|
((swift-mode swift-ts-mode) .lsp)
|
||||||
|
:commands lsp
|
||||||
|
:config
|
||||||
|
(add-to-list 'lsp-language-id-configuration '(swift-ts-mode . "swift"))
|
||||||
|
(let ((lsp-sourcekit-executable (string-trim
|
||||||
|
(shell-command-to-string "xcrun --find sourckit-lsp"))))
|
||||||
|
(lsp-register-client
|
||||||
|
(make-lsp-client :new-connection (lsp-stdio-connection
|
||||||
|
(lambda () lsp-sourcekit-executable))
|
||||||
|
:major-modes '(swift-mode swift-ts-mode)
|
||||||
|
:server-id 'sourcekit-ls))))
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
(use-package magit-todos
|
(use-package magit-todos
|
||||||
:after magit
|
:after magit
|
||||||
:configp
|
:config
|
||||||
(magit-todos-mode 1))
|
(magit-todos-mode 1))
|
||||||
|
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@
|
||||||
js2-mode
|
js2-mode
|
||||||
json-mode
|
json-mode
|
||||||
ligature
|
ligature
|
||||||
|
lsp-mode
|
||||||
minions
|
minions
|
||||||
multiple-cursors
|
multiple-cursors
|
||||||
nerd-icons
|
nerd-icons
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue