vigoux / ltex-ls.nvim

Enhanced integration of ltex-ls for neovim
BSD 2-Clause "Simplified" License
55 stars 7 forks source link

LanguageTool Premium Account Credentials #2

Closed k0nze closed 5 months ago

k0nze commented 1 year ago

I setup ltex-ls.nvim using mason and lspconfig and I was wondering if it is possible to connect to a premium LanguageTool premium account?

PlexSheep commented 5 months ago

It is possible to do. I am using my premium account with ltex. you need to configure ltex like so:

  M.ltex.languageToolOrg = {
    apiKey = "somepassword",
    username = "me@example.com",
    languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/",
  }
  M.ltex.languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/"

it's a bit hacky and can probably be made simpler, but I it was just something I hacked together.

WARNING: If you have your neovim configs in a public version control like me, be careful not to expose your apikey to the public. you may want to redact your username too.

k0nze commented 5 months ago

Perfect! Thank you.

jonnykl commented 4 months ago
  M.ltex.languageToolOrg = {
    apiKey = "somepassword",
    username = "me@example.com",
    languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/",
  }
  M.ltex.languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/"

I'm also using ltex-ls.nvim with mason and lspconfig. But I don't understand where to put these lines?