3

Has anyone experience in implementing a language server? I am currently working on a php language server and can’t wrap my head around how to efficiently find the correct scope/token from a cursor position ... like I would need to jump right into the middle of the AST somehow.

On another note I already fought the borough checker for 3 hours straight so might just go and read how the rust language server was implemented.

But I would still like to pull some experience from you if you have been through this already

Comments
  • 0
    If you need to jump in the ast, your tokenization is probably wrong.

    Also rust fucking sucks for this usecase, source: i use rust for this usecase
  • 0
    The alternative would be to start at the top and go down the tree until I reach the node that is at that position, like the language server by Felix Becker does
Add Comment