Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell support for Documentation sections #8

Open
mtihlenfield opened this issue Aug 27, 2024 · 3 comments
Open

Spell support for Documentation sections #8

mtihlenfield opened this issue Aug 27, 2024 · 3 comments

Comments

@mtihlenfield
Copy link

It would be really nice to have spell support for keyword and module documentation. For example:

*** Settings ***
Documentation    could have spell checking here!

*** Keywords ***
Spell Check Keyword
    [Documentation]    could have spell checking here too!

For reference: https://neovim.io/doc/user/treesitter.html#treesitter-highlight-spell

@mtihlenfield
Copy link
Author

Just realized that you can use variables in Documentation sections, which probably means this won't work.

@Hubro
Copy link
Owner

Hubro commented Aug 29, 2024

There's @spell and @nospell, the latter of which can be used to disable spell checking in interpolated variables. I think this is a good idea.

@Hubro Hubro reopened this Aug 29, 2024
@Hubro
Copy link
Owner

Hubro commented Aug 29, 2024

It might be a bit tricky to actually match the Documentation setting. I'm using regex to match it case insensitively, so I don't think this would work: (setting_statement "Documentation" ...).

Changing the grammar to capture the setting name as a separate node, then matching it with the match? predicate would probably do the trick. It might even be possible without changing the grammar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants