Emacs via lsp using premium account

I am using the ltex-ls via lsp on emacs and was wondering if I can use the HTTP access and use a premium membership for that? I tried:

(use-package lsp-ltex
:ensure t
:hook (text-mode . (lambda ()
(require 'lsp-ltex)
(lsp))) ; or lsp-deferred
:init
(setq lsp-ltex-version “16.0.0”))
(setq lsp-ltex-languagetool-server “https://api.languagetoolplus.com/v2”)
(setq lsp-ltex-languagetool-org-username “email here”)
(setq lsp-ltex-languagetool-org-api-key “pw here”)

But I don’t think that does the trick. Any suggestions?
thanks…

Does the emacs lsp officially support premium? If it doesn’t, it’s probably not going to work. The vendor of the add-on/lsp can probably help with that.

It does support it. It turns out that the (known) problem is the very limited text length that is allowed via this http interface, making it impossible to check even a mid-size document…

The limits should still be the ones documented at LanguageTool API documentation, i.e. 60K characters in premium mode. Is that not the case, or do you need more?

thanks for the response. I believe would need more. If I understand correctly, the number of characters sent to the server is larger than the number of files in the (LaTeX) file I am editing. So 60k seems insufficient for a mid-size document. I would love to hear if I am getting something wrong and this can be made to work.

LT won’t deal with LaTeX anyway, so if the LSP is properly implemented, it should remove markup and only send the plain text to the LT API.

The Emacs package I use

is using ltex-ls,

which might be doing that, not sure. Regardless, 60k seemed not to work for modest documents.

The add-on could also internally split the text into smaller chunks before sending it. This would also help with getting the first results faster (as the LT API doesn’t stream results, but waits for all matches to be found).

I would’t know how to do that, unfort. I noticed that others have teh same issue:
just in case this is useful, here are others having the same problem:
see github user valentjn/ project ltex-ls/ issues/ 215