21
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 ...
12
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 ...
6
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 project root
Bad form just to link but possibly this helps:
https://www.reddit.com/r/emacs/comments/adxcal/subprojects_do_i_need_to_armwrestle_projectile_or/edl7jhl/
It covers how to add workspace folders and also ...
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
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.
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)
...
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
emacs lsp-mode python how to disable certain warnings
Use
(setq lsp-pyls-plugins-pycodestyle-enabled nil)
2
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 ...
2
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.
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
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
Emacs Javascript basic code completion
This solution is not using LSP. It only uses Ctags. You could use company-mode's default backend company-etags or 3rd party package company-ctags for code completion.
The key question is how to ...
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
How to set up pyrightconfig in lsp-pyright?
You can include additional Python source paths with lsp-pyright-extra-paths. Here is my pyrightconfig.json for a project.
{
"exclude": ["**/node_modules", "**/__pycache__&...
2
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.
2
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 ...
1
vote
Accepted
How can I enable lsp-headerline-breadcrumb-mode in lsp-mode?
There is a variable you can customize that automatically enables the headerline breadcrumb mode whenever lsp-mode is active. Try something like:
(use-package lsp-mode
:custom
(lsp-headerline-...
1
vote
How can I enable lsp-headerline-breadcrumb-mode in lsp-mode?
The following snippet works for me, it enables breadcrumbs in all modes where lsp is active.
(require 'package)
(setq package-user-dir (expand-file-name "~/.emacs.d/elpa/")
package-...
1
vote
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)))
1
vote
Remap lsp-mode prefix with use-package
You want to set that variable to a string. This ought to work:
(use-package lsp-mode
:init
(setq lsp-keymap-prefix "s-k"))
You had :ensure t in there as well, but it doesn't have ...
1
vote
Use helm in specific modes and not for other buffers in different mode
Don't call helm-mode at all. Helm-mode does not introduce anything for lsp-java per se but IMO improves general emacs usability. You could use helm-lsp function without having helm-mode enabled.
1
vote
lsp-mode find symbol or refs *not* under point?
Nope. As best I can tell, the LSP protocol doesn't appear to have any facility for looking up definitions based on name rather than document position. In fact, an LSP client like Emacs doesn't even ...
1
vote
How to make company-lsp case sensitive?
company-lsp is deprecated use company-capf (just delete company-lsp and lsp-mode will pick it). company-capf is case-sensitive by default.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lsp-mode × 116lsp × 30
python × 14
spacemacs × 11
lsp-ui × 11
company-mode × 9
flycheck × 8
rust × 6
completion × 4
doom × 4
golang × 4
ccls × 4
init-file × 3
debugging × 3
tramp × 3
use-package × 3
c++ × 3
javascript × 3
directory-local-variables × 3
warning × 3
java × 3
clang × 3
key-bindings × 2
customize × 2
yasnippet × 2