banacorn / agda-mode-vscode

agda-mode on VS Code
https://marketplace.visualstudio.com/items?itemName=banacorn.agda-mode
MIT License
167 stars 38 forks source link

Add `wordPattern` to language-configuration.json #149

Closed floofnoodlecode closed 1 year ago

floofnoodlecode commented 1 year ago

Add the wordPattern field to language-configuration.json so that vscode can suggest auto completions properly.

Without this, auto-completions stop at -, + and other non-alphanumeric characters. Something like the following "wordPattern": "[^\\(\\)\\{\\}\\s;.@]+" is enough for vscode to now be able to suggest identifier names when typing.

2023-08-02 10_47_44-● 2-ind agda - agda - Visual Studio Code

fredrik-bakke commented 1 year ago

It seems judging from vscode's reference that all of these characters must be escaped. I ended up with

[^\\s\\n\\.\\;\\{\\}\\(\\)\\@\\\"]+