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

Does this plugin implement quick fix? #3

Open
honzik20 opened this issue Jun 19, 2023 · 5 comments
Open

Does this plugin implement quick fix? #3

honzik20 opened this issue Jun 19, 2023 · 5 comments

Comments

@honzik20
Copy link

I've got this installed and it lints perfectly but I don't get a quick fix action.

@jdkato
Copy link
Member

jdkato commented Jun 21, 2023

Yes, so long as the rules you're using define an action.

@jdkato jdkato closed this as completed Jun 21, 2023
@honzik20
Copy link
Author

honzik20 commented Jun 22, 2023

I'm afraid it doesn't work for me. (Sublime Text Build 4143)

I've got this style:

extends: existence
message: "Don't use end punctuation in headings."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods
nonword: true
level: warning
scope: heading
action:
  name: edit
  params:
    - remove
    - '.?!'
tokens:
  - '[a-z][.?!](?:\s|$)'

But I only get a copy button:

image

Thanks for this amazing tool, by the way. Rolling out in a team of eight writers and they're lapping it up.

@ChrisChinchilla
Copy link

@jdkato and @honzik20 Same for me… I'm finally investigating using the LS for the VSCode extension, so testing this and I don't see any quick-fix options on styles that definitely have actions.

@jdkato jdkato reopened this Feb 7, 2024
@jdkato
Copy link
Member

jdkato commented Feb 7, 2024

I'm not sure what's going on since I can't reproduce this:

Screenshot 2024-02-06 at 11 42 12 PM

Do you see anything when you run LSP: Toggle Log Panel?

I'm going to work on getting errata-ai/vale.sh#29 merged, so I'll update the issue if I find anything.

@ChrisChinchilla
Copy link

OK @jdkato I am getting some inconsistent results between sublime and even VSCode right now, so I'm not sure if you changed something recently, and it looks like some of the docs have also moved around or gone, so I also can't find previous references I was looking for.

Couple of things…

@honzik20 I see you're checking with a spelling rule. As odd as this sounds, try a few misspelt words. If the dictionary can't find any alternatives, then it won't return anything.

That aside, I still can't get it to return anything that does return quick fixes in VS Code.

VSCode example…

Screenshot 2024-02-13 at 08 51 21

Same in Sublime…

Screenshot 2024-02-13 at 08 51 55

And in the log…

:: [08:51:51.071] --> vale-ls textDocument/codeAction (49): {'range': {'start': {'line': 39, 'character': 113}, 'end': {'line': 39, 'character': 118}}, 'context': {'diagnostics': [{'data': {'Action': {'Params': ['spellings'], 'Name': 'suggest'}, 'Link': '', 'Severity': 'error', 'Message': "Did you really mean 'willd'?", 'Match': 'willd', 'Line': 40, 'Description': '', 'Span': [114, 118], 'Check': 'Openly.Spelling'}, 'range': {'start': {'character': 113, 'line': 39}, 'end': {'character': 118, 'line': 39}}, 'message': "Did you really mean 'willd'?", 'code': 'Openly.Spelling', 'severity': 1, 'source': 'vale-ls'}], 'triggerKind': 2}, 'textDocument': {'uri': 'file:///Users/chrisward/Workspace/Kilt/docs/README.md'}}

Which shows something is returned. Is Quick fixes a paid feature in Sublime or something?

Or maybe there's a setup step missing in diocs?

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