-
-
Notifications
You must be signed in to change notification settings - Fork 628
feat(watcher): fs_poll -> fs_event, destroy nodes/watchers #1431
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
Conversation
@@ -46,12 +46,13 @@ function M.create_watcher(absolute_path) | |||
end | |||
|
|||
log.line("watcher", "node start '%s'", absolute_path) | |||
Watcher.new { | |||
return Watcher.new { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops
@@ -29,8 +29,8 @@ function M.reload_project(project_root, path) | |||
return | |||
end | |||
|
|||
if path and not path:match("^" .. project_root) then | |||
path = nil | |||
if path and path:find(project_root, 1, true) ~= 1 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was pattern matching the file name 🤦
Resolves #1373 (comment)
stat = false, | ||
-- recursive is not functional in neovim's libuv implementation | ||
recursive = false, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this in for documentation purposes.
requires #1430
Back to fs_event, as we now have thread safe and queued debouncing.
Watchers are destroyed via node destruction.
I'd like to make nodes into a proper class, however I'll do that in a later PR.
node_destroy
will do for now.Tested a variety of git projects; tmpfs events are now properly fired 🎩