Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkeresman01/just-an-lsp
Just me and myself trying to build language server for C++ programming language
https://github.com/jkeresman01/just-an-lsp
Last synced: about 1 month ago
JSON representation
Just me and myself trying to build language server for C++ programming language
- Host: GitHub
- URL: https://github.com/jkeresman01/just-an-lsp
- Owner: jkeresman01
- License: gpl-3.0
- Created: 2024-07-07T08:21:02.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T22:31:41.000Z (about 2 months ago)
- Last Synced: 2024-11-22T23:23:43.468Z (about 2 months ago)
- Language: C++
- Homepage:
- Size: 357 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# !!!!!!!!!!!!!! THIS ISN'T BAKED YET !!!!!!!!!!!!!!
# Just-an-LSP #
Just me and myself trying to build language server for C++ programming language# LSP overivew #
The idea behind the Language Server Protocol (LSP) is to standardize the protocol for how tools and servers communicate, so a single Language Server can be re-used in multiple development tools, and tools can support languages with minimal effort.## How it works ##
A language server runs as a separate process and development tools communicate with the server using the language protocol over JSON-RPC.Below is an example for how a tool and a language server communicate during a routine editing session:
![image](https://github.com/jkeresman01/Just-an-LSP/assets/165517653/6c92eaf4-3656-48b2-8716-597aab1bea4c)Detailed LSP specifications: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/
## Neovim as client ##
Nvim supports the Language Server Protocol (LSP), which means it acts as a client to LSP servers and includes a Lua framework `vim.lsp`.To configure the LSP client, you can use this example:
```Lua
vim.api.nvim_create_autocmd("FileType", {
pattern = "cpp",callback = function()
local client = vim.lsp.start({
name = "JustAnLSP",
cmd = {"/path/to/JustAnLSPServer/binary"}
})if not client then
vim.notify "No can do for JustAnLSPServer!"
else
vim.lsp.buf_attach_client(0, client)
end
end})