valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
787 stars 38 forks source link

What is the default value of `LTEX_GLOBAL_STORAGE_PATH`? #294

Open mawkler opened 10 months ago

mawkler commented 10 months ago

Hi! Is there a default value for LTEX_GLOBAL_STORAGE_PATH on Linux? I want to create an external dictionary file, but I can't find where to actually put the file.

Btw, it doesn't say anywhere, but I'm guessing that LTEX_GLOBAL_STORAGE_PATH a system variable?

Edit: I found this section that says where VSC**e has ltex files, but I don't use VSC**e.

weakish commented 10 months ago

LTEX_GLOBAL_STORAGE_PATH is a client side setting. This concept is absent in the server side (ltex-ls). ltex-ls itself will not read external dictionary files under LTEX_GLOBAL_STORAGE_PATH, or any external dictionary files at all. Therefore, ltex-ls does not care where LTEX_GLOBAL_STORAGE_PATH is, or whether the client will read external dictionary files under LTEX_GLOBAL_STORAGE_PATH.

The client (editor/IDE) has to implement the logic itself, reading dictionary files in LTEX_GLOBAL_STORAGE_PATH, and send the word list to ltex-ls. ltex-ls only cares about the word list sent from the client, not how the client generate the word list.

For LTeX VSCode extension, LTEX_GLOBAL_STORAGE_PATH is ~/.local/share/ltex/ under unix. ~/.config/Code/User/globalStorage/valentjn.vscode-ltex/ under Linux. If a dictionary file is put there, the LTeX VSCode extension will read word list from there.

mawkler commented 10 months ago

@weakish

For LTeX VSCode extension, LTEX_GLOBAL_STORAGE_PATH is ~/.local/share/ltex/ under unix. If a dictionary file is put there, the LTeX VSCode extension will read word list from there.

Where is this implemented? When grepping for LTEX_GLOBAL_STORAGE_PATH I can't find anything in neither ltex-ls nor vsc**e-ltex.

weakish commented 10 months ago

Sorry. I remembered it wrong. It's not ~/.local/share/ltex/ but ~/.config/Code/User/globalStorage/valentjn.vscode-ltex/.