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

Adding words to dictionary - how to do it? #61

Open
Kaspazza opened this issue Jan 22, 2024 · 13 comments
Open

Adding words to dictionary - how to do it? #61

Kaspazza opened this issue Jan 22, 2024 · 13 comments

Comments

@Kaspazza
Copy link

Kaspazza commented Jan 22, 2024

I get a message "If you don't want to ... to be marked as misspelled in the future you can add it to your personal dictionary."

And here comes the question, how can I add that from emacs to the dictionary?

I'm using free version (without login).

@jcs090218
Copy link
Member

Do you have an lsp-mode frontend installed? If you do, you should see an option "Add XXX to dictionary".

Here are some lsp-mode frontends:

@Kaspazza
Copy link
Author

Kaspazza commented Jan 23, 2024

@jcs090218 Thanks for your answer! I'm using doom emacs, and I have lsp-ui installed, I even use the command lsp-ui-doc-show as you have in your screenshot.

This is how it looks like:
image

And this is with ui-doc
image

But I don't see any option about Add to the dictionary, neither here or when I M-x search, what is the lsp command for that?

@jcs090218
Copy link
Member

It should appear on the sideline as a code action (yellow). See the screenshot https://raw.githubusercontent.com/emacs-sideline/sideline/master/etc/1.png.

@Kaspazza
Copy link
Author

Kaspazza commented Jan 23, 2024

@jcs090218 oh so you mean when you do lsp-execute-code-action, it should be action there!

I have dismiss option, but I don't think it's adding to dictionary

That's weird but I don't have that, are you perhaps logged in? Maybe that's the case

@jcs090218
Copy link
Member

I'm using the free version as well. Can you try reinstalling the language server? Sometimes, it does help!

@Kaspazza
Copy link
Author

Kaspazza commented Jan 23, 2024

@jcs090218 And do you know where the dictionary is saved? Can I share that with the team or in worst case eddit it there?

@Kaspazza
Copy link
Author

Kaspazza commented Jan 23, 2024

@jcs090218 I've reinstalled grammarly-ls, I've noticed one more thing,
I'm connected to grammarly-ls, I get the highlighting, but when I do lsp-grammarly-resume it is returning an error
"LSP :: Error from the Language Server: Request $/resume failed with message: object is not iterable (cannot read property Symbol(Symbol.iterator)) (Internal Error)"

Is this normal on free version? (btw I still don't see add dictionary)

@jcs090218
Copy link
Member

And do you know where the dictionary is saved? Can I share that with the team or in worst case eddit it there?

This is currently a missing feature. At the moment, you need to manually edit the variable lsp-grammarly-user-words.

I'm connected to grammarly-ls, I get the highlighting, but when I do lsp-grammarly-resume it is returning an error
"LSP :: Error from the Language Server: Request $/resume failed with message: object is not iterable (cannot read property Symbol(Symbol.iterator)) (Internal Error)"

Yes, lsp-grammarly-resume doesn't work at the moment.

@Kaspazza
Copy link
Author

Kaspazza commented Jan 24, 2024

@jcs090218 Hmm, okay, thanks for help. I was not able to resolve that "Add to dictionary", if you have any more ideas let me know.

Maybe you know how I can make sure that Grammarly is working? As flycheck may use many checkers

@jcs090218
Copy link
Member

I was not able to resolve that "Add to dictionary", if you have any more ideas let me know.

It works in the local buffer, but once you killed it, the data are gone.

Maybe you know how I can make sure that Grammarly is working? As flycheck may use many checkers

Maybe try M-x lsp-describe-session.

@Kaspazza
Copy link
Author

@jcs090218 Okay, lsp-grammarly it seems to be there, and if the dictionary is only on local buffer it doesn't matter, as I have the "Dismiss" option.

I've found that lsp-grammarly has conflict with marksman. Both can't be turned on btw.

@jcs090218
Copy link
Member

I've found that lsp-grammarly has conflict with marksman. Both can't be turned on btw.

lsp-grammarly has the add-on property. It should be able to work with other LSP clients. 🤔

:add-on? t

@IsaulGarcia
Copy link

IsaulGarcia commented Mar 14, 2024

@jcs090218 Thanks for your answer! I'm using doom emacs, and I have lsp-ui installed, I even use the command lsp-ui-doc-show as you have in your screenshot.

This is how it looks like: image

And this is with ui-doc image

But I don't see any option about Add to the dictionary, neither here or when I M-x search, what is the lsp command for that?

Sorry for the aside, but how did you get the lsp-ui to show highlighted text, instead of the span tags like the example image of the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants