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/
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/
servers don’t need to be exposed to the Internet for it to act as such, it can be bound to a local port, which you do if you want to do local webdev, or communicate via some IPC (inter process) mechanisms
programming languages are fairly rigid in that they are parseable, so the code editor just send your code for every interval via IPC to the “lang servers”, where it will parse your code and send back a detailed response of its structure in some standardised format that your code editor understands, without it actually know how to parse it
servers don’t need to be exposed to the Internet for it to act as such, it can be bound to a local port, which you do if you want to do local webdev, or communicate via some IPC (inter process) mechanisms
programming languages are fairly rigid in that they are parseable, so the code editor just send your code for every interval via IPC to the “lang servers”, where it will parse your code and send back a detailed response of its structure in some standardised format that your code editor understands, without it actually know how to parse it
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/
servers don’t need to be exposed to the Internet for it to act as such, it can be bound to a local port, which you do if you want to do local webdev, or communicate via some IPC (inter process) mechanisms
programming languages are fairly rigid in that they are parseable, so the code editor just send your code for every interval via IPC to the “lang servers”, where it will parse your code and send back a detailed response of its structure in some standardised format that your code editor understands, without it actually know how to parse it
Imagine your editor can ask an expert questions about the codebase and help you navigate it that way. Then the editor doesn’t need to know much about each language – all the cool analysis is handled by the language-specific program.
That language expert program is the “language server.” It’s called a server because the editor can throw requests at it exactly the same way you’d ask a backend server for information.
In general, you shouldn’t think of a “server” as something that *has* to run remotely. You have *plenty* of computing power on your workstation to run local servers, and that’s typically how server development is done.
Imagine your editor can ask an expert questions about the codebase and help you navigate it that way. Then the editor doesn’t need to know much about each language – all the cool analysis is handled by the language-specific program.
That language expert program is the “language server.” It’s called a server because the editor can throw requests at it exactly the same way you’d ask a backend server for information.
In general, you shouldn’t think of a “server” as something that *has* to run remotely. You have *plenty* of computing power on your workstation to run local servers, and that’s typically how server development is done.
Imagine your editor can ask an expert questions about the codebase and help you navigate it that way. Then the editor doesn’t need to know much about each language – all the cool analysis is handled by the language-specific program.
That language expert program is the “language server.” It’s called a server because the editor can throw requests at it exactly the same way you’d ask a backend server for information.
In general, you shouldn’t think of a “server” as something that *has* to run remotely. You have *plenty* of computing power on your workstation to run local servers, and that’s typically how server development is done.
> How can an extension figure out an entirely custom codebase
Literally the same way the compiler can do the same thing. In fact, for a lot of language server implementations, they just use part of the actual compiler (the parser, the lexical, syntax and semantic analyzers), the output of which is [a tree representation](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of all the things in the code, plus the errors the analyzers found.
Latest Answers