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

Remove nvim-treesitter, use nvim 0.9+ core utilities #80

Merged
merged 2 commits into from Nov 18, 2023

Conversation

Slotos
Copy link
Contributor

@Slotos Slotos commented Nov 2, 2023

With 0.9 being the minimal version for this plugin, nvim-treesitter is quite literally a fifth wheel for its functionality. It installs and updates parsers, but everything this plugin needs to operate afterwards is available in the core vim.treesitter utilities set.

I also borrowed a test setup from aerial.nvim, to create a minimal setup launcher bash script that truly isolates minimal config from main user configuration.

Copy link
Owner

@JoosepAlviste JoosepAlviste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great PR! It's nice to see that all the necessary parts are actually available in Neovim core now. We can get rid of quite a lot of unnecessary code 😄

I found one issue and had a couple other thoughts on how to improve this a bit.

README.md Show resolved Hide resolved
lua/ts_context_commentstring/internal.lua Show resolved Hide resolved
utils/run_minimal.sh Show resolved Hide resolved
lua/ts_context_commentstring/utils.lua Outdated Show resolved Hide resolved
@JoosepAlviste
Copy link
Owner

This looks great now! Just the Stylua check to fix and the deprecation message wording, and then we can merge it 🎉

Thanks for taking care of the fixes and improvements!

Slotos and others added 2 commits November 18, 2023 21:44
DEPRECATED context_commentstring nvim-treesitter module, use
require('ts_context_commentstring').setup {} instead.

With 0.9 being the minimal version for this plugin, nvim-treesitter is
quite literally a fifth wheel for its functionality. It installs and
updates parsers, but everything this plugin needs to operate afterwards
is available in the core `vim.treesitter` utilities set.

I also borrowed a test setup from aerial.nvim, to create a minimal
setup launcher bash script that truly isolates minimal config from
main user configuration.
Sh is handled by bash tree-sitter parser.
`vim.treesitter.language.get_lang('sh')` returns `bash`.
This change makes this plugin work with both sh and bash files.
@JoosepAlviste JoosepAlviste merged commit ead792c into JoosepAlviste:main Nov 18, 2023
1 check passed
@JoosepAlviste JoosepAlviste mentioned this pull request Nov 18, 2023
@JoosepAlviste
Copy link
Owner

JoosepAlviste commented Nov 18, 2023

Thanks for the great work on this! It feels great to get rid of some useless code 🎉

I also created an issue with the breaking changes and mentioned this there: #82 (comment) and updated the integrations wiki: https://github.com/JoosepAlviste/nvim-ts-context-commentstring/wiki/Integrations.

Hopefully this won't be too big of a pain for users 🤞

@Slotos Slotos deleted the be-a-plugin branch November 18, 2023 22:32
aknackd added a commit to aknackd/dotfiles that referenced this pull request Nov 21, 2023
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.

None yet

2 participants