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
0answers
34 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 ...
0
votes
1answer
45 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.
0
votes
1answer
21 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 ...
1
vote
0answers
28 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 ...
0
votes
0answers
51 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. ...
0
votes
0answers
25 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 ...
0
votes
0answers
16 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 ...
0
votes
0answers
29 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 ...
0
votes
1answer
49 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"] ...
0
votes
0answers
15 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 ...
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
1answer
39 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 ...
1
vote
0answers
34 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 ...
0
votes
2answers
64 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
38 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
1answer
186 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 ...
0
votes
1answer
269 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. ...
2
votes
0answers
87 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 ...
3
votes
1answer
68 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-...
2
votes
3answers
227 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
0answers
35 views

add sonarlint in spacemacs

I'm beginner in spacemacs (and emacs) and I've tried to install sonarlint. I've found a way to install in emacs, this https://github.com/emacs-lsp/lsp-sonarlint, but, how can I install this in ...
0
votes
0answers
118 views

How to configure the LSP language server

Iam trying LSP and it works great ; Upon startup a "wizard" offers you to install a server for the language you want to use it with ; I chose jstr, but now I want to try the Eslint server, ...
0
votes
0answers
21 views

Is there LSP for jython?

Is there an LSP setup that can autocomplete java libraries inside of a jython script? I have looked everywhere but naturally google thinks I meant "python" when I type "jython" and ...
1
vote
0answers
75 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 ...
0
votes
0answers
138 views

How to let `lsp` to detect flake8 disable warnings' list

I am using LSP for Python. I have following flake8 file at ~/.config/flake8, which was detected by default flycheck within emacs. I realize it is not detected by LSP and keep showing warnings for ...
0
votes
1answer
80 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 on the minibuffer. Is it possible to suppress it? Since I know I have enabled lsp, I don't want to see that message always ...
2
votes
0answers
228 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 ...
0
votes
0answers
24 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
267 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 ...
0
votes
1answer
39 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 ...
0
votes
0answers
87 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
429 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
246 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. ...
0
votes
1answer
207 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 ...
3
votes
1answer
136 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
181 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
1answer
89 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 ...
0
votes
2answers
186 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 ...
0
votes
1answer
176 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: ...
2
votes
0answers
795 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
1answer
299 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
54 views

How to pass the current scopes function symbol as an argument to an elisp function

I am trying to create an org-capture template which works with yankpad and yasnippets to such that if I am working with some c code like this: example.c static int somefunc(int a) { if (a ==5) { ...
4
votes
1answer
4k views

lsp project root

I just switched to using lsp for my C++ and Python IDE needs. However, I am running into a constant issue where Python and C++ files have the wrong root, as reported by (lsp-workspace-root). The root ...
1
vote
1answer
103 views

Use helm in specific modes and not for other buffers in different mode

I recently started using lsp-java and one of the packages it suggests is helm. The suggested changes to the .emacs file to do this is: (use-package helm-lsp) (use-package helm :config (helm-mode)) ...
0
votes
0answers
114 views

How to suppress LSP message from flickering the minibuffer height?

I am facing an annoying problem which makes working very unpleasant: I am using Go LSP (backed by gopls) on Emacs 26.3 (9.0) on Mac. While working on Go code often a message of the form LSP :: ...
1
vote
0answers
223 views

LSP sometimes working with Metals, sometimes spamming "the request has been cancelled"

I have Spacemacs configured to use Metals as an LSP backend for Scala development, i.e. my dotspacemacs-configuration-layers includes: (scala :variables scala-backend 'scala-metals ...
1
vote
0answers
1k views

Debugging with dap-mode for python and taking user input

I am trying to make dap-mode for python working on spacemacs. For the most part I was able to get it working, but I am having issues taking in input on the CLI def main(): a = input(">") The ...
1
vote
1answer
420 views

Getting Emacs lsp-mode to work with this matlab-langserver

I am trying to get this Matlab language server to work with lsp-mode. Following the instructions in lsp-mode's github page, I inserted the following in my init.el: (use-package lsp-mode :ensure t ...
2
votes
1answer
208 views

use .dir-locals.el to setup blacklist (based on projectile root) for ccls (c++mode server)

I use this setup to setup blacklists for ccls in my project: ( (prog-mode (ccls-initialization-options . (:index (:blacklist [ "^/Users/xxx/proj/dir1/" "^/Users/xxx/proj/dir2/(dir3|dir4)/"]))) ) How ...