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
0
votes
1 answer

How would one implement contextual go-to-implementation in LSP?

It is hard to explain exactly what I mean by contextual go-to-implementation, so take the following example code in Rust: struct A {} struct B {} impl From for B { fn from(a: A) -> Self { B{} } } fn fun() -> B { let a =…
Michał Trybus
  • 11,526
  • 3
  • 30
  • 42
0
votes
0 answers

Can't attach solidity-lsp for .sol files in neovim

Firtsble solidity-ls installed by mason via neovim command :LspInstall solidity-ls wasn't executable from terminal, altough it was shown as an executable one when typing :LspInfo in .sol file. After I installed it manually via npm npm i solidity-ls…
0
votes
0 answers

adapt a vscode language server for intellij

I have a language server for a custom language written in go, with vscode language server protocol I want to adapt it to work with Intellij suite, I found lsp4intellij but encountered a lot of issues while testing ballerina plugin; not sure if it's…
0
votes
0 answers

Why LSP restrict that the text edit range of a completion item must be single line?

In LSP spec about the completion item, there is a note says: The text edit's range as well as both ranges from an insert replace edit must be a [single line] and they must contain the position at which completion has been requested. Is there any…
Sheng Chen
  • 1,012
  • 4
  • 18
0
votes
0 answers

Add Custom Debug button inside the text editor in Visual Studio Code

I'm building a VSCode extension to edit and run custom text files and I'm trying to figure out how to add a custom Run or Debug button inside the Text Editor. Unfortunately I can't find any documentation or examples that describe my use case. What I…
0
votes
1 answer

Get all the strings using a VS Code language server

Apropos of How do I parse TS to symbols using a Language Server Protocol?, I already did this and I did indeed use the TS compiler as suggested in one of the answers to that question. That, however, is only good for TS and JS. There are many…
Peter Wone
  • 17,965
  • 12
  • 82
  • 134
0
votes
2 answers

Enabling Markdown for the documentation property of completionItem?

I'm writing my first language extension for VS Code and I find the documentation to be rather difficult to follow. This is of course not helped by me being inexperienced with writing extensions for VS Code, so here I am. As the subject says, I want…
0
votes
0 answers

What's a good structure for storing data during traversing of a parse tree? It's for a language server protocol implementation

I'm implementing the language server protocol for a C++ testing framework, using Python3. I use ANTLR4 to parse the text file, and I have a working parser and I use the Listener pattern to traverse the results. But what's the best way to store the…
Johan
  • 83
  • 5
0
votes
0 answers

How to make Python language server in Neovim to work with conda enviromnments?

I am trying to make the language server to use a particular Python 3 executable in a particular conda environment. Now it works with a global Anaconda python, and it's not convenient at all. How do I set this up? Thank you!
0
votes
1 answer

Mason JAVA JDTLS Neovim

I am trying to configure JAVA lsp with my Neovim Config My Neovim Config I have used Mason to install JDTLS among other LSP's as well, see below: My lspconfig has the following form: My LSP servers all work fine except for Java. When inspecting…
JPV
  • 1,079
  • 1
  • 18
  • 44
0
votes
1 answer

Emacs: rust-analyzer + rustic - couldn't discover workspace

I am an a-bit-futher-than-newbie Arch Linux user... I have been working with this setup (emacs + rustic + rust-analyzer + lsp-ui et cetera with settings like in here https://robert.kra.hn/posts/rust-emacs-setup/) for a month now. Yesterday I tried…
George
  • 75
  • 7
0
votes
0 answers

How do I use a language server in a Custom(Text)Editor?

I want to create a VS Code extension that extends the existing XML extension by Red Hat (redhat.vscode-xml) and allows visual editing of XML schemas and possibly XML files bound to a schema (similar to Altova XML Spy). I hope that I can benefit from…
0
votes
0 answers

How to send objects from java LSP to vscode typescript extensions?

I am trying to send either single instances of an object, or ideally an array or hashmap containing many instances of an object, from a java language server to a typescript vscode extension. Previously I was able to return a string completable…
0
votes
0 answers

What's the best way to send requests to a rust-analyzer instance programmatically?

I am working on a proc macro, and would like to be able to write some tests to ensure it's playing nice with rust-analyzer (e.g. correct localized diagnostics). Ideally, my testing suite would look something like this: Start rust-analyzer pointed…
sak
  • 2,612
  • 24
  • 55
0
votes
1 answer

VSCode Extension API: Programmatic features of custom language server are not working in a custom notebook

I created a language server for a custom language. If i use the built-in vscode editor, all works fine (Code completion etc.). Since my custom language is nested inside some XML-Tags i tried a custom notebook, where i de-/serialize the code part. I…
Nicola
  • 1
  • 2