Skip to content

Commit

Permalink
feat(editing-support): add nvim-ts-rainbow
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Mar 16, 2023
1 parent cd18f64 commit a06a3bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/editing-support/nvim-ts-rainbow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# nvim-ts-rainbow

**Repository:** https://github.com/mrjones2014/nvim-ts-rainbow

Rainbow parentheses for neovim using tree-sitter.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = { "mrjones2014/nvim-ts-rainbow" },
opts = { rainbow = { enable = true } },
}

11 comments on commit a06a3bf

@szechp
Copy link

@szechp szechp commented on a06a3bf Mar 16, 2023

Choose a reason for hiding this comment

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

Why not the better maintained hard fork: https://gitlab.com/HiPhish/nvim-ts-rainbow2?

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

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

Feel free to make a PR @szechp ! That would be a different plugin but all are welcome. This is just a repo for the community to contribute to freely :) this does not reflect any opinion of AstroNvim as a whole

@utkarshgupta137
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the sentiment, but the readme of the repo itself recommends using the hard fork at the top.

@utkarshgupta137
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I think a workaround for this issue should be included: p00f/nvim-ts-rainbow#112.
Something like this perhaps:

    vim.api.nvim_create_autocmd({ "BufWritePost", "FocusGained" }, {
      callback = function()
        vim.cmd "TSDisable rainbow"
        vim.cmd "TSEnable rainbow"
      end,
    })

I'm not very familiar with neovim events, so there might be a better way to do this.

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I definitely would recommend someone add both of these things :)

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the recommendations @utkarshgupta137 !

@utkarshgupta137
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be added to this repo itself, would you like me to raise a PR?

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah definitely it should be added here :) a PR would be great! Everyone should be free to open PRs here since no one is actively developing this repository. It is only here for users to make PRs to. I will not be going and finding bugs/fixing bugs/adding new plugins/etc.

I will also not be testing the PRs made here. Like I said before and in the contribution guidelines, it is truly a repository here for the community to care for and maintain ❤️

@mehalter
Copy link
Member Author

Choose a reason for hiding this comment

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

just make sure @utkarshgupta137 to read the contribution guidelines and it would be great to add astrocommunity.editing-support.nvim-ts-rainbow2

@szechp
Copy link

@szechp szechp commented on a06a3bf Mar 17, 2023 via email

Choose a reason for hiding this comment

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

@utkarshgupta137
Copy link
Contributor

Choose a reason for hiding this comment

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

@szechp Just saw your comment. I've already raised a PR: #85. Let me know how I can improve it.

Please sign in to comment.