Questions tagged [lsp-mode]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

How to suppress warning about positional arguments in define-minor-mode

I am on Emacs 28.0.5 and keep getting warnings about: Warning: Use keywords rather than deprecated positional arguments to `define-minor-mode' Unfortunately it is for packages I don't control like ...
0
votes
0answers
16 views

List classes, methods, and funcs with helm

I want a list of functions, classes, and methods, without imports or variables, that matches the ordering in the current file. Since I use helm-swoop, I would like to be able to do this with helm. I ...
1
vote
0answers
22 views

I want xref-find-definitions that uses the second backend when the first backend doesn't find anything

I program in Haskell using lsp-mode with lsp-haskell. I need to have a working "jump to definition". xref-find-definitions using lsp--xref-backend sometimes fails to find the definition. ...
0
votes
1answer
66 views

lsp-mode: disable documentation popup

I installed rustic-mode with LSP server. They work. But now it shows docs and description of every symbol I put my cursor on. It distracts and irritates me a lot. How can I make it show the symbol ...
0
votes
0answers
44 views

Use golangci-lint with lsp-mode

How can I set up golangci-lint as the linter with my config? I've tried using flycheck-golangci-lint but it doesn't seem to be working. I'm testing my config by opening a .go file with an ineffectual ...
0
votes
0answers
9 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
57 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 ...
1
vote
1answer
292 views

How do I solve `Lisp error: (void-function -compose)` when using lsp-dart?

When I load a Dart file with GNU Emacs 27.1-1 for OS X I get the following little error novel. Debugger entered--Lisp error: (void-function -compose) (-compose #'lsp--client-path->uri-fn #'lsp--...
0
votes
0answers
32 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 ...
2
votes
0answers
114 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
60 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. ...
2
votes
0answers
29 views

Hide ifdef(or gray out) through compile_command.json

I've just finished to set up LSP with ccls and company packages. It works but I have one more possible wish that such LSP packages could do. Now I'm using hide-ifdef package to gray out the inactve ...
2
votes
1answer
48 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
61 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
52 views

How do I turn off whitespace-mode within flycheck-mode and lsp-mode (in doom emacs)?

I've enabled whitespace-mode and I'm correctly able to see my spaces, tabs, and newlines. But the spaces also show up when I receive messages from emacs (ie when I get error messages and code action ...
0
votes
0answers
15 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
122 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: ...
1
vote
3answers
244 views

Emacs Javascript basic code completion

I try to set proper completions/suggestions for Javascript. There is no problem with ES6+ and Typescript types and defined variables but most of the time I work with vanilla JS in browser context, so ...
0
votes
0answers
47 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
525 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
76 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
149 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
25 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
560 views

lsp mode does not recognize standard library

Today I did two things: I upgraded some emacs packages (don't know which ones) I installed in addition to emacs 27.1, emacs 28 with native compilation I built the "gccemacs" in a separate ...
1
vote
1answer
123 views

How to shorten signature display in echo area?

Currently, the signature of the current function the pointer is on is shown as follows: as you can see, the signature is so large that it overflows the echo area. I was wondering if there could be a ...
1
vote
2answers
539 views

How can I enable lsp-headerline-breadcrumb-mode in lsp-mode?

I would like to enable lsp-headerline-breadcrumb-mode in every buffer where lsp-mode is active. I'd know how to do it for every mode, for example (use-package go-mode :ensure t :config (add-hook ...
3
votes
0answers
382 views

How can I see all errors in a Go project with LSP mode?

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project: |- pkg1 |- pkg2 |- cmd When I'...
1
vote
0answers
64 views

How to focus or change point on child frame

I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I ...
0
votes
0answers
28 views

lsp-clojure starts 3 times

lsp-clojure is executed 3 times when I start emacs so it ends up using about 2.5G of memory. $ ps aux | fgrep java benwiz 7920 82.8 8.7 6107672 1068712 ? Ssl 08:11 1:18 java -Xmx2g -...
1
vote
1answer
546 views

Remap lsp-mode prefix with use-package

How do I remap the lsp-mode prefix key to "s-k" using the use-package package? I tried the following (use-package lsp-mode :ensure t :init (setq lsp-keymap-prefix (kbd "s-k") ...
0
votes
1answer
145 views

C++ lsp-mode: inconsistent behavior between remote and local projects

I've run into a bit of an odd problem trying to use lsp-mode. My problem setup is as follows: I'm working on a C++ project on my computer, and I'd like to be able to use lsp-mode with it. The catch is ...
0
votes
0answers
22 views

How to perform lookups using lsp-mode on code inside comments?

I would like to be able to perform lsp-mode operations on code comments, for example I would like to be able to run lsp-find-definition on this. void my_fn(struct Foo bar) { /** This is a doxygen ...
0
votes
0answers
236 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 ...
3
votes
1answer
2k 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 ...
0
votes
0answers
151 views

Updating the lsp-mode package always faills, works full re-install of the package

In emacs 27 (built from git), after upgrading all packages (including lsp-mode using): emacs -batch -u "$USER" -f package-utils-upgrade-all -kill The upgrade it's self prints a lot of ...
1
vote
1answer
69 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)) ...
1
vote
1answer
273 views

lsp-mode find symbol or refs *not* under point?

Sometimes I know the name of the function I'm looking for but it isn't used anywhere in the current buffer. With the various tags utilities I was always able to just search for a definition by name, ...
0
votes
0answers
147 views

Make lsp recognize external c++ header

I am trying to develop an application with gtk3 in c++ and I am using Spacemacs as my main emacs distribution in addition to lsp for c++. In my main cpp file, I included the following header : #...
1
vote
0answers
102 views

Suppress a warning in lsp-mode using clangd

Here's an example of code for which I get a warning when using lsp-mode, with clangd: struct A { union { struct B { int i; } b; }; }; The warning appears with a flycheck mark on ...
0
votes
1answer
144 views

How to make company-lsp case sensitive?

Currently if I try to complete a work, the case of the prefix is ignored with company-lsp. From looking into the code, company-lsp is hard-coded to use ignore-case. As at the time of writing company-...
1
vote
1answer
68 views

Skip over remaining errors in current file to next error in next file

tl;dr I am using :cn in Evil's Ex command line and would like to use :cnf as well, but it is not there, and I don't know what function to bind it to. Details As a former Vim user who is slowly ...
1
vote
1answer
433 views

How can I set the indentation offset for `indent-region`

I am using spacemacs + lsp layer (ccls) for c/c++ editing Having my c-basic-offset set to 4: if I select a region and press = (maybe invoking indent-region?), the region is indented by 2 spaces (...
2
votes
1answer
258 views

rust-analyzer completion broken

When I try to use auto-completion with lsp + rust-analyzer, all functions inserted like that: shared_state.clone_from(${1:source})$0 I cannot find any way to disable this "arguments". I don'...
1
vote
1answer
146 views

How to hide “code actions” from lsp-ui sidebar?

Hi, I want to hide "code actions" which is recommended by lsp-mode from lsp-ui sidebar. How can I do for that?
1
vote
1answer
183 views

How to stop lsp-mode including headers automatically for C/C++ code?

Every now and then lsp-mode is adding a header to the C source code I'm working on. How can this functionality be disabled?
3
votes
1answer
158 views

How can I disable the use of minibuffer in lsp-ui?

When lsp-ui-doc offers me information about the symbol at point, it does that in a hover window (good) and in the minibuffer (bad). I've found no mention of the minibuffer in the customisations of ...
2
votes
1answer
362 views

Disable lsp-mode symbol highlighting?

When using lsp server, symbol highlighting obscures the highlighting done by region selection. I can toggle this behavior per-buffer with lsp-toggle-symbol-highlight, but cannot permanently disable ...
0
votes
2answers
452 views

How to correctly configure Flow backend for LSP mode?

I'm using spacemacs @develop (branch). I can't use lsp and lsp-ui. In vscode everything works (using flow lsp mode). With company-flow I can also make it working. When opening a .js file with // @...
2
votes
2answers
339 views

How to set minor mode variables in dir-locals?

Im writing an lsp-mode purescript client and couldn't figure out how to override the default config options using a .dir-locals file. For example, I have a defcustom : defcustom lsp-purescript-use-...
14
votes
1answer
3k views

What are these prefix commands that start with s-l?

I'm using lsp-mode, and I see these weird prefix commands that start with s-l. How do I type them? `lsp-mode' Minor Mode Bindings: key binding --- ------- s-l ...