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

Major Fork Merge (including upstream breakages and unmerged PRs) #173

Merged
merged 38 commits into from
May 20, 2024

Conversation

PriceHiller
Copy link
Collaborator

@PriceHiller PriceHiller commented May 18, 2024

Hello, on the recommendation of @folke (#171 (comment)), I've opened a PR to track against my fork.

I'm opening this PR including all of my changes on my fork I've begun maintaining until you (@windwp ) are back.

This should serve as a diff between the two and once you are back you can review and merge.

If this is too large (which it likely is), please ping me and I can see about chunking my fork up and doing smaller PRs to you so its reviewable.

At the time of writing my fork does the following:

  • Requires Neovim 0.9.5 or greater
  • Completely removes nvim-treesitter as a hard dependency and instead uses vim.treesitter
  • Overhauls the tests so a simple make test downloads all dependencies for the plugin and runs the tests
  • Fixed the tests so now they should all pass
  • CI is using my own self-hosted runner, so CI changes should not be merged
  • Completely overhauled the setup, allowing for per filetype customization and global customization.
    • This also allows end users to extend or override the existing tag configurations for the defined filetypes. This was done in the hopes that if a upstream TS parser breaks, a user isn't screwed until we update nvim-ts-autotag to support it
  • Deprecates nvim-treesitter setup methods, instead opting for require("nvim-ts-autotag").setup({ ... })
  • Uses vim.keymap.set for bindings
  • Supporting additional filetypes like twig and blade
  • Fixing close errors as a result of only partially parsed updates in the treesitter tree (PriceHiller@a92a4e9)
  • Replaced the Sponsor section in the README with the Fork Status -- this should not be merged as is

And undoubtedly more as time goes on.

Thanks for the plugin, and looking forward to eventually having you back 🙂

@windwp
Copy link
Owner

windwp commented May 18, 2024

i still use this plugin so i will keep maintain it.
i haven't updated my neovim configuration recently, it might not be up-to-date with the latest Tree-sitter changes

@PriceHiller
Copy link
Collaborator Author

PriceHiller commented May 18, 2024

hi i still use this plugin so i will keep maintain it.

That's great to hear 🙂!

I've made some significant changes on my fork. Would you like me to start breaking up my fork into smaller PRs for individual review?

You may want to take a look at my fork and decide what you definitely don't want, like the new setup method.

@folke
Copy link
Contributor

folke commented May 18, 2024

@windwp just to be clear, nvim-ts-autotag doesn't break right now with the latest Neovim nightly/stable and the latest nvim-treesitter.

There is however a big nvim-treesitter rewrite under way and initially that was planned to be released together with Neovim 0.10, but has currently been postponed to Neovim 0.11. (See also @clason)

Either way, it's still a good idea to remove the nvim-treesitter dependency, since Neovim has all the required functionality since 0.9.x and this way nvim-ts-autotag wouldn't break once the rewrite gets released.

@clason
Copy link

clason commented May 18, 2024

Indeed; you can look at nvim-treesitter-context (and nvim-treesitter-textobjects on the main branch) to see how you can structure your plugin without relying on (deprecated!) nvim-treesitter-module.

@folke
Copy link
Contributor

folke commented May 18, 2024

It seems my PR got merged, so all good now :)

#171

@windwp
Copy link
Owner

windwp commented May 18, 2024

hi @PriceHiller
i just check that PR and it fix some issue with embed template on ruby and allow user can customize template . so i will merge it .
What is the selfhosted CI nix-runner?
Can you keep my test runner and i will merge.
Thank you

@PriceHiller
Copy link
Collaborator Author

I changed the CI over to mine because I got frustrated when debugging a CI issue 😅

When I get time later I'll restore the previous CI runner and ping you

PriceHiller and others added 21 commits May 19, 2024 07:00
See windwp#169

Signed-off-by: Price Hiller <[email protected]>
Co-authored-by: Ystri0n <[email protected]>
The only thing that's missing is it doesn't indent properly when you
close a tag, but otherwise it closes properly.
PERF: This will impact performance, something to keep an eye on.

Prior to this commit, some parsers like php were failing in tests. By
forcing a full reparse, the php parser among others get the correct
tree.
@PriceHiller
Copy link
Collaborator Author

@windwp this should be ready to go now.

You may want to run the CI for this prior to merging -- tests pass on my fork: https://github.com/PriceHiller/nvim-ts-autotag/actions/runs/9147532305

@PriceHiller
Copy link
Collaborator Author

PriceHiller commented May 19, 2024

Another thing worth review is the deprecation notices I've placed at 1.0.0. I started following Semantic(ish) Versioning on my fork. I intended to fully remove some features when I did the first 1.0.0 release.

I can modify those deprecations messages or do something with 'em if you'd like. Just let me know.

@PriceHiller
Copy link
Collaborator Author

PriceHiller commented May 19, 2024

REMINDER TO SELF: Once this gets merged/chunked then merged add an additional commit warning new downstream users to come back to the main repo -- staying on my fork shouldn't be necessary once this is merged.

Also -- delete/strikeout many of my "come try the fork messages" as they will no longer be accurate and lead folks away from an active repo. Not a good thing.

@windwp
Copy link
Owner

windwp commented May 20, 2024

i merge it, thank

@windwp windwp merged commit 3c5f849 into windwp:main May 20, 2024
@PriceHiller
Copy link
Collaborator Author

Cool, I'll update my fork to point users to go back over here.

As a note, my fork was intended in good-faith in case that wasn't clear. I figured you were burnt-out, didn't have enough time, or something else -- after all, it's a free project.

I accepted the invite you sent for collaboration, I'm happy to assist with maintenance. It may be a good idea to ping me with what type of stuff you'd be ok with me merging; I don't want to incorporate changes that are undesired as it's your project first and foremost.

Please ping me if there's anything I do that you want rolled back 😄.

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.

5 participants