Questions tagged [lsp-mode]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 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 '...
0 votes
0 answers
16 views

Utterly failing to get lsp-mode to work via lsp-docker for Ruby using Solargraph

I'm working on a Rails project and using Docker containers with a web and a db container. The Rails files are on the laptop and mounted into the web container. The web container has the Ruby ...
  • 293
0 votes
1 answer
33 views

dap mode python not work [closed]

I'm trying to enable dap-mode for python. I use Emacs doom. I use dap-mode +lsp with debugpy. After installing dap-breakpoint-toggle, I run dap-debug-last and get: error in process filter: Server[1] ...
0 votes
0 answers
13 views

How to get flycheck to show errors withou needing to save file

Flycheck only shows errors once I save the file. Is there a way for flycheck to check as I type? many thanks :) Syntax checkers for buffer Lib.hs<my-project4> in haskell-mode: First checker to ...
0 votes
0 answers
8 views

LSP clangd + company-mode writes ${n: Variable} strings

I am not sure what exactly to google, on this issue. I have emacs 28.1 installed, with LSP-clangd and company-mode installed. Suppose a function have signature int func(int i, int j), then emacs ...
  • 113
0 votes
0 answers
12 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 ...
  • 21
0 votes
1 answer
23 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"...
  • 113
0 votes
1 answer
39 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 ("~"))) ...
  • 1,124
0 votes
1 answer
99 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 ...
0 votes
1 answer
6 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 ...
  • 103
0 votes
1 answer
41 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-...
  • 387
0 votes
0 answers
21 views

When using company and lsp, why does the placeholder text sometimes not get replaced?

In a buffer in c-mode with the following content (with point after retu), pressing enter completes to return expression;. int main(int argc, char** argv) { retu } Point is now at the beginning of ...
  • 143
0 votes
0 answers
22 views

Prettify symbols in lsp-lens

I have no problem prettifying symbols in major mode but I tried to prettify lenses and nothing happens. I added a hook in my lsp-mode configuration: :hook (lsp-lens-mode . (lambda () (...
  • 230
0 votes
1 answer
33 views

With LSP, how to get an "input()" in python that works when entering data using the keyboard

Here is a minimal example: I created and activate a virtual environment: ~/BacSable/bac2 $ mkvirtualenv minimal_env created virtual environment CPython3.10.5.final.0-64 in 651ms creator ...
0 votes
0 answers
44 views

lsp-jedi debugging

I've encountered issues with lsp-jedi apparently sending a bad message to jedi-language-server which causes an Invalid Params error in Pythons pygls. Having sought assistance from the author(s) of ...
  • 283
0 votes
0 answers
66 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(...
0 votes
0 answers
17 views

Juggling multiple lsp-mode servers for the same file extension

My emacs is set up with lsp-mode that works well for TypeScript & JSX using ts-ls. However, now that I'm exploring deno, lsp-mode incorrectly sets up my deno projects with ts-ls, and I can't ...
  • 101
0 votes
1 answer
42 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 ...
1 vote
1 answer
206 views

How to disable eldoc doc minibuffer?

While using eldoc, it constantly updates the minibuffer with the symbol on point. I like it, but would like the displayed lines to be lesser, as it covers a lot of my window. I tried putting the ...
1 vote
1 answer
206 views

Corfu autocompletion popups are not working with lsp-ltex

I can get autocompletion with corfu to work with txt files, but not when I enable lsp. Here is a MWE which I use as init.el. (setq straight-build-dir (format "build/%d%s%d" ...
0 votes
0 answers
100 views

How do I set up a container so Emacs LSP can run a Python IDE with pyright?

I am trying to update old python code using a TensorFlow v1 container (I will eventually port it to either TensorFlow v2 or PyTorch). I have an emacs Python environment already set up and used locally ...
0 votes
1 answer
19 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). ...
0 votes
1 answer
199 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 ...
1 vote
0 answers
73 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 ...
0 votes
0 answers
52 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 ...
  • 283
0 votes
0 answers
32 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 (...
  • 225
0 votes
1 answer
425 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 ...
  • 131
1 vote
1 answer
48 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 ...
0 votes
0 answers
608 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 ...
  • 426
0 votes
0 answers
42 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 ...
0 votes
1 answer
87 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 ...
  • 289
0 votes
1 answer
34 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 ...
  • 103
0 votes
1 answer
93 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 ...
  • 113
3 votes
1 answer
173 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 ...
0 votes
1 answer
88 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? ...
  • 629
0 votes
1 answer
120 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-...
0 votes
0 answers
77 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/...
  • 101
0 votes
0 answers
79 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/...
0 votes
0 answers
45 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 ...
  • 113
0 votes
1 answer
510 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 ...
  • 488
1 vote
0 answers
221 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 ...
  • 337
0 votes
0 answers
286 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 ...
0 votes
0 answers
192 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. ...
1 vote
1 answer
138 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-...
  • 113
0 votes
0 answers
82 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-...
  • 283
0 votes
0 answers
53 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 ...
1 vote
0 answers
199 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. ...
  • 123
0 votes
1 answer
432 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 ...
  • 7,441
0 votes
0 answers
50 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
1 answer
106 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": { ...