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

fix(trouble): compatibility with Trouble v3 #286

Merged
merged 1 commit into from
Jul 5, 2024
Merged

fix(trouble): compatibility with Trouble v3 #286

merged 1 commit into from
Jul 5, 2024

Conversation

NGPONG
Copy link
Contributor

@NGPONG NGPONG commented Jul 5, 2024

Thank for trouble, which offers us more customization options! Now, Trouble v3 provides an events configuration. Therefore, I believe the additional autocmd settings here are unnecessary.

events = { "BufEnter", "BufWritePost" },

To provide more explanation about "unnecessary":

  1. Firstly, the provider parameter no longer works and should be changed to mode = 'todo'. Otherwise, due to filter failure, the autocmd set in todocomment will incorrectly refresh sources that shouldn't be processed.

    https://github.com/folke/trouble.nvim/blob/e32c194558ebeb433ccfd580a34c66770bc102bd/lua/trouble/api.lua#L107

    https://github.com/folke/trouble.nvim/blob/e32c194558ebeb433ccfd580a34c66770bc102bd/lua/trouble/api.lua#L16-L27

    https://github.com/folke/trouble.nvim/blob/e32c194558ebeb433ccfd580a34c66770bc102bd/lua/trouble/view/init.lua#L106-L108

  2. Secondly, as explained above, the configuration within events already provides the BufferWritePost event.

In conclusion, we need to choose the correct version to handle the compatibility issues with the older versions, and I will continue to follow up on this.

Best regards!

@NGPONG NGPONG changed the title Compatible with Trouble v3 feat: Compatible with Trouble v3 Jul 5, 2024
@folke folke changed the title feat: Compatible with Trouble v3 fix(trouble): compatibility with Trouble v3 Jul 5, 2024
@folke folke merged commit 01b4599 into folke:main Jul 5, 2024
7 of 9 checks passed
@folke
Copy link
Owner

folke commented Jul 5, 2024

ty!

folke pushed a commit that referenced this pull request Jul 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](v1.2.0...v1.3.0)
(2024-07-07)


### Features

* added support for fzf-lua
([fe5a7c6](fe5a7c6))
* **fzf:** multiline by default
([8fdea2a](8fdea2a))
* **highlight:** allow extended highlighting patterns
([#185](#185))
([#255](#255))
([76c8fee](76c8fee))
* **highlight:** allow highlighting the full pattern
([#180](#180))
([ad775a7](ad775a7))


### Bug Fixes

* don't use tbl_flatten. Fixes
[#272](#272)
([9c104cf](9c104cf))
* **extension:** provide default icon
([#274](#274))
([7de4e85](7de4e85)),
closes [#202](#202)
* **highlight:** match to the end of length `#matched`
([#288](#288))
([a40fa7e](a40fa7e))
* **telecope:** icons highlight.
([#279](#279))
([4573f4f](4573f4f))
* ternary evaluation in setlist for opts.open
([#252](#252))
([c7a6a02](c7a6a02))
* **trouble:** compatibility with Trouble v3
([#286](#286))
([01b4599](01b4599))


### Reverts

* feat(highlight): allow highlighting the full pattern
([#180](#180))
([996d1a7](996d1a7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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