Questions tagged [lsp-mode]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

Lsp-mode on org-mode babel

In my quest to find ways of making emacs more snappy, I installed lsp-mode. The main language I work with is R, and indeed using lsp-mode in .R files is much quicker than the ess built-in completion. ...
0
votes
1answer
47 views
+500

How detect when lsp-mode has loaded a files references?

I'm running into an awkward bug with lsp-mode + clangd for batch editing files. When a source file is loaded, the symbols it points to aren't immediately available (using xref-find-definitions for ...
0
votes
0answers
24 views

Hiding Lsp UI Sideline but retaining actions

I am just starting to explore the LSP configuration options. But i am facing very annoying problem with lsp-ui-sideline. I like the options that it provides but hate that it shows up right next to my ...
1
vote
1answer
24 views

How to specify lsp configuration messages in emacs?

I'm trying to configure rust analyzer to expand proc macros. According to it's documentation I have to configure my editor (i.e. emacs) to send this JSON as a LSP message: { "cargo": { ...
0
votes
1answer
37 views

How to update installed lsp servers in lsp-mode

I have installed the javascript-typescript and the eslint language servers using the lsp-install-server command. I want to make sure I'm using the latest version. Doing lsp-install-server again doesn'...
1
vote
1answer
25 views

How can I use some package after other some other packages loaded?

I am trying to start dap-mode in my golang project. I already have lsp-mode config set. for example: (use-package lsp-mode :hook ((go-mode . lsp-deferred) (rust-mode . lsp-deferred) ) ) What ...
0
votes
0answers
29 views

lsp-mode get project error report

My problem is similar to what has been described here. I also would like to know whether there is a way to show ALL errors within a (projectile) project in a flycheck error buffer. I setup Emacs with ...
0
votes
1answer
29 views

Disabling lsp-mode's autocomplete only for some languages

I am on Emacs 27.2 configured with the latest commit of Spacemacs, develop branch. I have both ocaml and lsp layer enabled. Sadly, I find lsp-mode's auto-completion with the ocaml-lsp too slow to use, ...
0
votes
2answers
37 views

emacs stalling when looking up definitions with lsp-mode and gopls

I'm using lsp-mode as lsp client and gopls as lsp backend in order to lookup function and variable definitions in go projects. On a given large repository (kubernetes) that I recently wiped and cloned ...
0
votes
1answer
30 views

unexpected "Visit tags table (default TAGS)" prompt when looking up definitions with lsp-mode and gopls

I'm using company-mode with lsp-mode as lsp client and gopls as lsp backend in order to lookup function and variable definitions in go projects. On some repositories, when I want to lookup a ...
0
votes
0answers
17 views

How to properly display info in lsp-doc window?

I am using lsp-doc package with several languages (C++, Rust, etc). For all languages, the doc window shows the text verbatim, without converting markdown language into properly formatted output (with ...
0
votes
1answer
19 views

lsp-mode Golang build tags

I am using lsp-mode with Gopls as my coding environment. But I have one file with // +build tagthis at beginning of the file. Then my emacs lsp-mode cannot work well in this file. How can I change ...
1
vote
1answer
66 views

How can I identify this popup face?

I'm trying to find the face that applies to this tooltip in LSP in rust-mode with rust-analyzer, but I'm not seeing anything when I search on: tooltip lsp popup posframe lsp-rust-analyze faces lsp-ui ...
1
vote
1answer
53 views

Auto-saving after lsp refactor

When I use lsp-rename function, the edited files are not saved automatically and I have to manually save them. Is this an expected behavior and, is it possible to change this? (I use emacs 27.2, with ...
3
votes
1answer
58 views

How to start lsp-mode connections lazily after desktop is restored?

I have configured lsp-mode as follows: (use-package lsp-mode :straight t :init (setq lsp-keymap-prefix "C-c l") :hook ((python-mode . lsp)) :commands lsp) I am also using desktop-...
0
votes
1answer
21 views

terraform tfls server always asks if restart when edit a .tf file in spacemacs

When I use terraform layer with spacemacs, after operate a .tf file, at the status bar it always notices the message below: Server tfls:3869 exited with status exit(check corresponding stderr buffer ...
1
vote
1answer
103 views

Required help with making LSP (Scala Metals) working

My current emacs version is 27.2, OS is Ubuntu 20.04,Java version is 11.0.11. I was following the official guide of installing metals on emacs, did a little change from the course at the start (I ...
0
votes
0answers
144 views

Autocomplete for Go in emacs with LSP + gopls

Following up on https://stackoverflow.com/questions/50668619/autocomplete-in-golang-in-emacs, which is now over 3 years old, but technology has evolved. I did a lot of reading on what's the latest ...
2
votes
1answer
168 views

lsp-mode How to suppress function definitions for specific functions in python

I am using lsp under Python. I have followed: https://emacs-lsp.github.io/lsp-mode/page/installation/ for its installation. (require 'lsp-mode) (add-hook 'python-mode-hook 'lsp) (add-hook 'python-mode-...
0
votes
1answer
946 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 ...
1
vote
0answers
108 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 ...
2
votes
1answer
151 views

Company completion backend company-capf error error

I am using lsp-mode and company on top of Pyhton files. When I complete a function I am getting follwing error: Company: backend company-capf error "[yas] ‘yas-expand-snippet’ needs properly ...
2
votes
3answers
169 views

How can I disable lsp-headerline?

I'm using centaur tabs, and when lsp-headerline enables my tabs hides. I want to disable that headerline using lsp-headerline-bradcrumb-mode in a hook (use-package lsp-mode :commands (lsp lsp-...
0
votes
1answer
118 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
89 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?
1
vote
2answers
193 views

How to suppress warning about positional arguments in define-minor-mode

I am on Emacs 28.0.5 and keep getting warnings about: Warning: Use keywords rather than deprecated positional arguments to `define-minor-mode' Unfortunately it is for packages I don't control like ...
0
votes
0answers
29 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 ...
1
vote
0answers
57 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. ...
2
votes
1answer
400 views

lsp-mode: disable documentation popup

I installed rustic-mode with LSP server. They work. But now it shows docs and description of every symbol I put my cursor on. It distracts and irritates me a lot. How can I make it show the symbol ...
1
vote
1answer
240 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 ...
0
votes
0answers
22 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
228 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 ...
4
votes
1answer
686 views

How do I solve `Lisp error: (void-function -compose)` when using lsp-dart?

When I load a Dart file with GNU Emacs 27.1-1 for OS X I get the following little error novel. Debugger entered--Lisp error: (void-function -compose) (-compose #'lsp--client-path->uri-fn #'lsp--...
0
votes
0answers
75 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 ...
5
votes
0answers
364 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&...
0
votes
1answer
213 views

How to configure lsp-cmake lsp server in vanilla emacs

I want to setup lsp-cmake lsp server in my vanilla emacs. I just installed lsp server using pip install cmake-language-server. I don't know how to configure in my emacs init.el to use the lsp server. ...
2
votes
0answers
59 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 ...
3
votes
1answer
104 views

How can I associate a schema with a json file using lsp-mode/lsp-json

If you read the documentation for lsp-mode-lsp-json here, this is the section that deals with setting schemas: Available configurations lsp-json-schemas Default: nil Associate schemas to JSON files ...
2
votes
0answers
153 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 ...
0
votes
0answers
127 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
21 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
167 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: ...
1
vote
3answers
473 views

Emacs Javascript basic code completion

I try to set proper completions/suggestions for Javascript. There is no problem with ES6+ and Typescript types and defined variables but most of the time I work with vanilla JS in browser context, so ...
0
votes
0answers
124 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 ...
2
votes
0answers
758 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-...
0
votes
0answers
127 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
276 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 ...
1
vote
1answer
1k views

lsp mode does not recognize standard library

Today I did two things: I upgraded some emacs packages (don't know which ones) I installed in addition to emacs 27.1, emacs 28 with native compilation I built the "gccemacs" in a separate ...
2
votes
1answer
158 views

How to shorten signature display in echo area?

Currently, the signature of the current function the pointer is on is shown as follows: as you can see, the signature is so large that it overflows the echo area. I was wondering if there could be a ...
1
vote
2answers
805 views

How can I enable lsp-headerline-breadcrumb-mode in lsp-mode?

I would like to enable lsp-headerline-breadcrumb-mode in every buffer where lsp-mode is active. I'd know how to do it for every mode, for example (use-package go-mode :ensure t :config (add-hook ...