Slide 54
Slide 54 text
Displaying the docs
{
"method": "document/hover",
"id": 1,
"params": {
"textDocument": { uri: "file://..." },
"position": {
"line": 10,
"character": 20
}
}
}
Language server
{
"id": 1,
"result": {
"contents": "## 📚 String#encoding\n\nReturns the encoding"
}
}
1. Find the Ruby node associated at
the position
2. Fetch the docs for the node
3. Format the docs for LSP