People who code: we want your input. Take the Survey

Questions tagged [lsp-mode]

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

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
163 views

How do I make lsp-mode ignore a node_modules folder + others?

I want to know how to make lsp-mode ignore a node_modules folder (along with say, folder asdf and temp). This is what I have: (setq lsp-file-watch-ignored (rx (or "node_modules" "asdf&...
3
votes
0answers
435 views

How can I see all errors in a Go project with LSP mode?

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project: |- pkg1 |- pkg2 |- cmd When I'...
2
votes
0answers
32 views

Hide ifdef(or gray out) through compile_command.json

I've just finished to set up LSP with ccls and company packages. It works but I have one more possible wish that such LSP packages could do. Now I'm using hide-ifdef package to gray out the inactve ...
2
votes
0answers
591 views

Company: backend company-capf error

I'm using emacs-lsp with company-capf. While editing an elisp file, it works fine. However, once I run eval-buffer, I get the following error when trying to use completion: Company: backend company-...
2
votes
1answer
373 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\: ...
1
vote
0answers
28 views

enable flycheck/syntax checker for Java in Spacemacs

I'm a java developer and I'm beginner using spacemacs, I've configured .spacemacs file to java configuration. Many functionalities works well, for example, a class recognition when I'm coding, but in ...
1
vote
0answers
33 views

I want xref-find-definitions that uses the second backend when the first backend doesn't find anything

I program in Haskell using lsp-mode with lsp-haskell. I need to have a working "jump to definition". xref-find-definitions using lsp--xref-backend sometimes fails to find the definition. ...
1
vote
1answer
90 views

Use golangci-lint with lsp-mode

How can I set up golangci-lint as the linter with my config? I've tried using flycheck-golangci-lint but it doesn't seem to be working. I'm testing my config by opening a .go file with an ineffectual ...
1
vote
0answers
76 views

Enable LSP in spacemacs only for certain languages?

The spacemacs LSP layer documentation says: Enabling this layer will set the used backend for all supported languages to LSP unless you explicitly set a specific backend for the language. I find ...
1
vote
0answers
78 views

How to focus or change point on child frame

I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I ...
1
vote
1answer
70 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
0answers
114 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 ...
1
vote
1answer
469 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 (...
1
vote
0answers
187 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
630 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 ...
1
vote
1answer
324 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 ...
1
vote
0answers
1k 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
0answers
229 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 ...
0
votes
0answers
5 views

How to set up pyrightconfig in lsp-pyright?

I am using lsp-pyright[1] module in doom Emacs for Python major mode. Local imports from my project are not recognized by lsp server. I have created a pyrightconfig.json file in root directory of my ...
0
votes
1answer
27 views

lsp-mode tramp auto-completions

Ive set up remote lsp-mode with tramp and pylsp server. While the server does start when I open a remote py file, many server features such as auto completions, code format, references dont work. Here ...
0
votes
0answers
37 views

How can I set up Emacs to use Flycheck and pylint django?

I use lsp-mode and flycheck. My .pylintrc config: [MASTER] load-plugins=pylint_django What other settings do I need?
0
votes
0answers
20 views

List classes, methods, and funcs with helm

I want a list of functions, classes, and methods, without imports or variables, that matches the ordering in the current file. Since I use helm-swoop, I would like to be able to do this with helm. I ...
0
votes
0answers
13 views

go module with subdirectory of git project is showing compilation errors in emacs using lsp-mode

I've my emacs setup for golang development. My golang config is github If I have go mod in the same directory as git root directory then it is working fine in emacs. example project here But If I've ...
0
votes
0answers
80 views

“Failed to get project GHC version:CradleError” cabal haskell project is not working fine with haskell-language-server-wrapper

I've installed haskell platform in my linux system using ghcup. I've setup language server configuration for haskell which is github like this. Then I've created a cabal project mkdir cabal_project ...
0
votes
0answers
35 views

How to get variable type definition in lsp for using in Lisp code?

I want a helper command for refactoring code in Go language. I have not found ready for use function for this task in go-mode and lsp. It should declare variable from the word under the point and ...
0
votes
0answers
64 views

How do I turn off whitespace-mode within flycheck-mode and lsp-mode (in doom emacs)?

I've enabled whitespace-mode and I'm correctly able to see my spaces, tabs, and newlines. But the spaces also show up when I receive messages from emacs (ie when I get error messages and code action ...
0
votes
0answers
15 views

Server metals:4410 status:starting exited with status exit. Do you want to restart it? (y or n)

I'm trying to setup my emacs editor as scala IDE. I'm following the instruction from the page https://scalameta.org/metals/docs/editors/emacs.html to do the set up. when I'm importing sbt project into ...
0
votes
1answer
140 views

the following functions might not be defined at runtime: lsp-format-buffer, lsp-organize-imports function ‘dap-go-setup’ is not known to be defined

I 've below emacs init file config setup I'm getting below error in the emacs startup. I don't know what might be the root cause of the issue the following functions might not be defined at runtime: ...
0
votes
0answers
56 views

“Error running timer: (wrong-type-argument listp ” when debugging in emacs using dap-mode lsp-java

I've a gradle project imported into emacs using treemacs. When I try to debug the project I get error - LSP :: Please open an issue in lsp-mode for implementing `vscode.java.resolveMainClass'. (error ...
0
votes
0answers
88 views

file mode specification error (wrong-type-argument lsp--client nil)

I'm using lsp-java package as java IDE and syntax completion. Below is my configuration (require 'lsp-java) (add-hook 'java-mode-hook #'lsp) (condition-case nil (require 'use-...
0
votes
1answer
188 views

File mode specification error: (void-variable lsp-csharp--action-client-find-references)

I'm using doom emacs. my ~/.doom.d/config.el is - (use-package! lsp-mode :hook (haskell-mode . lsp) :commands lsp) (use-package! lsp-ui :commands lsp-ui-mode) (use-package! lsp-haskell :after ...
0
votes
0answers
25 views

Help required wrt. lsp-mode with gopls on Windows natively without WSL

I am currently running Emacs 27.1 on Windows 10. I am using lsp-mode with gopls with Go installed natively (without WSL). I am running into issues setting it up. Specifically, I am running into: https:...
0
votes
0answers
29 views

lsp-clojure starts 3 times

lsp-clojure is executed 3 times when I start emacs so it ends up using about 2.5G of memory. $ ps aux | fgrep java benwiz 7920 82.8 8.7 6107672 1068712 ? Ssl 08:11 1:18 java -Xmx2g -...
0
votes
1answer
165 views

C++ lsp-mode: inconsistent behavior between remote and local projects

I've run into a bit of an odd problem trying to use lsp-mode. My problem setup is as follows: I'm working on a C++ project on my computer, and I'd like to be able to use lsp-mode with it. The catch is ...
0
votes
0answers
23 views

How to perform lookups using lsp-mode on code inside comments?

I would like to be able to perform lsp-mode operations on code comments, for example I would like to be able to run lsp-find-definition on this. void my_fn(struct Foo bar) { /** This is a doxygen ...
0
votes
0answers
266 views

What are the lsp-mode equivalents for “tide-rename-file” and “tide-project-errors”?

I recently moved from tide-mode to lsp-mode for TypeScript development and I'm struggling to find some equivalent functionality: M-x tide-project-errors: Similar to tsc --noEmit, opens a buffer that ...
0
votes
0answers
161 views

Updating the lsp-mode package always faills, works full re-install of the package

In emacs 27 (built from git), after upgrading all packages (including lsp-mode using): emacs -batch -u "$USER" -f package-utils-upgrade-all -kill The upgrade it's self prints a lot of ...
0
votes
0answers
165 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
1answer
153 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-...
0
votes
2answers
481 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 // @...
0
votes
0answers
227 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 ...
0
votes
1answer
2k 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
1answer
260 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* ...