Files
infra/dotfiles/desktop/.emacs.d/lisp/tools/lsp.el
Fabio Scotto di Santolo 54d3d81014 Add lang/python module with uv/ruff/pylsp, ANSI colors, and LSP auto-install
- Add lang/python.el: project detection, ruff format-on-save, C-c C-v -> ruff check,
  optional pylsp with auto-install via uv (asks once per session)
- Fix pylsp resolution to check .venv, uv tool path, and PATH
- Disable legacy pyls client to avoid spurious warnings
- Add ANSI color support in compilation buffers (editor.el)
- Remove python-mode/python-ts-mode from global lsp-deferred hooks (lsp.el)
- Add ruff, ty, uv packages to desktop group_vars
2026-04-17 00:07:12 +02:00

48 lines
1.0 KiB
EmacsLisp

;;; lsp.el -*- lexical-binding: t; -*-
(use-package lsp-mode
:ensure t
:commands (lsp lsp-deferred)
:hook
((c-mode
c-ts-mode
c++-mode
c++-ts-mode
sh-mode
bash-ts-mode) . lsp-deferred)
:config
;; Performance
(setq lsp-enable-symbol-highlighting t
lsp-enable-snippet t
lsp-log-io nil
lsp-modeline-code-actions-enable nil
lsp-modeline-diagnostics-enable nil
lsp-signature-auto-activate nil
lsp-enable-on-type-formatting nil
lsp-completion-provider :capf
lsp-diagnostics-provider :flycheck
lsp-headerline-breadcrumb-enable nil
lsp-enable-indentation nil
;; Disable for huge projects
lsp-enable-file-watchers nil
lsp-idle-delay 0.5))
(use-package lsp-ui
:ensure t
:config
(setq lsp-ui-doc-enable t
lsp-ui-doc-delay 0.3
lsp-ui-sideline-enable t
lsp-ui-sideline-show-code-actions t))
(use-package consult-lsp
:ensure t
:after (consult lsp-mode)
:commands
(consult-lsp-symbols
consult-lsp-diagnostics))
(provide 'lsp)
;;; lsp.el ends here