Skip to content

Logic for lsp-server-install-dir is incorrect #4758

Open
@bjourne

Description

@bjourne

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

This code:

(defcustom lsp-server-install-dir (expand-file-name
                                   (locate-user-emacs-file (f-join ".cache" "lsp")))
  "Directory in which the servers will be installed."
  :risky t
  :type 'directory
  :package-version '(lsp-mode . "6.3")
  :group 'lsp-mode)

My path to init.el is ~/.config/emacs/init.el so the installation directory will be set to ~/.config/emacs/.cache/lsp/. I suggest that user-emacs-directory should be used instead. There is no need for the ".cache" prefix since the directory is located inside the emacs config hierarchy.

Steps to reproduce

LSP server install with no ~/.emacs file.

Expected behavior

The install directory should make more sense (e.g., not contain two dots)

Which Language Server did you use?

TypeScript

OS

Linux

Error callstack

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions