Questions tagged [language-server-protocol]

Questions about the Language Server Protocol (LSP), a Microsoft open source protocol used between an editor or IDE and a language server that provides language features.

The Language Server Protocol (LSP) is an open source protocol used between an editor or IDE and a language server that provides language features such as code completion and syntax highlighting.

The LSP was originally developed for Microsoft's Visual Studio Code.

357 questions
1
vote
1 answer

How to get LSP like formatting in Emacs Elisp?

Here is a scenario I use constantly in Rust development: Rust LSP is always on. I call the LSP feature "format current buffer" (or whatever it's called). The LSP returns the buffer formatted (internally, the LSP uses rustfmt). Since Emacs Elisp…
Refael Sheinker
  • 713
  • 7
  • 20
1
vote
0 answers

Pipe LSP server over HTTP

I'm trying to pipe different LSP Servers over HTTP (to put it in docker and run in a more isolated way). But after some hours trying I stopped in a final error for my actual knowledge (and being here for my first post) At this point I'm trying run…
1
vote
1 answer

Configure Pyright to use Ruff as a linter

I use Zed editor with Pyright and it works like a charm. However I want to use Ruff linter with Pyright but I don't find any documentation about how to achieve this for Zed editor. Do I have to specify linter directly in pyrightconfig.json and if so…
1
vote
1 answer

How to exclude files or directories in nvim lua based config?

I have nvim-tree/nvim-tree.lua plugin installed in my nvim lua based config. How can I exclude files or diractories so it wont show up in the nvim-tree window ? Here is the code: nvim-tree.lua -- following options are the default -- each of these…
Reynald Lamury
  • 165
  • 1
  • 2
  • 9
1
vote
0 answers

What ServerOptions should I choose to create an instance of LanguageClient?

I want to create a new language server extension. I use the following guide: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide For a client's side I use https://www.npmjs.com/package/vscode-languageclient For a…
1
vote
1 answer

Cant use lua LSP in neovim

I installed this config for NeoVim: https://github.com/LunarVim/Neovim-from-scratch , and when i open some .lua or another file the message below says 'Client 2 quit with exit code 127 and signal 0' I tired to reinstall servers and config, and…
Bittermann
  • 11
  • 1
  • 2
1
vote
1 answer

Can I configure nvim-lspconfig to fail silently rather than print a warning?

Over time I'm adding more and more language servers in nvim. This is starting to get somewhat annoying when I use nvim outside of a project context on a filetype that I don't have an LSP globally installed for. Every time, a warning is printed that…
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
vote
1 answer

I have problems with lsp server rust-analyzer

When I trying to launch some .rs files (rust files) I catch error in neovim: Error detected while processing BufReadPost Autocommands for "*": Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:22: Error executing lua:…
1
vote
2 answers

Issue with cmake-language-server LSP when working with CMake files

I recently finished configuring my neovim environment, mainly for working with python/c/cpp projects, I even managed to configure a dap setup which "kind of" works I guess. My problem is when it comes to syntax highlighting/general usage of the LSP…
Jose
  • 33
  • 9
1
vote
0 answers

How does the LSP tool/client know how to connect to my LSP server in the first place

I want to write a simple LSP server to provide autocomplete that will work with any number of IDEs and Editors that are LSP tools. On the topic of startup, the LSP specification does say the following: The current protocol specification defines…
1
vote
0 answers

Why pyright config with mason in nvim shows that package is not accessed

The pyright did not run well: Although it completes properly, it cannot find the package location: This is my config for pyright --config python language server lspconfig["pyright"].setup({ capabilities = capabilities, on_attach = on_attach, …
1
vote
1 answer

vscode LSP extension, how to get a custom action to appear in the dropdown menu?

I am writing an LSP server and vscode client and there is a server-side CodeAction that I wish the user to be able to invoke at any time when their cursor is in a text file. I can see how I can define custom codeactions on the server side, but I…
1
vote
1 answer

is there a way to bundle files with an lsp-client in vscode

I'm following the guide at https://code.visualstudio.com/api/language-extensions/language-server-extension-guide to create an LSP Client for vscode (I already have a server, it's written in a different language). I would like to know if it is…
1
vote
0 answers

StreamMessageReader is not a constructor in Electron + Monaco app

I'm trying to build an application using Electron with Monaco editor. I used monaco language client to integrate the editor with clangd. But somehow it didn't work... After manually connecting to the LSP server through web socket, I get the…
1
vote
2 answers

How to prevent LSP onDidChangeContent event from firing too many times

I have implemented a LSP for a VSCode extension that provides a series of diagnostics for the opened document(s). The execution of the function that evaluates the document occurs in the onDidChangeContent event (server…