emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSX FSEvents file watching support


From: Muir Manders
Subject: Re: OSX FSEvents file watching support
Date: Thu, 18 Jul 2019 08:14:33 -0700
User-agent: Cyrus-JMAP/3.1.6-736-gdfb8e44-fmstable-20190718v2

> file notification is good if it acts over a limited set of file
> changes. Whether recursive directory tracking belongs to it - I don't
> know. But the proposed use case, lsp-mode, could fall into that category

lsp-mode in particular needs to watch your entire source code project for file 
changes and then relay the file names that were created/modified/deleted fo the 
LSP server. This is to handle when files change outside the editor, like when 
changing branches. The LSP server registers file globs for the types of files 
it wants to receive notifications for, which is normally just the source code 
files and maybe some project metadata files (e.g. "**/*.go" to watch Go files). 
The LSP spec delegates file watching to the editor because file watching is 
hard, and in general there are fewer LSP clients (editors) than LSP servers.

The current (kqueue, at least) backends must open many file descriptors to 
watch a large directory tree. FSEvents however can do this task efficiently.

Muir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]