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

Check identifiers in programming languages #124

Closed
kolya-ay opened this issue Mar 11, 2018 · 5 comments
Closed

Check identifiers in programming languages #124

kolya-ay opened this issue Mar 11, 2018 · 5 comments

Comments

@kolya-ay
Copy link

Is there any plans to add variables/function names/etc spell-checking as in cspell? I wonder if the info whether some piece of code is keyword or not can be inferred from syntax files used for highlighting.

@bartosz-antosik
Copy link
Owner

Hi! Sadly, no! Last time I checked there was no way for the extension to have access to the language information used for highlighting (it's inconvenient from more than one point of view). And building this on my own within extension is impossible because other extensions can register language definitions.

The parsers I created use some heuristics to select elements like comments and strings plus sometimes other elements, but spelling identifiers would require nearly compiler level parsing of source code files.

I think there is another extension which does "total" spelling of just everything so it probably spells identifiers as well. This is not the way my extension does things as I prefer to have carefully selected elements to spell.

@kolya-ay
Copy link
Author

kolya-ay commented Mar 12, 2018

Fair enough, I take you point. Completely agree that maintaining separate list of keywords isn't the way to go. I've just up-voted microsoft/vscode#580. BTW, have you seen scope-info mentioned in the thread?

Curious to think now that I used to believe that spellchecking is somewhat resolved problem just a couple days ago..

@bartosz-antosik
Copy link
Owner

Exactly as you say, it's somehow resolved. Have you per chance seen this issue: #20266? It says bit more about spelling in VSCode. I am myself not happy about few things here, like the the whole "diagnostics" interface etc.

Somehow this scope-info extension does not work for me. I will have to analyze it. Thanks for the hints.

@kolya-ay
Copy link
Author

Have you per chance seen this issue: #20266?

Thanks. Postponed it to home-reading to thoughtfully go through all the rationale.

Exactly as you say, it's somehow resolved

Just realized that /usr/share/hunspell/ru_RU.* files (I'm from Cyrillic world) which come with default Debian package are in KOI8-R encoding. What the.. mess?

Thank you for your effort! I'll probably borrow the way you package native node extensions;)

@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Mar 12, 2018

You will find much more about native packages in the thread mentioned.

There should be an UTF-8 version of the Russian dictionary for Hunspell around. I know distros bring a variety of versions. Also you may want to see (#50).

Out of curiosity - is there something that should work differently for Russian spelling in Spell Right?

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

No branches or pull requests

2 participants