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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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....
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.
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 ...
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 ...
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.
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 ...
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.
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.
...
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 ...
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)
...
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:
(...
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 ...
3
votes
How to disable eldoc doc minibuffer?
I solved using this:
(setq eldoc-echo-area-use-multiline-p nil)
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 ...
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 ....
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 ...
2
votes
emacs lsp-mode python how to disable certain warnings
Use
(setq lsp-pyls-plugins-pycodestyle-enabled nil)
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.
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 ...
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 ...
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)))
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.
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:...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lsp-mode × 163lsp × 47
python × 16
lsp-ui × 14
company-mode × 13
spacemacs × 12
flycheck × 9
java × 8
rust × 7
doom × 5
golang × 5
clang × 5
init-file × 4
debugging × 4
use-package × 4
javascript × 4
ccls × 4
eglot × 4
tramp × 3
completion × 3
directory-local-variables × 3
warning × 3
company × 3
flymake × 3
dap × 3