How do “lang-servers” work within VScode? How can an extension figure out an entirely custom codebase and its functions and give me definitions on just right click?

459 views

It is crazy useful and ive no idea how it works.

Server makes me think it is a web service but it works even with like completely local code that is entirely custom and stuff.

All i know is i tend to need to compile the codebase once before it gets the new function definitions.

In: 5

18 Answers

Anonymous 0 Comments

Server doesn’t automatically mean web, internet, or even network. A server is just a program that provides a service.

In this case, your code will be sent through a program, which does some processing, and sends some symbols back that vscode can read.

Here’s how it works: https://microsoft.github.io/language-server-protocol/

You are viewing 1 out of 18 answers, click here to view all answers.