<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/_watch.lua, branch rahm</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>feat(vim.validate): improve fast form and deprecate spec form</title>
<updated>2024-10-21T10:32:06+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-10-18T10:33:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3572319b4cb1a4163624a5fe328886f1928dbc4a'/>
<id>3572319b4cb1a4163624a5fe328886f1928dbc4a</id>
<content type='text'>
Problem:

`vim.validate()` takes two forms when it only needs one.

Solution:

- Teach the fast form all the features of the spec form.
- Deprecate the spec form.
- General optimizations for both forms.
- Add a `message` argument which can be used alongside or in place
  of the `optional` argument.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

`vim.validate()` takes two forms when it only needs one.

Solution:

- Teach the fast form all the features of the spec form.
- Deprecate the spec form.
- General optimizations for both forms.
- Add a `message` argument which can be used alongside or in place
  of the `optional` argument.
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(validate): use lighter version</title>
<updated>2024-10-17T15:53:52+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-10-16T16:03:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a'/>
<id>3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a</id>
<content type='text'>
- Also fix `vim.validate()` for PUC Lua when showing errors for values
  that aren't string or number.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Also fix `vim.validate()` for PUC Lua when showing errors for values
  that aren't string or number.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(watch): ignore nonexistent paths (ENOENT)</title>
<updated>2024-10-02T14:41:01+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-09-30T13:25:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9e23b4e1852f9ad6418b45f827d1fb160611d8cf'/>
<id>9e23b4e1852f9ad6418b45f827d1fb160611d8cf</id>
<content type='text'>
Problem:
The `_watch.watch()` strategy may fail if the given path does not exist:

    …/vim/_watch.lua:101: ENOENT: no such file or directory
    stack traceback:
        [C]: in function 'assert'
        …/vim/_watch.lua:101: in function &lt;…/vim/_watch.lua:61&gt;
        [string "&lt;nvim&gt;"]:5: in main chunk

- `_watch.watch()` actively asserts any error returned by `handle:start()`.
- whereas `_watch.watchdirs()` just ignores the result of `root_handle:start()`.

Servers may send "client/registerCapability" with "workspace/didChangeWatchedFiles"
item(s) (`baseUri`) which do not actually exist on the filesystem:
https://github.com/neovim/neovim/issues/28058#issuecomment-2189929424

    {
      method = "client/registerCapability",
      params = {
        registrations = { {
            method = "workspace/didChangeWatchedFiles",
            registerOptions = {
              watchers = { {
                  globPattern = {
                    baseUri = "file:///Users/does/not/exist",
                    pattern = "**/*.{ts,js,mts,mjs,cjs,cts,json,svelte}"
                  }
                },
    ...
    }

Solution:
- Remove the assert in `_watch.watch()`.
- Show a once-only message for both cases.
- More detailed logging is blocked until we have `nvim_log` / `vim.log`.

fix #28058
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The `_watch.watch()` strategy may fail if the given path does not exist:

    …/vim/_watch.lua:101: ENOENT: no such file or directory
    stack traceback:
        [C]: in function 'assert'
        …/vim/_watch.lua:101: in function &lt;…/vim/_watch.lua:61&gt;
        [string "&lt;nvim&gt;"]:5: in main chunk

- `_watch.watch()` actively asserts any error returned by `handle:start()`.
- whereas `_watch.watchdirs()` just ignores the result of `root_handle:start()`.

Servers may send "client/registerCapability" with "workspace/didChangeWatchedFiles"
item(s) (`baseUri`) which do not actually exist on the filesystem:
https://github.com/neovim/neovim/issues/28058#issuecomment-2189929424

    {
      method = "client/registerCapability",
      params = {
        registrations = { {
            method = "workspace/didChangeWatchedFiles",
            registerOptions = {
              watchers = { {
                  globPattern = {
                    baseUri = "file:///Users/does/not/exist",
                    pattern = "**/*.{ts,js,mts,mjs,cjs,cts,json,svelte}"
                  }
                },
    ...
    }

Solution:
- Remove the assert in `_watch.watch()`.
- Show a once-only message for both cases.
- More detailed logging is blocked until we have `nvim_log` / `vim.log`.

fix #28058
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(watch): exclude .git when using inotifywait (#29914)</title>
<updated>2024-08-01T14:00:48+00:00</updated>
<author>
<name>Manuel</name>
<email>dev+git@manuelsbrain.de</email>
</author>
<published>2024-08-01T14:00:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=32e128f20992e350b3e39c7469baa1f692418203'/>
<id>32e128f20992e350b3e39c7469baa1f692418203</id>
<content type='text'>
inotifywait man page specifies:
The file must be specified with a relative or absolute path according to whether a relative or absolute path is given for watched directories.

So it would only work this way in case the path is relative (which at least for gopls it is not)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
inotifywait man page specifies:
The file must be specified with a relative or absolute path according to whether a relative or absolute path is given for watched directories.

So it would only work this way in case the path is relative (which at least for gopls it is not)</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lsp): drop fswatch, use inotifywait (#29374)</title>
<updated>2024-07-06T09:44:19+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@cryptomilk.org</email>
</author>
<published>2024-07-06T09:44:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=55e4301036bb938474fc9768c41e28df867d9286'/>
<id>55e4301036bb938474fc9768c41e28df867d9286</id>
<content type='text'>
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 &lt;asn@cryptomilk.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;asn@cryptomilk.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>perf(lsp): only joinpath for dirs in watchdirs</title>
<updated>2024-05-14T08:42:42+00:00</updated>
<author>
<name>Mathias Fussenegger</name>
<email>f.mathias@zignar.net</email>
</author>
<published>2024-05-12T19:09:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2f4792943aa92223fadd472f20449cd13707ff7a'/>
<id>2f4792943aa92223fadd472f20449cd13707ff7a</id>
<content type='text'>
Doesn't have a huge impact, but showed up in profile output using
`require("jit.p").start("i1", "/tmp/profile")`

before:

    31%  joinpath
    25%  fs.lua:0
    13%  normalize
    13%  skip
     8%  _watchfunc
     5%  gsplit
     3%  spairs

after:

    34%  skip
    29%  fs.lua:0
    12%  joinpath
     7%  normalize
     5%  _watchfunc
     5%  spairs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doesn't have a huge impact, but showed up in profile output using
`require("jit.p").start("i1", "/tmp/profile")`

before:

    31%  joinpath
    25%  fs.lua:0
    13%  normalize
    13%  skip
     8%  _watchfunc
     5%  gsplit
     3%  spairs

after:

    34%  skip
    29%  fs.lua:0
    12%  joinpath
     7%  normalize
     5%  _watchfunc
     5%  spairs
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: move fswatch linux check inside of vim.schedule (#27824)</title>
<updated>2024-03-12T07:15:55+00:00</updated>
<author>
<name>Tomas Slusny</name>
<email>slusnucky@gmail.com</email>
</author>
<published>2024-03-12T07:15:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=41fb98d6fab5aa02ef370d1b2b283b078517ffa4'/>
<id>41fb98d6fab5aa02ef370d1b2b283b078517ffa4</id>
<content type='text'>
Fixes issue reported in the original PR:
https://github.com/neovim/neovim/pull/27810

Signed-off-by: Tomas Slusny &lt;slusnucky@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes issue reported in the original PR:
https://github.com/neovim/neovim/pull/27810

Signed-off-by: Tomas Slusny &lt;slusnucky@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>docs: adjust fswatch overflow message to mention docs with info</title>
<updated>2024-03-11T14:05:26+00:00</updated>
<author>
<name>Tomas Slusny</name>
<email>slusnucky@gmail.com</email>
</author>
<published>2024-03-11T01:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0f20b7d803779950492c2838e2b042a38f4ee22f'/>
<id>0f20b7d803779950492c2838e2b042a38f4ee22f</id>
<content type='text'>
- Add :h fswatch-limitations that notifies user about default inotify
  limitations on linux and how to adjust them
- Check for Event queue overflow message from fswatch and refer user to
  new documentation

Signed-off-by: Tomas Slusny &lt;slusnucky@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add :h fswatch-limitations that notifies user about default inotify
  limitations on linux and how to adjust them
- Check for Event queue overflow message from fswatch and refer user to
  new documentation

Signed-off-by: Tomas Slusny &lt;slusnucky@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(fswatch): --latency is locale dependent</title>
<updated>2024-03-10T19:50:32+00:00</updated>
<author>
<name>Oscar Creator</name>
<email>oscar.creator13@gmail.com</email>
</author>
<published>2024-03-09T16:10:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=06fcf71bd0953baf9dc6d4c4bddf586c448f5ca6'/>
<id>06fcf71bd0953baf9dc6d4c4bddf586c448f5ca6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lsp): report fswatch errors</title>
<updated>2024-03-06T10:57:21+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-03-03T11:54:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8149bd089e15043576b1e6588babd9c121740f1a'/>
<id>8149bd089e15043576b1e6588babd9c121740f1a</id>
<content type='text'>
Resolves #27713

Co-authored-by: Tomasz N &lt;przepompownia@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Resolves #27713

Co-authored-by: Tomasz N &lt;przepompownia@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
