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
8
votes
0 answers

What's the difference between textDocument/Definition, textDocument/implementation?

I read through the LSP specification but I fail to understand the difference between the goto definition and goto implementation requests. Goto Definition Request The go to definition request is sent from the client to the server to resolve the…
AmjadHD
  • 163
  • 6
8
votes
2 answers

Guidance to writing LSP Client

I have a personal Editor that implements its own "protocol" for Code completion and would like to switch to Language server protocol to relieve myself from some development burden. However I have not been able to fully comprehend the LSP…
Stefano Mtangoo
  • 6,017
  • 6
  • 47
  • 93
8
votes
0 answers

How to get the Java abstract syntax tree in VSCode?

I want my extension to be able to read the Java AST of a .java file to further save the Node name (for instance, "ClassDeclaration") of a selected piece of code. For example if you select "public", the AST tells you it is a "modifier", and then I…
7
votes
1 answer

How to accept nvim lsp suggestions?

To give a simple example. Having a variable or function misspelled, the LS gives a suggestion "Cannot find name 'voteings'. Did you mean 'votings'? Is there a way to quickly accept those suggestion?
7
votes
3 answers

make VS Code parse and display the structure of a new language to the outline region of VSC

I'm trying to make VSC display the structure of a document containing a DSL (domain specific language) by adding the language definition to VSC. The structure should appear in VSC "outline view" where all document structure is shown for installed…
7
votes
1 answer

How to implement quickfix via a language server

I've implemented a language server which provides some linting. The linter checks for required properties and issues 'missing property' errors. I would like to have corresponding 'insert missing property' quickfixes for these errors. I think the…
Kris
  • 3,898
  • 1
  • 23
  • 32
6
votes
1 answer

Nvim completion menu issue

I'm using lspkind and nvim-cmp with Neovim 0.7. When or is pressed to scroll through the items from the list of possible completions it gets completely overwritten by the standard completion suggestions. See link for an example. Why does…
ttyago
  • 63
  • 1
  • 4
6
votes
1 answer

Neovim built-in LSP shows No code actions available for Python files

When I open a python file, diagnostics seem to be working fine. Then I navigate to a line with a diagnostic error, press the shortcut to invoke code actions ('ca' in my case) and I get a message 'No code actions available'. I have tried…
6
votes
1 answer

How do I parse TS to symbols using a Language Server Protocol?

I'm new to this subject, so there's a good chance I've gotten some keyterms wrong. I'd like to parse a typescript file into its component symbols. To give a very crude example of what I'd imagine coming out, see below: // some ts file export…
Seph Reed
  • 8,797
  • 11
  • 60
  • 125
6
votes
1 answer

What is a .clientrc file?

You can find a mention of it here: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide however without any explanation. I couldn't find information about it by googling. What is the purpose of a .clientrc file?
6
votes
0 answers

How can I extend an existing language server?

I am going to create a language server which is pretty similar to javascript. Is there a way to reuse an existing javascript server for highlighting, auto complete, syntax error, etc? What I am looking for is to extend javascript language server and…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
6
votes
0 answers

Can we extend an existing extension in Visual Studio Code?

I'm researching about Visual Studio Code extension. I want to add some more items to code complete (IntelliSense) of Microsoft Python extension for Visual Studio Code I don't know how. I just think out some solutions: 1. Write a new extension for…
5
votes
1 answer

How to get all interfaces (or any tokens) in neovim LSP?

I'm trying to get all the interfaces from a given buffer. To do so, I want to get all the tokens and filter out everything except the interfaces. However, when I try to make a call to the LSP: I get nothing back. local bufnr =…
Tomasz Gałkowski
  • 1,841
  • 4
  • 24
  • 39
5
votes
1 answer

rlanguageserver: Disable specific linter and avoid line-breaking

I am using emacs and lsp-mode. To edit .R files, I use rlanguageserver. This works fine. However, I would like to disable some rules. For example, I do want to decide on my variable name format, i.e. disable the "variable name should be snake_case"…
user52366
  • 1,035
  • 1
  • 10
  • 21
5
votes
1 answer

Add operator overloading to TypeScript

I am working on a project which requires a lot of vector and matrix math and I would love to have operator overloading. There are Babel plugins (for example https://github.com/rob-blackbourn/jetblack-operator-overloading) that enable operator…
1
2
3
23 24