diff options
| author | Andreas Schneider <asn@cryptomilk.org> | 2024-07-06 11:44:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-06 11:44:19 +0200 |
| commit | 55e4301036bb938474fc9768c41e28df867d9286 (patch) | |
| tree | d83f3c3d1bccb1ad97197f322fe5c689c4aef8fd /runtime/doc | |
| parent | 91e5dcae3d47e7eaf25537471288c27055fdddbe (diff) | |
| download | rneovim-55e4301036bb938474fc9768c41e28df867d9286.tar.gz rneovim-55e4301036bb938474fc9768c41e28df867d9286.tar.bz2 rneovim-55e4301036bb938474fc9768c41e28df867d9286.zip | |
feat(lsp): drop fswatch, use inotifywait (#29374)
This patch replaces fswatch with inotifywait from inotify-toools:
https://github.com/inotify-tools/inotify-tools
fswatch takes ~1min to set up recursively for the Samba source code
directory. inotifywait needs less than a second to do the same thing.
https://github.com/emcrisostomo/fswatch/issues/321
Also it fswatch seems to be unmaintained in the meantime.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/lua.txt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 39a047cbab..dfaf666874 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -543,16 +543,19 @@ Example: File-change detection *watch-file* vim.api.nvim_command( "command! -nargs=1 Watch call luaeval('watch_file(_A)', expand('<args>'))") < - *fswatch-limitations* -When on Linux and using fswatch, you may need to increase the maximum number -of `inotify` watches and queued events as the default limit can be too low. To -increase the limit, run: >sh - sysctl fs.inotify.max_user_watches=100000 - sysctl fs.inotify.max_queued_events=100000 + *inotify-limitations* +When on Linux you may need to increase the maximum number of `inotify` watches +and queued events as the default limit can be too low. To increase the limit, +run: >sh + sysctl fs.inotify.max_user_watches=494462 < -This will increase the limit to 100000 watches and queued events. These lines +This will increase the limit to 494462 watches and queued events. These lines can be added to `/etc/sysctl.conf` to make the changes persistent. +Note that each watch is a structure in the Kernel, thus available memory is +also a bottleneck for using inotify. In fact, a watch can take up to 1KB of +space. This means a million watches could result in 1GB of extra RAM usage. + Example: TCP echo-server *tcp-server* 1. Save this code to a file. 2. Execute it with ":luafile %". |