Move known temporary files of LSP into `spacemacs-cache-directory`.

By enabling all layers referring to lsp and searching packages they depend
on, currently I found these variables:
`lsp-server-install-dir`
`lsp-session-file`
`lsp-eslint-library-choices-file`
`lsp-yaml-schema-store-local-db`
`lsp-vetur-global-snippets-dir`
This commit is contained in:
Ray 2021-03-16 10:19:13 +08:00 committed by Maxi Wolff
parent b5aea5610e
commit acea332435
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
2 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -11,7 +11,6 @@
.emacs.desktop
.emacs.desktop.lock
.extension
.lsp-session-*
.mc-lists.el
.places
.python-environments/

View File

@ -34,6 +34,15 @@
(defun lsp/init-lsp-mode ()
(use-package lsp-mode
:defer t
:init
(setq lsp-cache-dir (concat spacemacs-cache-directory "lsp/")
lsp-server-install-dir lsp-cache-dir
lsp-session-file (concat lsp-cache-dir (file-name-nondirectory ".lsp-session-v1"))
lsp-eslint-library-choices-file (concat lsp-cache-dir ".lsp-eslint-choices")
lsp-yaml-schema-store-local-db (concat lsp-cache-dir "lsp-yaml-schemas.json")
lsp-vetur-global-snippets-dir (concat lsp-cache-dir ".snippets/vetur")
;; If you find something else should be ignored, you could also set them here
)
:config
(progn
(if lsp-use-upstream-bindings