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
20 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
0answers
8 views

Server metals:4410 status:starting exited with status exit. Do you want to restart it? (y or n)

I'm trying to setup my emacs editor as scala IDE. I'm following the instruction from the page https://scalameta.org/metals/docs/editors/emacs.html to do the set up. when I'm importing sbt project into ...
1
vote
1answer
14 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
1answer
28 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
0answers
35 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: ...
0
votes
0answers
16 views

“Error running timer: (wrong-type-argument listp ” when debugging in emacs using dap-mode lsp-java

I've a gradle project imported into emacs using treemacs. When I try to debug the project I get error - LSP :: Please open an issue in lsp-mode for implementing `vscode.java.resolveMainClass'. (error ...
1
vote
0answers
151 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
0answers
39 views

file mode specification error (wrong-type-argument lsp--client nil)

I'm using lsp-java package as java IDE and syntax completion. Below is my configuration (require 'lsp-java) (add-hook 'java-mode-hook #'lsp) (condition-case nil (require 'use-...
1
vote
1answer
78 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 ...
0
votes
0answers
19 views

Searching for functions

i have the problem, that lsp cant find my functions in python, because they are in a module, which is passed as parameter. What is a another good way to find the use of a specific function?
0
votes
0answers
17 views

Help required wrt. lsp-mode with gopls on Windows natively without WSL

I am currently running Emacs 27.1 on Windows 10. I am using lsp-mode with gopls with Go installed natively (without WSL). I am running into issues setting it up. Specifically, I am running into: https:...
1
vote
1answer
34 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) { ...
0
votes
0answers
120 views

What are the lsp-mode equivalents for “tide-rename-file” and “tide-project-errors”?

I recently moved from tide-mode to lsp-mode for TypeScript development and I'm struggling to find some equivalent functionality: M-x tide-project-errors: Similar to tsc --noEmit, opens a buffer that ...
2
votes
1answer
625 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
51 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
61 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 :: ...
0
votes
0answers
166 views

Cannot get Company completions to work in LaTeX mode with LSP

I am trying to get LaTeX-specific backends for company to work well with LSP and LaTeX. My problem is I cannot seem to get all the desired backends to work well together. For example, company-capf ...
0
votes
0answers
67 views

Add classpath for java to company-mode

I'm trying to create a custom Java IDE for Emacs. I installed LSP-Java for syntax checker (flycheck) and autocomplete (company). I added some extra classpaths to flycheck using the variable flycheck-...
1
vote
0answers
160 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
1answer
917 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
238 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
119 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 ...