Questions tagged [lsp-mode]

lsp-mode serves as an Emacs client for the Language Server Protocol.

lsp-mode repository

Language Server Protocol

163 questions
26
votes
2 answers

What are these prefix commands that start with s-l?

I'm using lsp-mode, and I see these weird prefix commands that start with s-l. How do I type them? `lsp-mode' Minor Mode Bindings: key binding --- ------- s-l Prefix Command C-S-SPC …
Jim Hunziker
  • 425
  • 4
  • 6
10
votes
3 answers

How to debug / troubleshoot LSP "not in project or it is blacklisted." in lsp-mode?

Recently LSP has stopped working for me. I'm getting this message for all files in my project. LSP :: example_filename.c not in project or it is blacklisted. How can I investigate this, if it's blacklisted, how can I reset the blacklist?
ideasman42
  • 8,375
  • 1
  • 28
  • 105
9
votes
1 answer

lsp project root

I just switched to using lsp for my C++ and Python IDE needs. However, I am running into a constant issue where Python and C++ files have the wrong root, as reported by (lsp-workspace-root). The root is considered to be the git root (I assume from…
Tohiko
  • 1,589
  • 1
  • 10
  • 22
7
votes
3 answers

How can I associate a schema with a json file using lsp-mode/lsp-json

If you read the documentation for lsp-mode-lsp-json here, this is the section that deals with setting schemas: Available configurations lsp-json-schemas Default: nil Associate schemas to JSON files in the current project I have no idea how to use…
Pieter Breed
  • 201
  • 1
  • 4
7
votes
1 answer

How can I see all errors in a Go project with LSP mode?

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project: |- pkg1 |- pkg2 |- cmd When I'm in the pkg1/file.go file all of the following…
Robert Zaremba
  • 211
  • 1
  • 6
5
votes
1 answer

Company completion backend company-capf error error

I am using lsp-mode and company on top of Pyhton files. When I complete a function I am getting follwing error: Company: backend company-capf error "[yas] ‘yas-expand-snippet’ needs properly setup ‘yas-minor-mode’" with args (post-completion…
alper
  • 1,238
  • 11
  • 30
5
votes
0 answers

How do I make lsp-mode ignore a node_modules folder + others?

I want to know how to make lsp-mode ignore a node_modules folder (along with say, folder asdf and temp). This is what I have: (setq lsp-file-watch-ignored (rx (or "node_modules" "asdf" "temp"))) but for some reason it is not working. This official…
eoyath
  • 51
  • 2
5
votes
1 answer

Treemacs with Scala Metals/LSP: "Creating Pipe: Too Many Open Files"

I'm on spacemacs develop, emacs version 27, OSX Mojave 10.14. After adding the lsp layer and the snippet from the metals documentation here: to my .spacemacs file, treemacs will refuse to expand a directory and display its contents, giving the…
Metropolis
  • 529
  • 2
  • 16
4
votes
1 answer

See full compiler error when an error is truncated in lsp-mode?

Sometimes lsp-ui (I think it's lsp-ui-sideline specifically) will truncate messages so they fit on one line -- in this case a TypeScript compiler error: Note the full error message ends with is not assignable to parameter of type 'Stringable'., but…
Croad Langshan
  • 3,192
  • 14
  • 42
4
votes
2 answers

How to start lsp-mode connections lazily after desktop is restored?

I have configured lsp-mode as follows: (use-package lsp-mode :straight t :init (setq lsp-keymap-prefix "C-c l") :hook ((python-mode . lsp)) :commands lsp) I am also using desktop-save-mode to restore my editing state upon restart. When I…
4
votes
0 answers

I want xref-find-definitions that uses the second backend when the first backend doesn't find anything

I program in Haskell using lsp-mode with lsp-haskell. I need to have a working "jump to definition". xref-find-definitions using lsp--xref-backend sometimes fails to find the definition. xref-find-definitions using etags--xref-backend usually finds…
CrabMan
  • 255
  • 1
  • 5
4
votes
1 answer

lsp-mode: disable documentation popup

I installed rustic-mode with LSP server. They work. But now it shows docs and description of every symbol I put my cursor on. It distracts and irritates me a lot. How can I make it show the symbol info and docs on demand only when I click a certain…
user4035
  • 1,039
  • 11
  • 24
4
votes
1 answer

How do I solve `Lisp error: (void-function -compose)` when using lsp-dart?

When I load a Dart file with GNU Emacs 27.1-1 for OS X I get the following little error novel. Debugger entered--Lisp error: (void-function -compose) (-compose #'lsp--client-path->uri-fn #'lsp--workspace-client) (-keep (-compose…
Sam
  • 317
  • 1
  • 11
4
votes
2 answers

emacs lsp-mode python how to disable certain warnings

lsp-mode complies to PEP8 style guide I guess, but how can I disable certain warnings, e.g. about missing docstrings etc.?
CD86
  • 543
  • 2
  • 9
3
votes
1 answer

How to make connection to arduino LSP server?

I came across this repo arduino-language-server. My question is how to make it connect it to my emacs? (Maybe more generally, how to connect to any other LSP-server?) Currently I've installed prerequisites, and can run it (as instructed on it's…
Garid
  • 545
  • 1
  • 13
1
2 3
10 11