Remove project requirement for eglot-ensure hooks
Misc formatting
This commit is contained in:
parent
ace2792607
commit
cb6b8f9ef5
34
README.org
34
README.org
|
@ -1201,16 +1201,11 @@ Configure email with iCalendar event support, to integrate with
|
||||||
("C-c c a" . eglot-code-actions)
|
("C-c c a" . eglot-code-actions)
|
||||||
("C-c c r" . eglot-rename))
|
("C-c c r" . eglot-rename))
|
||||||
:hook ((eglot-managed-mode . (lambda () (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)))
|
:hook ((eglot-managed-mode . (lambda () (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t)))
|
||||||
(nix-mode . (lambda () (if (and (project-current nil) (executable-find "nixd" t))
|
(nix-mode . (lambda () (if (executable-find "nixd" t) (eglot-ensure))))
|
||||||
(eglot-ensure))))
|
(python-base-mode . (lambda () (if (executable-find "pylsp" t) (eglot-ensure))))
|
||||||
(python-base-mode . (lambda () (if (and (project-current nil) (executable-find "pylsp" t))
|
(lua-mode . (lambda () (if (executable-find "lua-language-server" t) (eglot-ensure))))
|
||||||
(eglot-ensure))))
|
((rust-ts-mode rust-mode) . (lambda () (if (executable-find "rust-analyzer" t) (eglot-ensure))))
|
||||||
(lua-mode . (lambda () (if (and (project-current nil) (executable-find "lua-language-server" t))
|
((js-base-mode typescript-ts-base-mode) . (lambda () (if (executable-find "typescript-language-server" t) (eglot-ensure))))
|
||||||
(eglot-ensure))))
|
|
||||||
((rust-ts-mode rust-mode) . (lambda () (if (and (project-current nil) (executable-find "rust-analyzer" t))
|
|
||||||
(eglot-ensure))))
|
|
||||||
((js-base-mode typescript-ts-base-mode) . (lambda () (if (and (project-current nil) (executable-find "typescript-language-server" t))
|
|
||||||
(eglot-ensure))))
|
|
||||||
)
|
)
|
||||||
:custom
|
:custom
|
||||||
(eglot-menu-string "lsp")
|
(eglot-menu-string "lsp")
|
||||||
|
@ -1371,14 +1366,17 @@ Configure email with iCalendar event support, to integrate with
|
||||||
|
|
||||||
(use-package python
|
(use-package python
|
||||||
:hook ((python-base-mode . (lambda () (my/enable-fill-column 88)))
|
:hook ((python-base-mode . (lambda () (my/enable-fill-column 88)))
|
||||||
(python-base-mode . (lambda () (setq-local
|
(python-base-mode . (lambda ()
|
||||||
python-check-command (cond
|
(setq-local
|
||||||
((executable-find "mypy" t) "mypy --check-untyped-defs --warn-unreachable --show-error-codes --ignore-missing-imports")
|
python-check-command
|
||||||
(t "pyflakes"))
|
(cond
|
||||||
python-flymake-command (cond
|
((executable-find "mypy" t) "mypy --check-untyped-defs --warn-unreachable --show-error-codes --ignore-missing-imports")
|
||||||
((executable-find "ruff" t) '("ruff" "check" "--output-format=concise" "--stdin-filename=stdin" "-"))
|
(t "pyflakes"))
|
||||||
((executable-find "flake8" t) '("flake8" "--max-line-length" "88" "-"))
|
python-flymake-command
|
||||||
(t '("pyflakes")))))))
|
(cond
|
||||||
|
((executable-find "ruff" t) '("ruff" "check" "--output-format=concise" "--stdin-filename=stdin" "-"))
|
||||||
|
((executable-find "flake8" t) '("flake8" "--max-line-length" "88" "-"))
|
||||||
|
(t '("pyflakes")))))))
|
||||||
:custom
|
:custom
|
||||||
(python-shell-interpreter "python3")
|
(python-shell-interpreter "python3")
|
||||||
(python-shell-dedicated nil)
|
(python-shell-dedicated nil)
|
||||||
|
|
Loading…
Reference in a new issue