2023-05-01 19:18:27 +02:00
|
|
|
(use-package lsp-mode
|
|
|
|
:init
|
|
|
|
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
|
|
|
|
(setq lsp-keymap-prefix "C-c l")
|
|
|
|
:hook (
|
|
|
|
(ansible . lsp)
|
|
|
|
;; if you want which-key integration
|
|
|
|
(lsp-mode . lsp-enable-which-key-integration))
|
2023-05-01 20:26:32 +02:00
|
|
|
:config
|
2024-02-23 09:30:01 +01:00
|
|
|
(with-eval-after-load 'lsp-mode
|
|
|
|
(lsp-register-client
|
|
|
|
(make-lsp-client :new-connection (lsp-stdio-connection "nixd")
|
|
|
|
:major-modes '(nix-mode)
|
|
|
|
:priority 0
|
|
|
|
:server-id 'nixd)))
|
2023-05-01 20:26:32 +02:00
|
|
|
(lsp-treemacs-sync-mode 1)
|
2023-05-02 20:51:17 +02:00
|
|
|
(setq company-minimum-prefix-length 1
|
2023-06-02 14:47:11 +02:00
|
|
|
company-idle-delay 0.0 ;; default is 0.2
|
2023-06-21 21:14:32 +02:00
|
|
|
gc-cons-threshold 100000000
|
|
|
|
read-process-output-max (* 1024 1024)
|
|
|
|
lsp-idle-delay 0.500
|
2023-07-04 11:43:05 +02:00
|
|
|
lsp-pylsp-plugins-pycodestyle-enabled nil
|
|
|
|
lsp-pyls-plugins-pycodestyle-enabled nil
|
2023-07-07 17:04:24 +02:00
|
|
|
lsp-pylsp-plugins-flake8-enabled nil
|
2023-06-02 14:47:11 +02:00
|
|
|
lsp-pylsp-plugins-pylint-enabled t)
|
2023-05-01 19:18:27 +02:00
|
|
|
:commands lsp)
|
|
|
|
|
|
|
|
;; optionally
|
|
|
|
(use-package lsp-ui :commands lsp-ui-mode)
|
|
|
|
;; if you are ivy user
|
|
|
|
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol)
|
|
|
|
;; (use-package lsp-treemacs :commands lsp-treemacs-errors-list)
|
|
|
|
|
|
|
|
;; optionally if you want to use debugger
|
|
|
|
(use-package dap-mode)
|