18

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 information. So the key bindings you are looking at use super+l as a prefix. You can simulate these additional keys with some built-it sequences: C-x @ h adds the ...


11

I somehow managed to blacklist my own project, removing ~/.emacs.d/.lsp-session-v1 resolved the issue, although I might have been able to solve this using lsp-workspace-blacklist-remove


5

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 prompted for a variable, and you could type/select lsp-purescript-use-npx. Finally, you should be prompted for the value. Depending on your setup, you may or may ...


4

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 how to reset your lsp settings to get a prompt.


4

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 following: (setq lsp-clients-clangd-args '("--header-insertion=never")) For more flags, see clangd --help.


4

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.18.0 (moved over from the now obsolete package dash-functional). The latest lsp-mode.el uses that function. I fixed it by updating my spacemacs checkout to ...


4

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

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 similar behavior and uses a variable that is nearly identical, company-lsp-enable-snippet. Try disabling that with (setq company-lsp-enable-snippet nil) and see ...


3

Set lsp-enable-links to nil. This will disable lsp-mode's link support.


3

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. I would suggest referring to the metals documentation which can help you with installation: https://scalameta.org/metals/docs/editors/emacs.html (make sure ...


3

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) Documentation Entry point that defers server startup until buffer is visible. lsp-deferred will wait until the buffer is visible before invoking lsp. This avoids ...


2

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 .dir-locals.el file in the root of your "odd" project: ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ;;; ...


2

Use (setq lsp-pyls-plugins-pycodestyle-enabled nil)


2

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 the task. In the *Messages* buffer there will be something like this: Wrote /tmp/lsp-java-install4rWMay/pom.xml /usr/bin/mvn -Djdt.js.server.root=/home/kyoncho/...


2

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 <RET> Highlight references of the symbol at point.


2

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 file and the auto-completions and other features will kick in. { "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/...


2

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 generate TAGS which is read by company backend. I use my own package counsel-etags (https://github.com/redguardtoo/counsel-etags) to generate TAGS automatically. It ...


2

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.


1

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-breadcrumb-enable t))


1

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-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (unless (...


1

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 anything to do with configuring the package; instead it causes use-package to try to install lsp-mode if it isn't available. You might want to include it, or you ...


1

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

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 parse the document to get the identifier at the point. Instead it just sends the current cursor position (file name, line, and column number). This is documented ...


1

company-lsp is deprecated use company-capf (just delete company-lsp and lsp-mode will pick it). company-capf is case-sensitive by default.


1

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 error. Do something like other-window to get your cursor into error message buffer and compilation-next-file will work (and then you probably need to hit ...


1

Okay, seems like I missed part that yasnippet should be enabled. yas-minor-mode fixed it.


1

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.


1

The custom variables defined by major and minor modes are all available for setting within dir-locals. You could set lsp-purescript-use-npx to nil like so: ((purescript-mode (lsp-purescript-use-npx))) Line 1 ((...


1

@capitrane comment had the answer for me: M-x lsp-workspace-folders-add from within the project, and it started to work.


1

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 reasonably adjustable: Emacs uses pselect, which is limited to FD_SETSIZE file descriptors, usually 1024. I suspect you've got one of the file-watching utilities ...


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