As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [lsp]

This tag is to be used for questions related to the Emacs implementations of the client-side of the Language Server Protocol. These implementations aim to provide an IDE-like experience, by providing optional integration with many popular Emacs packages.

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

lsp-mode + rust_analyzer: How to add workspace directory automatically without requiring .git directories next to the Cargo.toml file?

I've set up lsp mode with rust using https://robert.kra.hn/posts/rust-emacs-setup/ mostly successfully. I can create a new hello-world directory inside /tmp just fine. Opening up main.rs inside that ...
bgoodr's user avatar
  • 319
0 votes
1 answer
101 views

Javascript LSP mode in Emacs (using typescript-language-server) uses inconsistent indentation between files

On the first file I created, I had tabs set to 4 spaces and wasn't using the LSP yet. Then I enabled the LSP, and on all subsequently created files tabs are 2 spaces, yet on the original file, it ...
Alexis Dumas's user avatar
1 vote
2 answers
214 views

How to enable inlay hint in Eglot + Clangd

Using Emacs 30, eglot is built in emacs and now it supports inlay hints capability of LSPs. Now I want to use clangd with eglot with inlay hints enabled, but it seems that it does not work out of the ...
Nixmd's user avatar
  • 131
1 vote
0 answers
38 views

Emacs LSP server inside docker container hanging on startup

I'm trying to use emacs lsp and pyright server with docker. I'm trying to use custom containers as explained here. I've managed to setup this super simple test project. The lsp server starts, however ...
Freder's user avatar
  • 11
1 vote
1 answer
108 views

Can I use a local language server for remote files?

Is it possible to have eglot use a language server running on my local machine to work on files on the remote machine? I'm trying to edit TypeScript files on a remote server. I can visit the file just ...
Evan Davis's user avatar
0 votes
1 answer
143 views

How to setup maven for lsp-java

I need to import gurobi.jar to my project to correctly view the flycheck's errors. I have read Maven in 5 Minutes and How to add local jar files to a Maven project? but I am still not able to ...
Francesco Cadei's user avatar
0 votes
0 answers
69 views

How to install and setup lsp servers for vanilla emacs

I wanted to install lsp-servers in emacs to allow my transition from VS-Code easier, however, when I tried to install lsp-mode from MELPA, I got the following issue: https://melpa.org/packages/...
Saurav Chittal's user avatar
1 vote
0 answers
40 views

How to add a secondary flycheck checker to lsp-ui

Because the lsp package sets the default checker to lsp (chaining not supported) I am using this WA to chain another checker to lsp: (defvar-local my/flycheck-local-cache nil) (defun my/flycheck-...
Mihai's user avatar
  • 143
0 votes
0 answers
28 views

Java-LSP freezes from Flymake error

I am very new to Java and have only been using an lsp for the past month or two. I have done some projects in Go, Python and Rust with lsp-mode and haven't had any problems. Now that I have been ...
Hercislife's user avatar
0 votes
1 answer
66 views

lsp mode with mysql

Can lsp mode be used with a mysql server. I've setup lsp for some languages but cannot succeed with mysql. So far to connect I use emacsql package with a sql-connection-alist defined. This is what I ...
Michel Lecomte's user avatar
0 votes
0 answers
81 views

How can I selectively disable addon LSPs on a project, without blocklisting the project itself?

I work on several open source and commercial ruby projects, all of which have different sets of development tools installed. Some of them have solargraph available, some do not. Of those, some have ...
Chris R's user avatar
  • 190
0 votes
0 answers
23 views

How can I suppress signatures for specific functions in lsp-mode?

In lsp-mode lsp-signature-activate (12. Signature help) is activated by default. Sometimes some signatures are so long where they took large space. Is it possible to black-list some specific function ...
alper's user avatar
  • 1,164
0 votes
0 answers
28 views

Why does lsp-mode stop at "starting" when trying to connect to arduino-language-server?

I tried to create an arduino-lsp language server client for emacs. I followed the instructions from Adding support for languages and got some promising first output in the Messages buffer: LSP :: ...
Markus Grunwald's user avatar
0 votes
1 answer
79 views

How to disable LSP-bridge's path-completion on certain directories?

Goal: Disable LSP-Bridge's path-completion on /bin/ directory. But let it be work on other directories. (I really like it) Why: When I edit some small shell scripts, path-completion feature hangs ...
Garid's user avatar
  • 505
0 votes
1 answer
203 views

Company-dabbrev does not work on eglot

I use emacs 28/29 on windows. this is my config. (use-package company :ensure t :pin gnu :init (global-company-mode) :config (setq company-backends '(company-dabbrev) company-idle-delay ...
Bergfried's user avatar
0 votes
0 answers
40 views

using emacs + eglot + pascal-language-server + company-mode

My stack is the following: i use eglot as an lsp client i use company-mode for completion i use pascal-language-server which i packaged myself, so this could be the issue I got the same stack ...
laalsaas's user avatar
0 votes
1 answer
129 views

How to set eglot for wasm and go-lang?

I'm just trying to learn Go Language, and WASM with Go-language. My emacs setup (eglot + gopls) works completely fine when I'm working on just go scripts. However, When I trying to learn wasm+go, ...
Garid's user avatar
  • 505
0 votes
1 answer
369 views

how to configure Eglot over TRAMP?

On my laptop, I'm using eglot (sometimes lsp-mode) with pyright language server. But Now I'm trying to write some python code on Raspberry Pi (using ssh/TRAMP, in local network, from my laptop). I ...
Garid's user avatar
  • 505
0 votes
2 answers
41 views

Store output of xref-find-apropos in a variable within elisp code

Is it possible to extract the results returned by xref-find-apropos to a variable within elisp code? In particular, I want to get all files names where the found symbol occurs. So what I want is ...
Evgenii.Balai's user avatar
3 votes
1 answer
272 views

How to make connection to arduino LSP server?

I came across this repo arduino-language-server. My question is how to make it connect it to my emacs? (Maybe more generally, how to connect to any other LSP-server?) Currently I've installed ...
Garid's user avatar
  • 505
0 votes
0 answers
133 views

LSP over TRAMP: Method 'docker' is not known

When opening a remote file and trying to use LSP over TRAMP I see an error Method 'docker' is not known. The LSP log says the language server is in the path but M-x lsp only shows the error Method '...
Connor Fuhrman's user avatar
0 votes
1 answer
300 views

How to find interface implementations with `gopls` and `lsp-mode`?

While running gopls and lsp-mode on a Golang project, is there a way to list all implementations of an interface's function? When invoked on a function name, xref-find-definition jumps inside the ...
anon2328's user avatar
0 votes
0 answers
164 views

Problems with eglot and rust-analyzer

I've been trying to switch to eglot as my LSP client in Emacs but today I've found an issue I can't figure out how to solve. I'm getting a lot of diagnostic errors from rust-analyzer about proc ...
yorodm's user avatar
  • 111
0 votes
1 answer
238 views

Type / Annotation hints with lsp. Working example?

Can somebody who has made type hints work give the init.el example that shows how? And provide description of how it works for you inside Emacs? I gather that some people have successfully moved from ...
pauljohn32's user avatar
0 votes
0 answers
33 views

lsp failing while requiring uninstalled packages

I have (I think) installed lsp and lsp-java. My java mode hook starts with (message "Running my-java-mode-hook") (auto-revert-mode) ;; Set up lsp (require 'lsp-mode) (require '...
Troy Daniels's user avatar
0 votes
0 answers
51 views

How to edit Vue3 files?

is there a normal package for editing the vue3 framework, and .vue files in general? I'm currently using the volar language server volar-lsp, but I feel a bit odd because it's sluggishly slow. I'm not ...
KiwiB0y's user avatar
  • 21
0 votes
1 answer
200 views

Unable to import project with lsp/lsp-mode, persistent completing-read popup message

I recently had to redo my development setup, I'm using Clojure and clojure-lsp as lsp server, and every time I open a project file I get the message `"x" file is not part of any project"...
stigma's user avatar
  • 113
0 votes
0 answers
29 views

How can I blacklist a folder but not its subfolders in lsp?

I am using lsp-mode and want to blacklist specific folders, such as ~, but not their subfolders. The way I do it, from following answer https://emacs.stackexchange.com/a/73411/18414: (setq lsp-...
alper's user avatar
  • 1,164
0 votes
1 answer
150 views

How can I add home folder (`~`) into lsp-workspace-blacklist

I want to add user's home folder (~) into the lsp-workspace-blacklist in the init file. Is it possible to achieve this in the init file? I have tried (lsp-project-blacklist (quote ("~"))) ...
alper's user avatar
  • 1,164
1 vote
1 answer
673 views

Problem debugging on dap-mode

I am new to emacs and I was following this tutorial to configure lsp-mode: https://emacs-lsp.github.io/lsp-mode/tutorials/CPP-guide/ But dap-debug does not work. Everytime I try to debug, it doesn't ...
XStein17's user avatar
0 votes
0 answers
21 views

Convert a Double Space Indentation to Tab (width - 4) Indentation

I am facing this problem which on the face of it should be easy to solve but isn't. this is my .editorconf: root = true [*] indent_style = tab tab_width = 4 end_of_line = lf charset = utf-8 ...
Vipul Rajan's user avatar
0 votes
1 answer
18 views

How can I emulate the eclipse jdt open type action in emacs lsp-java?

In eclipse jdt, there's the open-type command, which opens a window and you start typing the name of a type. While typing, the list of candidates are shown in that window is filtered dynamically and ...
zedoo's user avatar
  • 103
1 vote
1 answer
197 views

indent-region does not respect my c-mode style

This is my C style: (defconst mira-c-style '((c-basic-offset . 4) (indent-tabs-mode . nil) (tab-width . 7) (c-comment-only-line-offset . (0 . 0)) (c-lineup-C-comments . 0) (c-...
Gauthier's user avatar
  • 489
0 votes
1 answer
224 views

python linting not working with eglot

System: Mac OS 12.5 Emacs 28.1 from homebrew Python 3.9.13 using a virtual env python-lsp-server For some reason my linting, with error highlighting is not working with Python using eglot. In the ...
Vince W.'s user avatar
  • 395
0 votes
0 answers
373 views

"Error running timer file missing doing vfork" Emacs dap debug C++

I've c++ cmake project beginning-cpp20. The project structure as as below - $ tree . . ├── CMakeLists.txt ├── launch.json └── meetingcpp.cpp The contents of CMakeLists.txt is - cmake_minimum_required(...
Rajkumar Natarajan's user avatar
0 votes
1 answer
130 views

Is it possible to use LSP for font-lock or indentation?

I'm writing C++ and running into problems with font-lock-mode often getting confused by more obscure language features (e.g., operator""_ud). I also find that indentation doesn't work very ...
user3188445's user avatar
0 votes
1 answer
42 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). ...
Kolt Penny's user avatar
1 vote
1 answer
965 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 ...
SilkyRock's user avatar
1 vote
0 answers
184 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 ...
Connor Fuhrman's user avatar
0 votes
1 answer
1k 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 ...
user52366's user avatar
  • 131
1 vote
1 answer
109 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 ...
chavalife17's user avatar
0 votes
0 answers
98 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 ...
cheryllium's user avatar
0 votes
1 answer
107 views

LSP: Bad JSON object: ":", 97

I am using gccemacs, where emacs is build with --with-native-compilation configuration option. After compilation is done,when I run M-x lsp: I start to have following error: Bad JSON object: ":&...
alper's user avatar
  • 1,164
0 votes
1 answer
542 views

How can I list folder names that are added into lsp-workspace?

I am able to add my repo into lsp-workspace using: lsp-workspace-folders-add. When I open a file, if its root repo is located in the lsp-workspace, in the minibuffer I see following message: LSP :: ...
alper's user avatar
  • 1,164
1 vote
0 answers
18 views

Scala metals: "Expression type:" appears under the modeline instead of type information

I've installed metals according to the instructions here https://scalameta.org/metals/docs/editors/emacs/ and it mostly works (go-to-definition, etc) but there are unfortunate times when instead of ...
irregular's user avatar
  • 952
1 vote
1 answer
58 views

Emacs hide some of the documents in Typescript

I'm using Doom emacs. I developing an App in Typescript. I just encounter a strange behavior of Emacs that compact the description of lsp-buffer like in the image below. Does anyone know how to ...
Chop TRAN's user avatar
  • 111
0 votes
1 answer
437 views

How to disable lsp-clangd server if there is no dominating compile_commands.json

I've got lsp mode, projectile mode, and flymake modes, working pleasantly for C++ running using a clangd language server. However, I have many, many directories that (at least for now) do not have ...
bgoodr's user avatar
  • 319
1 vote
1 answer
254 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/...
Mittenchops's user avatar
1 vote
0 answers
389 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 ...
meguli's user avatar
  • 347
5 votes
2 answers
2k views

How to uninstall lsp servers

How do you uninstall lsp servers. I see the functions to update and install, but none to remove or uninstall. I am using spacemacs, but an answer for vanilla emacs still helps.
young_souvlaki's user avatar