mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
emacs
: LSP doesn't clean up its own mess
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
bf78a7d618
commit
941df7e990
|
@ -17,6 +17,24 @@ Disable server downloading suggestions, and other features.
|
|||
lsp-enable-on-type-formatting nil)
|
||||
#+end_src
|
||||
|
||||
Sometimes LSP mode failes to clean up after itself, so clean up its mess.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun vherrmann/cleanup-lsp-mode-post-command-hook()
|
||||
"Cleans up lsp-modes mess."
|
||||
(when (bound-and-true-p lsp-mode)
|
||||
(setq-default post-command-hook
|
||||
(--filter (not (and (consp it)
|
||||
(eq (car it) 'closure)
|
||||
(not (-difference
|
||||
'(cancel-callback method buf hook workspaces id)
|
||||
(-map #'car (cadr it))))))
|
||||
(default-value 'post-command-hook)))))
|
||||
|
||||
(add-hook 'kill-buffer-hook #'vherrmann/cleanup-lsp-mode-post-command-hook)
|
||||
#+end_src
|
||||
|
||||
|
||||
* Python
|
||||
|
||||
Using the Microsoft language server as it's the best afaik. It's weird because it doesn't lookup the path to itself via PATH but has to be statically set.
|
||||
|
|
Loading…
Reference in a new issue