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

addToDictionary command not working #4

Open
patrickswijgman opened this issue Dec 18, 2024 · 4 comments
Open

addToDictionary command not working #4

patrickswijgman opened this issue Dec 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@patrickswijgman
Copy link

patrickswijgman commented Dec 18, 2024

Hey! Maybe I'm missing something but it looks like the Add to dictionary command does not work.

I see this in the RPC messages when looking in the logs:

// Send:
{"jsonrpc":"2.0","id":386,"method":"workspace/executeCommand","params":{"command":"_ltex.addToDictionary","arguments":[{"uri":"file://__REDACTED__.md","words":{"en-US":["__REDACTED__"]}}]}}
// Receive:
{"jsonrpc":"2.0","id":386,"result":{"success":false,"errorMessage":"Unknown command \u0027_ltex.addToDictionary\u0027, ignoring"}}

I guess I could add my custom words in the Zed config, but this code action was given so I would've hoped it worked 😇

I don't know if this is an issue within Zed extension or an issue within ltex-ls itself. If you need some more info let me know 😄

@vitallium
Copy link
Owner

Yeah, I also encountered that. I think this an issue with ltex-plus itself since it provides code actions as commands but it does not handle them:

{"jsonrpc":"2.0","id":13,"method":"workspace/executeCommand","params":{"command":"_ltex.addToDictionary","arguments":[{"uri":"file:///Users/vslobodin/Development/ruby-lsp/README.md","words":{"en-US":["userrs"]}}]}}
// Receive:
{"jsonrpc":"2.0","id":13,"result":{"success":false,"errorMessage":"Unknown command \u0027_ltex.addToDictionary\u0027, ignoring"}}

@vitallium vitallium added the bug Something isn't working label Dec 27, 2024
@497e0bdf29873
Copy link

There seems to be something more wrong than ltex-plus just not inserting entries into the dictionary: it doesn't even load them. Due to this issue, I tried to pass it my old aspell database as instructed in the documentation (":path" as a word in the settings), but, no, it doesn't load it. It does understand individual words passed in the settings, though, so I think I got the setting correct.

@vitallium
Copy link
Owner

@497e0bdf29873 do you mind sharing your settings, please, so that I can take a look?

@497e0bdf29873
Copy link

All settings or just ltex? The LTeX settings are

  "lsp": {
    "ltex": {
      "settings": {
        "ltex": {
          "language": "en-GB",
          "disabledRules": { "en-GB": ["OXFORD_SPELLING_Z_NOT_S"] },
          "dictionary": { "en-GB": ["subdifferential", ":~/lib/ltex-en-GB.txt"] }
        }
      }
    }
  }

The lib-en-GB.txt contains just the line subdifferentials.
The subdifferential in the settings.json is correctly recognised, but subdifferentials from the file not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants