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

Command vowel dummy replacements #366

Closed
Dekker1 opened this issue Jul 24, 2021 · 3 comments
Closed

Command vowel dummy replacements #366

Dekker1 opened this issue Jul 24, 2021 · 3 comments
Assignees
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@Dekker1
Copy link

Dekker1 commented Jul 24, 2021

Note: Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Is your feature request related to a problem? Please describe.

Currently, commands can be replaced by dummy values, as described in the documentation https://valentjn.github.io/vscode-ltex/docs/settings.html#ltexlatexcommands. However, I have some commands that are replaced by words starting with a vowel:

This sentence shows an \instance{} of my problem.

The problem, however, is that when using dummy replacement the LanguageTool backend now warns that "an" should be replaced by "a".
Although this by itself is not ideal, it can be easily ignored. I'm, however, afraid that this might make me miss certain cases cases where I've used "a" instead of "an", which seems to happen to me a lot.

Describe the solution you'd like
To me the simplest solution would be to have two additional options for command replacement that replace the command using a dummy value starting with a vowel, and a plural version that does the same.

Describe alternatives you've considered
This issue is closely related to: #43. There another consideration was allowing the user to decide on the dummy text to be used.

Additional context
N/A

@Dekker1 Dekker1 added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Jul 24, 2021
@Dekker1
Copy link
Author

Dekker1 commented Jul 24, 2021

In further use, I also found that I have some macros that might result in a vowel depending on their arguments.
An example is the \gls{} command from the glossaries package, whose command generally get replaced by their argument.

This sentence is an \gls{instance} of a \gls{problem}

For these commands just adding VowelDummy wouldn't be enough, since it depends on the argument of the command.
I'm wondering if it would be possible to consider a different matching method where you could match arguments depending on a certain regular expression.

@valentjn valentjn self-assigned this Aug 6, 2021
@valentjn valentjn added this to the 11.0.0 milestone Aug 6, 2021
@valentjn
Copy link
Owner

valentjn commented Aug 6, 2021

Thanks for the suggestion. There is now the possibility to use "vowelDummy" for ltex.latex.commands and ltex.markdown.nodes.

As for the second comment, you can just use {"ltex.latex.commands": {"\\gls{}": "default"}} for this.

@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Aug 6, 2021
@valentjn
Copy link
Owner

Feature released in 11.0.0.

me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants