Questions tagged [lsp-mode]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

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

I'm trying to use Golang with LSP in Emacs 27.2 (Fedora 35) but whenever I run M-x lsp-mode it shows as disconnected and when I try to run M-x lsp it shows the Lisp error: (void-function -compose). ...
user avatar
0 votes
1 answer
36 views

Unable to setup lsp-mode with lsp-pyright

I'm using Emacs 28.1 on macOS 11.6.6 (installed with brew) and want to setup a Python IDE with lsp-mode and lsp-pyright. My (not full) init.el looks like this (LSP and Python setups are at the bottom ...
user avatar
1 vote
0 answers
15 views

pylsp times out over TRAMP

I'm (unfortunately and against my will) using Windows 10 running Emacs 28.1 attempting to connect to a remote Ubuntu machine via TRAMP (currently this happens to be WSL but there are other Linux ...
user avatar
0 votes
0 answers
20 views

LSP Jedi server error

I've hit some trouble with lsp-mode and in particular lsp-jedi. I have my virtualenv selected under Emacs using pyvenv-workon and jedi-language-server is installed under the virtual environment. At ...
user avatar
  • 251
0 votes
0 answers
18 views

Keyboard shortcut for lsp-lens

I'm trying to use lsp-lens mode but it only allows you to activate lenses with mouse (or avy, which IMO is not convenient). I was unable to find a way to activate lenses with some keyboard shortcut (...
user avatar
  • 225
0 votes
1 answer
45 views

lsp mode problems: not enabled, and clangd include file not found

I am trying to configure lsp-mode with clangd using emacs 28.1 (compiled from source), and encounter two problems that I do not manage to solve: First, `lsp-mode` is not started automatically when I ...
user avatar
  • 121
0 votes
1 answer
17 views

add sonarlint in spacemacs

I've seen a sonarlint config for emacs using lsp in this link of github, and I've tried to install this without success. I've already installed lsp-sonarlint using MELPA and I've added this in ...
user avatar
0 votes
0 answers
91 views

How to set up lsp + pyright to show all errors

I'm using recent nightly emacs in Linux/WSL2. I have lsp and lsp-ui, and am using pyright as the python LSP service. (pip install pyright). I like flycheck rather than flymake. I've been using lsp ...
user avatar
  • 406
0 votes
0 answers
26 views

Lsp-mode getting weird error trying to M-x lsp

(See updates at end of question) I installed lsp-mode for php and I also installed intelephense (so the command intelephense is available in the terminal) I can open a PHP file and do M-x lsp-mode and ...
user avatar
0 votes
1 answer
31 views

How to list all references to a symbol in all translation units in the current project in lsp-mode with clangd server?

Question My would like to open up a .C file, position point (cursor) onto a symbol, type M-?, and show all references to that symbol under point, in all translation units in the project. But it does ...
user avatar
  • 269
0 votes
1 answer
18 views

Identifying functions that trigger timers and cause redisplays when profiling Emacs execution

I'm experiencing serious performance degradation whenever I'm in dart-mode and LSP is enabled. This is a strange one because Emacs I don't experience any performance degradation on a fresh instance ...
user avatar
  • 103
0 votes
1 answer
44 views

Configuration issues when using rust-analyzer from counsel-tramp

I have local MacOS(intel) machine running with emacs 27.2 and remote ubuntu 20.0 server for my personal Rust project development with rust-analyzer for lsp. When I ssh remotely and start emacs on the ...
user avatar
  • 113
3 votes
1 answer
51 views

See full compiler error when an error is truncated in lsp-mode?

Sometimes lsp-ui (I think it's lsp-ui-sideline specifically) will truncate messages so they fit on one line -- in this case a TypeScript compiler error: Note the full error message ends with is not ...
user avatar
0 votes
1 answer
43 views

How to load python layer after direnv?

In order to have lsp-pyright load after pipenv I need pyright to load after direnv. However, appending after: direnv results in an error[0] How can I have pyright starting the workspace after direnv? ...
user avatar
  • 607
0 votes
1 answer
64 views

what is the type 'repeat string'?

Here it says that the type of lsp-clients-pylsp-library-directories is (repeat string) How do I write my dir_locals.el file ? I tried this but it doesn't work (see here) ((lsp-mode . ((lsp-clients-...
user avatar
0 votes
0 answers
34 views

How do I set up intellisense-style completions for javascript using lsp-mode?

I've installed js-mode, js2-mode and lsp-mode. Acording to the docs for lsp-mode, once lsp-mode is running then intellisense-style completion should just work: https://emacs-lsp.github.io/lsp-mode/...
user avatar
  • 101
0 votes
0 answers
32 views

How to run a test at point using lsp?

I'm using https://github.com/python-lsp/python-lsp-server https://github.com/emacs-lsp/lsp-mode https://emacs-lsp.github.io/lsp-mode/ https://microsoft.github.io/language-server-protocol/implementors/...
user avatar
0 votes
0 answers
29 views

Terminal layout is broken when I turn on lsp

I use lsp-mode when I write code for Rust, C++ with this init.el settings: (use-package lsp-mode ;; reformat code and add missing (or remove old) imports :hook ((rust-mode c++-mode) . lsp) :bind ...
user avatar
  • 113
0 votes
1 answer
206 views

Completely disabling flycheck in Doom Emacs

I'm setting up Doom Emacs, and I want to remove flycheck entirely. I'm having a bit of trouble doing that, though. As an example, I'm working with Ruby, with this setup: (doom! :completion company ...
user avatar
  • 488
1 vote
0 answers
115 views

Using typescript-language-server through tramp can't find servers for typescript-mode

I am trying to work remotely on a typescript project, with lsp-mode and tramp, through SSH. I followed the documentation on lsp-mode web page to set up a remote client. Here is my config: (use-package ...
user avatar
  • 337
0 votes
0 answers
182 views

Python LSP Problems

I am having a strange problem. I have my init.el, ~/.emacs.d/lisp and a Python file tcvw.py synced between two computers running the exact same version of Emacs (27.1) and same OS (Debian Sid). In ...
user avatar
0 votes
0 answers
120 views

How to Angular LSP-mode in Spacemacs

spacemacs does not have support for angular in their layers utility. When setting up python lsp I just added the python layer in the config file then set a hook to start lsp-mode when in python mode. ...
user avatar
1 vote
1 answer
80 views

disable lsp-mode for derived mode of haskell

I am writing a major mode for a new programming language that looks very similar to Haskell, and so not surprisingly I am writing a derived mode from haskell-mode (define-derived-mode foo-mode haskell-...
user avatar
  • 113
0 votes
0 answers
62 views

Error (use-package): lsp-latex/:catch: Invalid version syntax: ‘command not found: texlab’ (must start with a number)

I've encountered this error message when attempting to export an org file with source R code blocks. Initially the error was.. Warning (emacs): Texlab executable is not found. Set ‘lsp-latex-texlab-...
user avatar
  • 251
0 votes
0 answers
34 views

How to whitelist a directory that was previously blacklisted in pylsp

I think I accidentally blacklisted a directory. More specifically myproject ├── test.py ├── folder1 ├── folder2 └── ... I had that and opened test.py then pylsp gave me the option to create/import a ...
user avatar
1 vote
0 answers
105 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. ...
user avatar
  • 123
0 votes
1 answer
242 views

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 ...
user avatar
  • 7,069
0 votes
0 answers
41 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 ...
user avatar
1 vote
1 answer
55 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": { ...
user avatar
0 votes
1 answer
264 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'...
user avatar
1 vote
1 answer
31 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 ...
user avatar
  • 123
0 votes
0 answers
51 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 ...
user avatar
  • 111
0 votes
1 answer
37 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, ...
user avatar
0 votes
2 answers
163 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 ...
user avatar
0 votes
1 answer
67 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 ...
user avatar
0 votes
0 answers
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 ...
user avatar
0 votes
1 answer
101 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 ...
user avatar
  • 123
1 vote
1 answer
96 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 ...
user avatar
2 votes
1 answer
127 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 ...
user avatar
  • 21
3 votes
1 answer
130 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-...
user avatar
0 votes
1 answer
28 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 ...
user avatar
  • 105
1 vote
1 answer
158 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 ...
user avatar
  • 41
0 votes
0 answers
375 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 ...
user avatar
  • 377
2 votes
1 answer
259 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-...
user avatar
  • 1,102
1 vote
2 answers
2k 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 ...
user avatar
1 vote
0 answers
162 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 ...
user avatar
3 votes
1 answer
374 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 ...
user avatar
  • 1,102
2 votes
3 answers
323 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-...
user avatar
0 votes
1 answer
201 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 ...
user avatar
0 votes
0 answers
142 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?
user avatar