<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/lsp/_watchfiles.lua, branch fix_repeatcmdline</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>refactor(lsp): add type annotations to _watchfiles (#26109)</title>
<updated>2023-11-20T16:19:41+00:00</updated>
<author>
<name>Mathias Fußenegger</name>
<email>mfussenegger@users.noreply.github.com</email>
</author>
<published>2023-11-20T16:19:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ec79ff893d5906e1f0d90953cffa535ffae47823'/>
<id>ec79ff893d5906e1f0d90953cffa535ffae47823</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): improve annotations for stricter luals diagnostics (#24609)</title>
<updated>2023-08-09T09:06:13+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2023-08-09T09:06:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c43c745a14dced87a23227d7be4f1c33d4455193'/>
<id>c43c745a14dced87a23227d7be4f1c33d4455193</id>
<content type='text'>
Problem: luals returns stricter diagnostics with bundled luarc.json
Solution: Improve some function and type annotations:

* use recognized uv.* types 
* disable diagnostic for global `vim` in shared.lua
* docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type)
* add type alias for lpeg pattern
* fix return annotation for `vim.secure.trust`
* rename local Range object in vim.version (shadows `Range` in vim.treesitter)
* fix some "missing fields" warnings
* add missing required fields for test functions in eval.lua
* rename lsp meta files for consistency
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: luals returns stricter diagnostics with bundled luarc.json
Solution: Improve some function and type annotations:

* use recognized uv.* types 
* disable diagnostic for global `vim` in shared.lua
* docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type)
* add type alias for lpeg pattern
* fix return annotation for `vim.secure.trust`
* rename local Range object in vim.version (shadows `Range` in vim.treesitter)
* fix some "missing fields" warnings
* add missing required fields for test functions in eval.lua
* rename lsp meta files for consistency
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lsp): do not assume client capability exists in watchfiles check (#24550)</title>
<updated>2023-08-04T06:10:54+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2023-08-04T06:10:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cc87dda31a5b5637ade7ddcfe5199f2df5fd47df'/>
<id>cc87dda31a5b5637ade7ddcfe5199f2df5fd47df</id>
<content type='text'>
PR #23689 assumes `client.config.capabilities.workspace.didChangeWatchedFiles`
exists when checking `dynamicRegistration`, but thats's true only if it was
passed to `vim.lsp.start{_client}`.

This caused #23806 (still an issue in v0.9.1; needs manual backport), but #23681
fixed it by defaulting `config.capabilities` to `make_client_capabilities` if
not passed to `vim.lsp.start{_client}`.

However, the bug resurfaces on HEAD if you provide a non-nil `capabilities` to
`vim.lsp.start{_client}` with missing fields (e.g: not made via
`make_client_capabilities`).

From what I see, the spec says such missing fields should be interpreted as an
absence of the capability (including those indicated by missing sub-fields):
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities

Also, suggest `vim.empty_dict()` for an empty dict in
`:h vim.lsp.start_client()` (`{[vim.type_idx]=vim.types.dictionary}`
no longer works anyway, probably since the cjson switch).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR #23689 assumes `client.config.capabilities.workspace.didChangeWatchedFiles`
exists when checking `dynamicRegistration`, but thats's true only if it was
passed to `vim.lsp.start{_client}`.

This caused #23806 (still an issue in v0.9.1; needs manual backport), but #23681
fixed it by defaulting `config.capabilities` to `make_client_capabilities` if
not passed to `vim.lsp.start{_client}`.

However, the bug resurfaces on HEAD if you provide a non-nil `capabilities` to
`vim.lsp.start{_client}` with missing fields (e.g: not made via
`make_client_capabilities`).

From what I see, the spec says such missing fields should be interpreted as an
absence of the capability (including those indicated by missing sub-fields):
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientCapabilities

Also, suggest `vim.empty_dict()` for an empty dict in
`:h vim.lsp.start_client()` (`{[vim.type_idx]=vim.types.dictionary}`
no longer works anyway, probably since the cjson switch).</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): use protocol.Methods instead of strings #24537</title>
<updated>2023-08-03T11:03:48+00:00</updated>
<author>
<name>Raphael</name>
<email>glephunter@gmail.com</email>
</author>
<published>2023-08-03T11:03:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f1772272b4fda43c093fc495f54b5e7c11968d62'/>
<id>f1772272b4fda43c093fc495f54b5e7c11968d62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(lua): more improvements (#24387)</title>
<updated>2023-07-18T14:42:30+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-07-18T14:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=be74807eef13ff8c90d55cf8b22b01d6d33b1641'/>
<id>be74807eef13ff8c90d55cf8b22b01d6d33b1641</id>
<content type='text'>
* docs(lua): teach lua2dox how to table

* docs(lua): teach gen_vimdoc.py about local functions

No more need to mark local functions with @private

* docs(lua): mention @nodoc and @meta in dev-lua-doc

* fixup!

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;

---------

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* docs(lua): teach lua2dox how to table

* docs(lua): teach gen_vimdoc.py about local functions

No more need to mark local functions with @private

* docs(lua): mention @nodoc and @meta in dev-lua-doc

* fixup!

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;

---------

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>perf(lsp): reduce polling handles for workspace/didChangeWatchedFiles (#23500)</title>
<updated>2023-06-14T10:40:11+00:00</updated>
<author>
<name>Jon Huhn</name>
<email>nojnhuh@users.noreply.github.com</email>
</author>
<published>2023-06-14T10:40:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=79a5b89d66db74560e751561542064674e980146'/>
<id>79a5b89d66db74560e751561542064674e980146</id>
<content type='text'>
Co-authored-by: Lewis Russell &lt;lewis6991@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Lewis Russell &lt;lewis6991@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): use LPeg for watchfiles matching (#23788)</title>
<updated>2023-06-05T05:19:31+00:00</updated>
<author>
<name>Jon Huhn</name>
<email>nojnhuh@users.noreply.github.com</email>
</author>
<published>2023-06-05T05:19:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=416fe8d185dcc072df7942953d867d9c605e9ffd'/>
<id>416fe8d185dcc072df7942953d867d9c605e9ffd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lsp): don't register didChangeWatchedFiles when capability not set (#23689)</title>
<updated>2023-05-20T05:45:39+00:00</updated>
<author>
<name>Jon Huhn</name>
<email>nojnhuh@users.noreply.github.com</email>
</author>
<published>2023-05-20T05:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=073035a030f5ef8ae9b9ca51552f887944c52eaa'/>
<id>073035a030f5ef8ae9b9ca51552f887944c52eaa</id>
<content type='text'>
Some LSP servers (tailwindcss, rome) are known to request registration
for `workspace/didChangeWatchedFiles` even when the corresponding client
capability does not advertise support. This change adds an extra check
in the `client/registerCapability` handler not to start a watch unless
the client capability is set appropriately.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some LSP servers (tailwindcss, rome) are known to request registration
for `workspace/didChangeWatchedFiles` even when the corresponding client
capability does not advertise support. This change adds an extra check
in the `client/registerCapability` handler not to start a watch unless
the client capability is set appropriately.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lsp): fix relative patterns for `workspace/didChangeWatchedFiles` (#23548)</title>
<updated>2023-05-09T16:12:54+00:00</updated>
<author>
<name>Jon Huhn</name>
<email>nojnhuh@users.noreply.github.com</email>
</author>
<published>2023-05-09T16:12:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=075a72d5ff9d49b1e93c0253b54931ecdcf673f3'/>
<id>075a72d5ff9d49b1e93c0253b54931ecdcf673f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lsp): don't monitor files if workspace_folders is nil (#22531)</title>
<updated>2023-03-05T07:42:15+00:00</updated>
<author>
<name>Mathias Fußenegger</name>
<email>mfussenegger@users.noreply.github.com</email>
</author>
<published>2023-03-05T07:42:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ed05d38d9fa643c7e562b754c6cfed8b9da5c4d8'/>
<id>ed05d38d9fa643c7e562b754c6cfed8b9da5c4d8</id>
<content type='text'>
Fixes:

    Error SERVER_REQUEST_HANDLER_ERROR: "...di/dev/neovim/neovim/runtime/lua/vim/lsp/_watchfiles.lua
    :200: bad argument #1 to 'ipairs' (table expected, got nil)"

Language servers can be started without root_dir or workspace_folders.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:

    Error SERVER_REQUEST_HANDLER_ERROR: "...di/dev/neovim/neovim/runtime/lua/vim/lsp/_watchfiles.lua
    :200: bad argument #1 to 'ipairs' (table expected, got nil)"

Language servers can be started without root_dir or workspace_folders.</pre>
</div>
</content>
</entry>
</feed>
