25 votes
Accepted

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

For historical reasons, Emacs supports key bindings for the 'super' and 'hyper' modifier keys, which you probably do not have on your keyboard. See Modifier Keys in the Emacs manual for more ...
glucas's user avatar
  • 20.3k
14 votes
Accepted

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

I somehow managed to blacklist my own project, removing .lsp-session-v1 resolved the issue. This could be located in either: ~/.emacs.d/.lsp-session-v1 ~/.config/emacs/.lsp-session-v1 Although I ...
ideasman42's user avatar
  • 8,405
9 votes
Accepted

lsp project root

You probably want (lsp-workspace-folders-add) to add sub-root directories. For example, if your Python files are located in the tests/ subdirectory, you add it as such with the command. Then, upon ...
RichieHH's user avatar
  • 848
7 votes
Accepted

How to stop lsp-mode including headers automatically for C/C++ code?

Maybe this is a bit late, but I'm also annoyed by this problem and clangd seems to have trouble working with multiple files. You can use lsp-clients-clangd-args to configure your clangd. Add the ...
Martingale's user avatar
5 votes

How to set minor mode variables in dir-locals?

As @phils suggested you should be able to run M-x add-dir-local-variable. You will be prompted for a mode, and you could type/select lsp-mode (I am guessing that is the mode name). Then, you will be ...
John Kitchin's user avatar
  • 11.6k
5 votes
Accepted

lsp-mode: disable documentation popup

Try the following. (setq lsp-ui-doc-enable nil lsp-ui-sideline-enable nil) You can check how to set/reset the options from the LSP page.
Swarnendu Biswas's user avatar
4 votes
Accepted

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

I had a similar issue with lsp-mode and treemacs, though I am using vanilla Emacs not Spacemacs. I am also using macOS. From this Reddit thread I discovered that the limits do not appear to be ...
Aaron's user avatar
  • 166
4 votes
Accepted

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

By chance, after commenting on this, hours later I ran into exactly the same issue. The cause was that spacemacs had for a while pinned its version of dash at 2.17.0, and -compose was introduced in 2....
Croad Langshan's user avatar
4 votes
Accepted

How to update installed lsp servers in lsp-mode

There is an interactive function called lsp-update-server. You can of course update the server packages manually independent of lsp.
Swarnendu Biswas's user avatar
4 votes

How do I find out what package is adding red boxes to my source code?

What I did is put the point on top of the error line and then did M-: (face-at-point) which gave erm-syn-errline. I then went greping through the source and found that it was coming from enhanced ...
pedz's user avatar
  • 365
3 votes

How can I disable the use of minibuffer in lsp-ui?

As @sergolala hints, this is eldoc related, but turning off eldoc is not the answer. Instead, see the customizable variable lsp-eldoc-render-all. There is some discussion of this variable on github ...
hexmode's user avatar
  • 131
3 votes

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

@capitrane comment had the answer for me: M-x lsp-workspace-folders-add from within the project, and it started to work.
Webdev Tory's user avatar
3 votes

Stop company-lsp from completing function arguments

There are actually two variables that drive this behavior. You tried the first one, lsp-enable-snippet and it didn't work. This means that the culprit is probably company-lsp, which engages in a ...
zaile's user avatar
  • 443
3 votes
Accepted

How to stop lsp-mode converting C/C++ includes into buttons?

Set lsp-enable-links to nil. This will disable lsp-mode's link support.
Ivan Dimitrov Yonchovski's user avatar
3 votes
Accepted

Understanding why lsp-scala is not giving completions

lsp-scala is deprecated and you should now use lsp-mode which has scala support via metals. From the lsp-scala repo: lsp-scala is now part of lsp-mode as lsp-metals. Please do not use this package. ...
Tephra's user avatar
  • 821
3 votes

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

I still don't know how to use the lsp-json-schemas variable, but with this mode properly activated in emacs you can add a top-level $schema property to the object you are presumably editing in the ...
Pieter Breed's user avatar
3 votes
Accepted

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

How about: (use-package lsp-mode :straight t :init (setq lsp-keymap-prefix "C-c l") :hook (python-mode . lsp-deferred)) The doc for lsp-deferred: Signature (lsp-deferred) ...
C4ffeine Add1ct's user avatar
3 votes

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

The accepted answer didn't work for me, since when lsp-mode is already listed as a minor mode in the saved buffers, desktop-read will activate it before lsp-deferred runs. Instead, I'm using this: (...
scry's user avatar
  • 133
3 votes
Accepted

Identifying functions that trigger timers and cause redisplays when profiling Emacs execution

M-x list-timers will show you active and idle timers, how often/when they trigger, and what function they run. The command is disabled by default, but you can enable it for one-time use or permanently ...
NickD's user avatar
  • 27.2k
3 votes

How to disable eldoc doc minibuffer?

I solved using this: (setq eldoc-echo-area-use-multiline-p nil)
Pavel P's user avatar
  • 31
3 votes
Accepted

How to fix lsp-mode for Elisp?

emacs-lisp-mode is derived from prog-mode (as so many modes are), so lsp was already being started in your Emacs Lisp buffers. The warning simply tells you that lsp doesn’t know what programming ...
db48x's user avatar
  • 16k
2 votes
Accepted

Use lsp-mode for some projects and ggtags for others

Yes, you want to use .dir-locals.el and assuming the enable/disable commands you need are functions, its pseudo-variable eval. If you have lsp-mode globally enabled, add something like this to the ....
nega's user avatar
  • 3,091
2 votes
Accepted

How to update lsp-java manually?

ATM there are no manual instructions, please open an issue in lsp-java repo. To fix your problem do: M-x lsp-java-update-server - do that to force lsp-java to download the install pom.xml and cancel ...
Ivan Dimitrov Yonchovski's user avatar
2 votes

emacs lsp-mode python how to disable certain warnings

Use (setq lsp-pyls-plugins-pycodestyle-enabled nil)
Ivan Dimitrov Yonchovski's user avatar
2 votes
Accepted

How can I disable the use of minibuffer in lsp-ui?

I think this is not related to lsp-ui. I do not have lsp-ui installed and still got annoying previews in the minibuffer in lsp-latex. Turning off eldoc-mode has solved it for me.
sergolala's user avatar
2 votes
Accepted

Disable lsp-mode symbol highlighting?

Customize the lsp-enable-symbol-highlighting option: (setq lsp-enable-symbol-highlighting nil) or via Easy Customization Interface: M-x customize-variable <RET> lsp-enable-symbol-highlighting ...
muffinmad's user avatar
  • 2,260
2 votes

Skip over remaining errors in current file to next error in next file

It's a minor glitch/bug in the Emacs error interface, compilation-next-file only works (at least as of Emacs 25) if you are in the buffer showing the error messages, not in the source file with the ...
intel_chris's user avatar
2 votes

How to focus or change point on child frame

Bind a key (or keys) to run the lsp-ui-doc-focus-frame command: (use-package lsp-ui :bind (("C-h ." . lsp-ui-doc-focus-frame)))
mankoff's user avatar
  • 4,118
2 votes
Accepted

How to shorten signature display in echo area?

The string displayed by lsp-mode is not generated by lsp-mode but by the server. If you want to achieve that open a feature request against the server that you are using.
Ivan Dimitrov Yonchovski's user avatar
2 votes
Accepted

lsp mode does not recognize standard library

I solved the issue. It was not an emacs-ccls or lsp-mode issue but a clang issue. The issue started when I installed gcc-9 on Ubuntu-18.04 using the toolchain-r/test repo: sudo add-apt-repository ppa:...
Andi's user avatar
  • 81

Only top scored, non community-wiki answers of a minimum length are eligible