Questions tagged [lsp-mode]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
25 views

Use helm in specific modes and not for other buffers in different mode

I recently started using lsp-java and one of the packages it suggests is helm. The suggested changes to the .emacs file to do this is: (use-package helm-lsp) (use-package helm :config (helm-mode)) ...
1
vote
1answer
27 views

lsp-mode find symbol or refs *not* under point?

Sometimes I know the name of the function I'm looking for but it isn't used anywhere in the current buffer. With the various tags utilities I was always able to just search for a definition by name, ...
0
votes
0answers
22 views

Make lsp recognize external c++ header

I am trying to develop an application with gtk3 in c++ and I am using Spacemacs as my main emacs distribution in addition to lsp for c++. In my main cpp file, I included the following header : #...
0
votes
0answers
27 views

Suppress a warning in lsp-mode using clangd

Here's an example of code for which I get a warning when using lsp-mode, with clangd: struct A { union { struct B { int i; } b; }; }; The warning appears with a flycheck mark on ...
0
votes
0answers
64 views

Super confused with lsp-mode… inconsistent documentation with Microsoft LSP + virtualenv

Here is my lsp-mode config: (use-package flycheck :ensure t :init (global-flycheck-mode)) (setq lsp-keymap-prefix "H-l") (use-package lsp-mode :hook (;; replace XXX-mode with ...
0
votes
1answer
31 views

How to make company-lsp case sensitive?

Currently if I try to complete a work, the case of the prefix is ignored with company-lsp. From looking into the code, company-lsp is hard-coded to use ignore-case. As at the time of writing company-...
1
vote
0answers
36 views

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

tl;dr I am using :cn in Evil's Ex command line and would like to use :cnf as well, but it is not there, and I don't know what function to bind it to. Details As a former Vim user who is slowly ...
0
votes
1answer
49 views

How can I set the indentation offset for `indent-region`

I am using spacemacs + lsp layer (ccls) for c/c++ editing Having my c-basic-offset set to 4: if I select a region and press = (maybe invoking indent-region?), the region is indented by 2 spaces (...
2
votes
1answer
109 views

rust-analyzer completion broken

When I try to use auto-completion with lsp + rust-analyzer, all functions inserted like that: shared_state.clone_from(${1:source})$0 I cannot find any way to disable this "arguments". I don'...
0
votes
0answers
55 views

Cannot get Company completions to work in LaTeX mode with LSP

I am trying to get LaTeX-specific backends for company to work well with LSP and LaTeX. My problem is I cannot seem to get all the desired backends to work well together. For example, company-capf ...
1
vote
1answer
38 views

How to hide “code actions” from lsp-ui sidebar?

Hi, I want to hide "code actions" which is recommended by lsp-mode from lsp-ui sidebar. How can I do for that?
0
votes
0answers
32 views

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

Every now and then lsp-mode is adding a header to the C source code I'm working on. How can this functionality be disabled?
3
votes
0answers
46 views

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

When lsp-ui-doc offers me information about the symbol at point, it does that in a hover window (good) and in the minibuffer (bad). I've found no mention of the minibuffer in the customisations of ...
0
votes
0answers
33 views

How do I get lsp-java to show me/find javadocs for Java > 8?

So, I'm using lsp-emacs in Emacs+Arch Linux, and I was able to make it work properly for Java 8 after setting JAVA_HOME to /usr/lib/jvm/default/. The problem I'm having now is that I can't find a way ...
1
vote
1answer
113 views

Disable lsp-mode symbol highlighting?

When using lsp server, symbol highlighting obscures the highlighting done by region selection. I can toggle this behavior per-buffer with lsp-toggle-symbol-highlight, but cannot permanently disable ...
0
votes
2answers
198 views

How to correctly configure Flow backend for LSP mode?

I'm using spacemacs @develop (branch). I can't use lsp and lsp-ui. In vscode everything works (using flow lsp mode). With company-flow I can also make it working. When opening a .js file with // @...
1
vote
2answers
116 views

How to set minor mode variables in dir-locals?

Im writing an lsp-mode purescript client and couldn't figure out how to override the default config options using a .dir-locals file. For example, I have a defcustom : defcustom lsp-purescript-use-...
8
votes
1answer
1k views

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 ...
2
votes
1answer
132 views

How to improve eldoc + lsp-mode output with C/C++ comments?

When using eldoc with lsp-mode, there are some irritations with the default output. Various characters are backslash escaped, so: /* This: isn't so -> "good", you see. */ Displays as: This\: ...
0
votes
0answers
106 views

Unable to get microsoft python-language-server to work lsp-mode

Here is my python config As soon as I open a python file, I get this error: LSP :: Microsoft Python language server started LSP :: Microsoft Python language server is analyzing...done File mode ...
0
votes
0answers
22 views

How to search/filter annotation in company popup

I'm using a variant of LSP-mode Java backend. It works pretty well with company-mode with company-lsp as backend. One of the behaviors is, in case of duplicated class name, say FooFactory, in ...
1
vote
0answers
140 views

LSP sometimes working with Metals, sometimes spamming “the request has been cancelled”

I have Spacemacs configured to use Metals as an LSP backend for Scala development, i.e. my dotspacemacs-configuration-layers includes: (scala :variables scala-backend 'scala-metals ...
1
vote
0answers
320 views

Emacs configure lsp-mode / lsp-ui

I work mainly with javascript and typescript. And I have enabled lsp-mode in Doom Emacs. But I am not very happy about the descriptions and information shown to me on hover. It is not very useful and ...
3
votes
1answer
496 views

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 ...
1
vote
1answer
493 views

How to update lsp-java manually?

I'm trying to run a simple HelloWorld from Emacs using dap-mode commands dap-debug and dap-java-debug but prompted the error saying lsp-request: No delegateCommandHandler for vscode.java....
0
votes
0answers
64 views

After fixing an error and save buffer, lsp-ui still displays the error message

I am enabling flycheck syntax checking only on save with : flycheck-check-syntax-automatically '(mode-enabled save) And disabling lsp ui live reporting: (setq lsp-ui-flycheck-live-reporting ...
0
votes
0answers
122 views

Suppress the message (LSP :: not indexed)

I couldn't find an option to suppress this message on unindexed files. In my repo I have C++ files that I dont want to index and this message keeps showing up when moving the cursor between code ...
1
vote
1answer
150 views

Getting Emacs lsp-mode to work with this matlab-langserver

I am trying to get this Matlab language server to work with lsp-mode. Following the instructions in lsp-mode's github page, I inserted the following in my init.el: (use-package lsp-mode :ensure t ...
0
votes
0answers
190 views

interactively load Cabal packages within haskell-mode

I really like how I can interactively load packages and experiment at will in Common Lisp, and would like to get a similar workflow in Haskell. I've settled on Cabal (v3.0.0.0 - new command set by ...
1
vote
0answers
578 views

How do I get code signature snippets with lsp-mode/lsp-ui/company-lsp?

I see on the front page of https://github.com/tigersoldier/company-lsp when you type the function name it autocompletes not just the rest of the name, but the signature as a snippet, enabling you to ...
1
vote
1answer
207 views

Stop company-lsp from completing function arguments

I try to configure lsp-mode and company-lsp with python-language-server for python autocompletion, but when I choose completion candidate it completes with function arguments. How can I prevent this ...
1
vote
1answer
132 views

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.?
1
vote
0answers
134 views

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 ...
1
vote
1answer
543 views

How to disable semantic highlighting in lsp-mode?

Language server mode has a variable for semantic highlighting lsp-ht, I would like to disable all syntax highlighting in lsp-mode. Is this possible? (setq lsp-enable-links nil) (setq lsp-enable-...
2
votes
1answer
116 views

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

When lsp-mode is enabled all headers become clickable (draw as buttons), underlining them making them slightly harder to read. I don't need this since I can have a key bound to go to the header. Is ...
0
votes
1answer
83 views

Understanding why lsp-scala is not giving completions

I have installed lsp-mode, lip-scala, lsp-ui, company-lsp and many other packages. When entering scala code, I often get popups to complete the method/class/variable name, which also add the ...
0
votes
0answers
22 views

Emacsclient Not Opening Due to Dialogue

This is something that's vexed me for a quite a while, but has got a lot worse now that I'm using lsp-mode. In fact, I'm not sure if it is a bug in lsp-mode, Emacs or intended behavior: Say that you'...
0
votes
1answer
1k views

Running lsp-mode with Python using the pyls from the virtualenv of my project

I wish to run LSP using the pyls from the virtualenv of my project. I don't have pyls installed globally (only in the local virtualenv). I found this snippet online: (lsp-define-stdio-client lsp-...
0
votes
0answers
28 views

Get Compiler Flags for the Current File

This is something I've been mulling on for a while: Given that you are using e.g., lsp-mode for your C/C++ project and consequently have a compile_commands.json that contains the compilation flags ...
0
votes
1answer
130 views

How to debug lsp-mode “lsp-request: method not found”?

I've setup lsp-mode and clangd, and put the compile-commands.json in the projects root. I can tell compile-commands.json because my cflags are included in the Updating file output of *clangd::stderr* ...
2
votes
1answer
201 views

Use lsp-mode for some projects and ggtags for others

Is there a way to configure Emacs to activate lsp-mode for some projects and ggtags for other projects? Maybe using .dir-locals.el? I code C++ and the project I most often work on doesn't support lsp-...
1
vote
1answer
179 views

company-lsp complains about void function lsp--client-completion-in-comments

my emacs lsp-python setup is pretty standard: (require 'lsp-mode) (add-hook 'python-mode-hook #'lsp) (require 'company-lsp) (push 'company-lsp company-backends) (add-hook 'after-init-hook 'global-...
1
vote
1answer
490 views

Configuring lsp-mode to run elm-language-server

I'm trying to run lsp-mode for elm development and according to lsp-mode elm is supported. Also according to that link, I should only have to clone the elm-language-server repository, run npm install ...