spacemacs

murtaza52 2023-09-18T13:15:22.574939Z

I get these msgs in the lsp-log when I browse to a json file and spacemacs tries to install a server -

Command "semgrep lsp" is not present on the path.
Unable to install vscode-langservers-extracted via `npm' because it is not present

murtaza52 2023-09-20T14:55:07.521759Z

npm is on the path I am using nvm so that puts it on the path. not sure why emacs is not able to find it.

practicalli-johnny 2023-09-20T17:11:25.437829Z

SPC f e e should open the spacemacs.env file that is computed when running Emacs and contains the PATH and other useful environment settings that Emacs uses. I would check if npm is on the path that is in the spacemacs.env file It could also be an incompatible version of npm/node. I think I am running version 18 The lsp server for json could be installed by yourself instead of letting emacs try and install it. If Emacs finds the lsp server, then it will not try and install it.

practicalli-johnny 2023-09-18T15:11:33.086849Z

Lsp-mode will prompt for an LSP server for the current major mode if it cannot find the server binary on the system path. The vscode-langservers are all (or at least mostly) installed via npm, so if Emacs doest find npm on the operating system path then it can't install the LSP server binary

practicalli-johnny 2023-09-18T15:16:47.133559Z

Basic details are in the json layer docs. If LSP is not desirable, try setting the backend to nil ( not sure if that works, but it may disable LSP and not try download the server) Otherwise install nodejs/npm and install the JSON LSP server binary or let the json majore mode trigger lsp to download the npm package https://develop.spacemacs.org/layers/+lang/json/README.html