Closed slotThe closed 2 years ago
Interesting... what OS are you using?
@abougouffa Do you have any idea to this issue? 😕
@slotThe Thank you for bringing this to my attention,
I didn't know about lsp-use-plists
before!
I've just pushed a patch at abougouffa/lsp-ltex@fix/lsp-use-plists, can you please test it?
@abougouffa I'm getting
lsp-ltex--code-action-add-to-dictionary: Wrong type argument: sequencep, :en-US
I believe the problems are lines like this
- (gethash lang args-ht)))))
+ (lsp-get args-ht (intern (concat ":" lang)))))))
Seems like lsp-mode is smart enough to figure out that we want the keys of our plist to be keywords and we don't have to do that ourselves.
For the record, the response I get back is
(:uri "file://<FILE>"
:words (:en-US ["XMonad"]))
If I revert the above diff and also do the same in lsp-ltex--add-rule
the adding sort of works, but I get an Invalid command list
error when trying to (re)start the server (and this is about the time where my lunch break ended :)
Here is a (way too long) stack trace:
When one uses
lsp-use-plists
(set-up according to the lsp-mode documentation), an error occurs while trying to use any code action. For example, trying to includeXMonad
in the dictionary results inThis seems to be because
lsp-ltex--action-add-to-rules
expects (as the same suggests)action-ht
to be a hash-tableHowever, this is a plist with the above configuration. Instead of e.g.
gethash
, the genericlsp-get
should be used.