Open A-Walrus opened 2 years ago
https://github.com/helix-editor/helix/pull/7738 improved on this a little: we show tree-sitter-regex error highlighting in the prompt. We could improve this further by validating the regex with the regex-syntax
crate which we already depend on transitively: we can merge highlight ranges for syntax error spans into the prompt line's highlighting. Maybe we could also show the syntax error message in the doc popup too.
Describe your feature request
When using a commands, such as
select:
,search:
,:theme
,:set-option
, etc... some inputs are invalid (invalid regex, theme/option that doesn't exist). It would be nice to have visual feedback while typing that indicates that what you are typing is invalid, for example marking your typed text or the prompt in the error color.Kakoune for example makes the
select:
text red on invalid regex while you are still typing, which can be more useful than feedback only after you submit the command.I feel like many commands could benefit from this sort of live feedback, but mostly the regex ones.![image](https://user-images.githubusercontent.com/58790821/178511249-3302e350-5874-4139-a9fe-7b45756079c7.png)