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 do I change the formatter line length with neovim lsp dart?

I'm running nvim using the built in LSP (via the superb AstroVim) to develop dart and flutter. Loving everything, except how the lsp formatting (which formats on save) is wrapping my lines at 80 characters. I can see how the dart command line…
pinoyyid
  • 21,499
  • 14
  • 64
  • 115
1
vote
0 answers

vscode `provideCompletionItem` in Middleware not getting triggered for string

I am trying to implement embedded language support for SQL in vscode extension using request forwarding mechanism. According to the documentation we can hijack the completion using middleware option and provide the sub-language completion using an…
1
vote
0 answers

How to share the LSP for all instances of neovim?

I'm using neovim as main text editor, and rust-analyzer as LSP for rust file type. All works fine, but each instance of neovim starts its own instance of LSP, and this takes a lot of resources. So the question is, what is the way to make once…
al3x
  • 589
  • 1
  • 4
  • 16
1
vote
1 answer

RSpec navigatable it_behaves_like/shared_examples using LSP

I have a legacy project that uses shared_examples feature a lot and it is very inconvenient to navigate between actual specs and shared_examples implementation. For now, the only way to do it is to search globally within a project using "some…
BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
1
vote
0 answers

How can an incrementally synchronized language server know, whether it missed a change?

LSP allows for synchronization (textDocument/didChange) to be incremental, as long as client and server support this. Implementing support for this on the server's side, I am confused how the server is supposed to correctly order[^1] these…
zaep
  • 73
  • 1
  • 4
1
vote
0 answers

LSP4J : Language Server method call never ends

I have created a Java-based LSP client, but none of the method calls are completed & it waits indefinitely. Socket socket = new Socket("localhost", 6008); Launcher createClientLauncher = LSPLauncher.createClientLauncher…
1
vote
0 answers

VSCode Extension with LSP in C#, how to terminate the LSP dll?

I have a very simple extension that loads a DLL that will contain my LSP project. namespace SimpleLsp { class Program { static async Task Main(string[] args) { var server = await…
1
vote
0 answers

vs code language server pipe output of childproces to client

I'm creating my own language-server extension. I've piped the output of a childprocess to the console and the extension outputChannel. The problem is that the console output updates while running the childprocess but the outputChannel updates only…
1
vote
0 answers

how to extend existing LSP language server to derivative language?

VS Code has great Bash language support -- syntax highlighting (via shellscript), LSP support (via Bash-IDE), linting (via vscode-shellcheck), and a debugger (via bash debug). There is a Bash-based TAP-compliant unit test framework called BATS that…
1
vote
1 answer

How to connect Volar to Monaco Editor?

I'm building a custom IDE (using Electron) and am trying to integrate Volar into VS Code's Monaco Editor. Currently I have no syntax highlighting for .vue files: My understanding is that I need to run an LSP server in a separate process and somehow…
1
vote
0 answers

How to set a LSP when developing into a docker image?

I am in the following situation. I have a docker image with a file-system which is, starting from the root, of this kind bin etc ... home /myname /MyProject ... usr ... and my local host is running an Ubuntu 20.04 distribution with its…
Barzi2001
  • 989
  • 8
  • 24
1
vote
0 answers

how to debug VSCode custom language extension

I want to test my VSCode custom language extension, which introduces a new language and is implemented through Language Server Protocol. Although my language server itself is tested workable, when binding to the VSCode client, the client just CANNOT…
amyxia
  • 21
  • 1
1
vote
1 answer

How to triger clnagd.switchSourceHeader using built-in nvim lsp

I used to do it with Coc.nvim :CocCommand clangd.switchSourceHeader But now I have moved to built-in nvim lsp and haven't any idea how to the same. I found this solution for coc, but still dont how to do this for nvim lsp. execute 'edit'…
1
vote
2 answers

What's the difference between tsserver and eslint as a linter?

I'm currently setting up my Neovim's Native LSP working environment, and I have a question about JS/TS linter. What is the difference between tsserver and eslint as a linter? I know that tsserver is a language-server that comprehensively supports…
1
vote
0 answers

Typescript/Javscript Language server protocol text highlighting

I want to implement text highlighting on my Language server protocol that works on plaintext. Like I want to highlight words like "hi" per example. i didn't know where to do it server or client . Also im using my package.json : "activationEvents":…