Skip to content

Add ability for plugins to handle file change notifications #1588

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

Merged
merged 17 commits into from
Mar 20, 2021

Conversation

pepeiborra
Copy link
Collaborator

Rebased #1585 and extracted ghcide notification handlers

@pepeiborra pepeiborra requested a review from alanz March 17, 2021 18:59
Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

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

There seems to be some duplication between the HLS and ghcide side.

Otherwise seems to be what I had before.

@pepeiborra pepeiborra force-pushed the plugin-notifications branch from f0adfb8 to 85cb54c Compare March 17, 2021 21:30
@isovector
Copy link
Collaborator

isovector commented Mar 18, 2021

Is this capable of watching arbitrary directories on the filesystem? I wanted such a thing in #524, in order to watch $XDG_CONFIG/wingman.

@pepeiborra
Copy link
Collaborator Author

Is this capable of watching arbitrary directories on the filesystem? I wanted such a thing in #524, in order to watch $XDG_CONFIG/wingman.

No, only workspace folders. Outside the workspace, you would need to implement your own watching

@pepeiborra pepeiborra force-pushed the plugin-notifications branch from 92e4a85 to 0f22329 Compare March 18, 2021 08:46
@jneira
Copy link
Member

jneira commented Mar 18, 2021

Is this capable of watching arbitrary directories on the filesystem? I wanted such a thing in #524, in order to watch $XDG_CONFIG/wingman.

No, only workspace folders. Outside the workspace, you would need to implement your own watching

I would need it for hlint config files for #594, maybe it worths to implement it in some common place (hls-plugin-api?)

@pepeiborra pepeiborra marked this pull request as ready for review March 18, 2021 14:10
@pepeiborra
Copy link
Collaborator Author

Is this capable of watching arbitrary directories on the filesystem? I wanted such a thing in #524, in order to watch $XDG_CONFIG/wingman.

No, only workspace folders. Outside the workspace, you would need to implement your own watching

I would need it for hlint config files for #594, maybe it worths to implement it in some common place (hls-plugin-api?)

Rather than turning HLS into an operating system, I would push back on these feature requests and ask people to reload

@pepeiborra pepeiborra force-pushed the plugin-notifications branch from 071074e to 60e36d1 Compare March 18, 2021 15:26
@pepeiborra pepeiborra requested a review from alanz March 18, 2021 18:36
@pepeiborra pepeiborra force-pushed the plugin-notifications branch from 874c4c2 to 8821bba Compare March 18, 2021 19:07
alanz and others added 14 commits March 19, 2021 08:58
Like pluginHandlers, but for notifications

At present the last one in the chain wins, so if one is set it
overrides the one built into ghcide
This is required to allow for user defined notification handlers, otherwise
HLS plugins will overwrite the ghcide handlers and nothing will work
Co-authored-by: wz1000 <zubin.duggal@gmail.com>
@pepeiborra pepeiborra force-pushed the plugin-notifications branch from 8821bba to 352272d Compare March 19, 2021 08:58
@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Mar 20, 2021
@mergify mergify bot merged commit b9c6e6c into master Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants