meraymond2 / idris-vscode

Idris front-end for VS Code
MIT License
59 stars 10 forks source link

Add lidr to hover selector #56

Closed meraymond2 closed 3 years ago

meraymond2 commented 3 years ago

Activates the extension for .lidr files too, and adds them to the hover selector.

Since I don't have any semantic information about the doc, I'm currently doing a best-effort guess as to whether the cursor is hovering over the code or a comment or a word inside a string. The IDE process doesn't distinguish. I've added an extra case for lidr files, but I should make it more specific. Ideally I can reuse the code for normal files, just for lines that start with >. At the moment it doesn't account for comments/strings.

The syntax highlighting doesn't account for multi-line block comments within lidr either, but that's a stretch.

Update: that's all fixed, I can reuse the existing code to walk the file and work out what kind of token we're hovering over, I'm just doing it for the code block rather than the whole file.

meraymond2 commented 3 years ago

https://github.com/meraymond2/idris-vscode/issues/53