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
1answer
36 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
101 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. ...
1
vote
0answers
29 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
51 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
2answers
111 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
26 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
78 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
19 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
52 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
84 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
61 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 ...
1
vote
0answers
147 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
20 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
154 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
38 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
59 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
273 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
150 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
155 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 ...
2
votes
1answer
82 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 ...
1
vote
0answers
116 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
19 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 ...
0
votes
1answer
78 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
109 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
153 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
106 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 ...
2
votes
0answers
694 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
110 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-...
0
votes
1answer
238 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
27 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
41 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
3k 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
85 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
86 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
206 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
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
363 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
176 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 ...