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

[Feature request] Select language to check #28

Open
morgandavidson opened this issue Mar 15, 2023 · 8 comments
Open

[Feature request] Select language to check #28

morgandavidson opened this issue Mar 15, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@morgandavidson
Copy link

morgandavidson commented Mar 15, 2023

Here is my config (which works fine):

  (use-package flycheck-languagetool
    :hook
    (text-mode . flycheck-languagetool-setup)
    (org-mode . flycheck-languagetool-setup)
    (latex-mode . flycheck-languagetool-setup)
    (markdown-mode . flycheck-languagetool-setup)
    :init
    (setq flycheck-languagetool-url "https://api.languagetool.org")
    (setq flycheck-languagetool-server-jar nil)
    (setq flycheck-languagetool-server-port nil)
    (setq flycheck-languagetool-language "fr-FR")
    :config
    (add-to-list 'flycheck-checkers 'languagetool)
    )

How could I add (setq flycheck-languagetool-language "en-US") ?

@jcs090218
Copy link
Member

You mean to check with multiple languages in a file? 🤔 I haven't use language-tool for a while, so I don't know if that is possible.

@morgandavidson
Copy link
Author

I mean being able to use LanguageTool french checker in a buffer when I'm writing in French. And being able to use LanguageTool English checker in another buffer when I'm writing in English.

@jcs090218
Copy link
Member

No, unfortunately, there is no default way to do this. You will have to set it yourself,

(setq-local flycheck-languagetool-language "en-US")

in France buffer,

(setq-local flycheck-languagetool-language "fr-FR")

@morgandavidson
Copy link
Author

morgandavidson commented Mar 19, 2023

Thank you, M-: (setq-local flycheck-languagetool-language "en-US") or M-: (setq-local flycheck-languagetool-language "fr-FR") work fine within buffer.

Could the following functionality be added as an enhancement request?

To be able to have multiple LanguageTool checkers options when in flycheck-select-checked (e.g. en-US, fr-FR, etc.).

@jcs090218
Copy link
Member

jcs090218 commented Mar 19, 2023

Could the following functionality be added as an enhancement request?

To be able to have multiple LanguageTool checkers options when in flycheck-select-checked (e.g. en-US, fr-FR, etc.).

You mean the interface to select language before starting the checker?

@morgandavidson
Copy link
Author

morgandavidson commented Mar 19, 2023

I mean, the ability to choose between FR, EN or else, here: https://paste.pics/MJ2L7

@jcs090218 jcs090218 added the enhancement New feature or request label Mar 19, 2023
@jcs090218 jcs090218 changed the title How to add additional languages? [Feature request] Select language to check Mar 19, 2023
@jcs090218
Copy link
Member

Of course, I will find some time to implement this! :D

@morgandavidson
Copy link
Author

Awesome, thank you!

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

No branches or pull requests

2 participants