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
0 answers
27 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(...
user avatar
0 votes
1 answer
28 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 ...
user avatar
0 votes
1 answer
17 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
60 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
37 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
1 answer
138 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
29 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
17 views

How can I view doc of a Python function using company along with completion candidates in Terminal CLI?

I am using company-mode for backends to auto-complete in Python and emacs is used as command line.Example output would be, but function's doc is not shown: basic setup: (require 'lsp-pylsp) (require '...
user avatar
  • 1,084
0 votes
0 answers
30 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
28 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: ":&...
user avatar
  • 1,084
0 votes
1 answer
68 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 :: ...
user avatar
  • 1,084
0 votes
0 answers
12 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 ...
user avatar
  • 902
0 votes
1 answer
39 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 ...
user avatar
  • 101
0 votes
1 answer
83 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 ...
user avatar
  • 269
0 votes
0 answers
42 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
1 vote
0 answers
160 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
1 vote
1 answer
478 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.
user avatar
0 votes
1 answer
79 views

dap-mode cpptools gives error `VTerm needs module support`

I am trying to use dap-mode to debug my C++ code. My debug template looks like: (dap-register-debug-template "cpptools::Run Configuration" (list :type "cppdbg" :request ...
user avatar
1 vote
0 answers
81 views

Scrolling through rust-lsp suggestions is very slow. How to go about debugging this?

I'm trying to set up Emacs with rust-lsp ( following this guide). The suggestions from the rust-analyzer are being picked up as you can see in the screenshot. But when I attempt to scroll through them ...
user avatar
  • 113
0 votes
0 answers
149 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
0 votes
0 answers
43 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
57 views

How to use dap-mode with TypeScript?

https://github.com/emacs-lsp/dap-mode provides DAP debugging for various languages (along the same lines as LSP does for completion, formatting, etc). How can I use that to debug programs written in ...
user avatar
0 votes
0 answers
43 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
0 votes
1 answer
94 views

How can I apply `noqa` in order to ignore warning messages when lsp-mode is enabled

I am trying to ignore flycheck warning messages, when lsp-mode for the python-mode is on. I have tried ["# noqa", "# NOQA", "# flake8: noqa", "# type: ignore"] ...
user avatar
  • 1,084
0 votes
0 answers
32 views

Why does lsp-haskell format some projects and not others?

This is the message I get when I use lsp to format the current project: lsp-request: No plugin enabled for STextDocumentFormatting, available: [] And then on another project: LSP :: Applying 22 edits ...
user avatar
  • 320
0 votes
1 answer
52 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
1 answer
76 views

lsp-rust-analyzer ignores edition value in Cargo.toml

When talking about Emacs configuration, the rust-analyzer manual mentions [...] this excellent guide from @rksm. Which I followed to good effect, in particular: (use-package lsp-mode :commands ...
user avatar
  • 375
1 vote
0 answers
73 views

How to configure emacs for use with yarn 3?

The yarn package manager suggests a snippet of elisp to use: Create a .dir-locals.el with the following content to enable Flycheck and LSP support and make sure LSP is loaded after local variables ...
user avatar
  • 155
0 votes
2 answers
193 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
88 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
1 vote
1 answer
341 views

Snippets aren't working emacs-lsp / company-mode

For whatever reason, snippets aren't working. I am getting the placeholders but I cannot navigate between them. This is the type of snippet completion that I am getting: for ${1:index}, ${2:value} in ...
user avatar
  • 11
0 votes
1 answer
583 views

How to ignore specific flycheck warning messages for Python in lsp-mode?

My goal is to configure lsp in order to ignore warning messages for flycheck in Python version. When lsp is not in use, flycheck reads from my ~/.pylintrc file in order to ignore warning messsages. ...
user avatar
  • 1,084
2 votes
0 answers
170 views

Emacs and ASP.Net Razor Pages

I am trying to get .razor and .cshtml pages working in Emacs. My config is Doom Emacs with (csharp +lsp +dotnet). No issues with the C# code, that all works fine other than absurd refactoring ...
user avatar
  • 121
3 votes
1 answer
168 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
2 votes
3 answers
361 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
1 vote
0 answers
97 views

How to install mspyls without internet?

I would like to install mspyls language server on my work machine that does not have access to an internet. I am able to transfer files over to the work machine via thumb drive. Is there a way for me ...
user avatar
  • 288
2 votes
1 answer
116 views

Is it possible to suppress `LSP :: Connected to [pyls:N].` message on minibuffer?

When I open a Python file I keep seeing LSP :: Connected to [pyls:N] message in the minibuffer. How can I suppress it? Since I know I have enabled lsp, I don't want to see that message always whenever ...
user avatar
  • 1,084
2 votes
0 answers
339 views

`lsp` does not start on python-mode-hook

I am using lsp under Python.lsp does not start when a Python file is opened, I have to do M-x lsp for each file I open. Also when I switch from find-file to another file I have to do M-x lsp all over ...
user avatar
  • 1,084
0 votes
1 answer
42 views

Toggling off all settings in python and julia to get bare setup

since recently I am using LSP for python, tex and julia on macos with spacemacs develop. To some extend this is great, but it is something awefully slow using a gui... and it seems that it is not only ...
user avatar
  • 55
5 votes
0 answers
638 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&...
user avatar
  • 51
0 votes
1 answer
422 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. ...
user avatar
0 votes
1 answer
295 views

my rust analyzer don't work on emacs 27

I recently installed the latest version of emacs and Rust-analyzer, and downloaded the lsp-mode package as well, but when I activate the rust-analyzer with the "lsp" command it simply ...
user avatar
5 votes
1 answer
223 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 ...
user avatar
2 votes
0 answers
173 views

How to remove LSP <header-line>?

I'm pretty much emacs noob. I've been tinkering in spacemacs for around a month now and got it set up pretty much how I like it. But since I updated it, header line that appears when I open a project ...
user avatar
2 votes
0 answers
246 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 ...
user avatar
0 votes
1 answer
110 views

How can I invoke Flutter "Context commands" interactively (from lsp-dart)

I was beyond stoked to discover how complete Flutter support is in Emacs these days thanks to the seemingly polished lsp-dart (featured prominently in the official "get started" docs for ...
user avatar
  • 434
1 vote
2 answers
332 views

How to disable on-the-fly diagnostics in eglot?

How can I disable any sort of on-the-fly diagnostics in eglot? This does not seem to be possible by customizing eglot-ignored-server-capabilites. Disabling flymake-mode using a major-mode-hook also ...
user avatar
  • 231
0 votes
1 answer
195 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: ...
user avatar
3 votes
0 answers
911 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-...
user avatar
0 votes
1 answer
349 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 ...
user avatar