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

feat(vale_ls): add reStructuredText to filetypes #3439

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

antznin
Copy link
Contributor

@antznin antznin commented Nov 17, 2024

Vale supports parsing reStructuredText files, as documented here: https://vale.sh/docs/topics/scoping/#restructuredtext

It uses rst2html in the background.

@glepnir
Copy link
Member

glepnir commented Nov 17, 2024

seems like rst does not include in our builtin filetype detect lists ? if it need user regsiter this filetype by themself i think this also can be done in local

@antznin
Copy link
Contributor Author

antznin commented Nov 17, 2024

Not sure I understand what you mean: this change is what I had to add to vale_ls.lua for vale_ls to parse reStructuredText files. Running :set filetype? on rst files returns filetype=rst (neovim v0.10.1).

@antznin
Copy link
Contributor Author

antznin commented Nov 17, 2024

Same result when I open an rst file with nvim --noplugin, so this shouldn't be specific to my config I think?

@glepnir
Copy link
Member

glepnir commented Nov 17, 2024

aha good to know i just don't find it in detect.lua if set ft? can return correct filetype let's go :)

Edit: --noplugin just mean without any builtin plugin does it can return rst when you run nvim --clean -u NONE

@antznin
Copy link
Contributor Author

antznin commented Nov 17, 2024

Thanks for the tip, yes it does return filetype=rst with nvim --clean -u NONE. I forgot to update configs.txt/md, I can do that too.
Edit: updated config.md/txt in 1d4cf48.
Edit2: darn, I didn't see it was automagic :) let me revert that...

Copy link
Contributor

Note that configs.md or configs.txt will be regenerated by the docgen CI process. Edit the Lua source file instead. For details on generating documentation, see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs

Vale supports parsing reStructuredText files, as documented here:
https://vale.sh/docs/topics/scoping/#restructuredtext

It uses rst2html in the background.

Signed-off-by: Antonin Godard <[email protected]>
@glepnir
Copy link
Member

glepnir commented Nov 17, 2024

np thanks.

@glepnir glepnir merged commit a40c2fd into neovim:master Nov 17, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

2 participants