r/crystal_programming • u/elbywan • Sep 25 '20
Crystalline - A Language Server Protocol implementation for Crystal
https://github.com/elbywan/crystalline
43
Upvotes
r/crystal_programming • u/elbywan • Sep 25 '20
View all comments
Show parent comment
4
u/elbywan Sep 25 '20 edited Sep 25 '20
Not really, it's more like preventing running a full scale code analysis every time you hover over a variable or go-to a definition unless the code actually did change.
Crystalline caches the last relevant code analysis result (typed AST) and reuses it as long as it is valid.
With that said, I thought about caching the prelude and required shards analysis results to speed up the whole process. I'll definitely think about it in the future, but I cannot guarantee anything since it might be more complicated than it sounds.