<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/lsp/diagnostic.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>fix(lsp): log unknown diagnostic tags instead of showing a warning (#25705)</title>
<updated>2023-10-21T06:47:14+00:00</updated>
<author>
<name>Jorge Mederos</name>
<email>46798594+jmederosalvarado@users.noreply.github.com</email>
</author>
<published>2023-10-21T06:47:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=330444994616e48e5e4d15bbf72d7c5346943565'/>
<id>330444994616e48e5e4d15bbf72d7c5346943565</id>
<content type='text'>
To be more in line with the specification:

&gt; To support the evolution of enumerations the using side of an enumeration shouldn’t fail on an enumeration value it doesn’t know. It should simply ignore it as a value it can use and try to do its best to preserve the value on round trips</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To be more in line with the specification:

&gt; To support the evolution of enumerations the using side of an enumeration shouldn’t fail on an enumeration value it doesn’t know. It should simply ignore it as a value it can use and try to do its best to preserve the value on round trips</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): make is_pull in lsp.diagnostic.get_namespace optional (#25156)</title>
<updated>2023-10-14T07:47:20+00:00</updated>
<author>
<name>Mathias Fußenegger</name>
<email>mfussenegger@users.noreply.github.com</email>
</author>
<published>2023-10-14T07:47:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=712adacdf546fbaccd9f2134534889a3f6f36dbc'/>
<id>712adacdf546fbaccd9f2134534889a3f6f36dbc</id>
<content type='text'>
Follw up to https://github.com/neovim/neovim/commit/63b3408551561127f7845470eb51404bcd6f547b

`is_pull` should be optional, otherwise it is an API change that
introduces warnings in consumers.

Also fixes the type annotation of `_client_pull_namespaces` where the
key is a string.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follw up to https://github.com/neovim/neovim/commit/63b3408551561127f7845470eb51404bcd6f547b

`is_pull` should be optional, otherwise it is an API change that
introduces warnings in consumers.

Also fixes the type annotation of `_client_pull_namespaces` where the
key is a string.</pre>
</div>
</content>
</entry>
<entry>
<title>docs: replace &lt;pre&gt; with ``` (#25136)</title>
<updated>2023-09-14T13:23:01+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2023-09-14T13:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2e92065686f62851318150a315591c30b8306a4b'/>
<id>2e92065686f62851318150a315591c30b8306a4b</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): only disable inlay hints / diagnostics if no other clients are connected (#24535)</title>
<updated>2023-08-31T08:00:24+00:00</updated>
<author>
<name>Chris AtLee</name>
<email>chris.atlee@shopify.com</email>
</author>
<published>2023-08-31T08:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c235959fd909d75248c066a781475e207606c5aa'/>
<id>c235959fd909d75248c066a781475e207606c5aa</id>
<content type='text'>
This fixes the issue where the LspNotify handlers for inlay_hint /
diagnostics would end up refreshing all attached clients.

The handler would call util._refresh, which called
vim.lsp.buf_request, which calls the method on all attached clients.

Now util._refresh takes an optional client_id parameter, which is used
to specify a specific client to update.

This commit also fixes util._refresh's handling of the `only_visible`
flag. Previously if `only_visible` was false, two requests would be made
to the server: one for the visible region, and one for the entire file.

Co-authored-by: Stanislav Asunkin &lt;1353637+stasjok@users.noreply.github.com&gt;
Co-authored-by: Mathias Fußenegger &lt;mfussenegger@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the issue where the LspNotify handlers for inlay_hint /
diagnostics would end up refreshing all attached clients.

The handler would call util._refresh, which called
vim.lsp.buf_request, which calls the method on all attached clients.

Now util._refresh takes an optional client_id parameter, which is used
to specify a specific client to update.

This commit also fixes util._refresh's handling of the `only_visible`
flag. Previously if `only_visible` was false, two requests would be made
to the server: one for the visible region, and one for the entire file.

Co-authored-by: Stanislav Asunkin &lt;1353637+stasjok@users.noreply.github.com&gt;
Co-authored-by: Mathias Fußenegger &lt;mfussenegger@users.noreply.github.com&gt;</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>fix(lsp): inlay hints: "Failed to delete autocmd" when closing buffer #24469</title>
<updated>2023-08-01T12:13:52+00:00</updated>
<author>
<name>Chris AtLee</name>
<email>chris@atlee.ca</email>
</author>
<published>2023-08-01T12:13:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e55e80d51ca5d85770981bffb9254badc3662e0c'/>
<id>e55e80d51ca5d85770981bffb9254badc3662e0c</id>
<content type='text'>
Problem:
"Failed to delete autocmd" error when deleting LspNotify autocmd. #24456

Solution:
Change a few things in the inlay_hint and diagnostic LSP code:
1. Re-introduce the `enabled` flag for the buffer state tables. Previously I was
   relying on the presence of an autocmd id in the state table to track whether
   inlay_hint / diagnostic was enabled for a buffer. There are two reasons why
   this doesn't work well:
  - Each time inlay_hint / diagnostic is enabled, we call `nvim_buf_attach` on
    the buffer, resulting in multiple `on_reload` or `on_detach` callbacks being
    registered.
  - Commands like `bwipeout` delete buffer local autocmds, sometimes before our
    `on_detach` callbacks have a chance to delete them first. This causes the
  - Use module local enabled state for diagnostic as well. bwipeout can race
    with on_detach callbacks for deleting autocmds. Error referenced in #24456.
2. Change the `LspDetach` autocmd to run each time (i.e., remove the `once`
   flag). Since we're only registering autocmds once per buffer now, we
   need to make sure that we set the enabled flag properly each time the LSP
   client detaches from the buffer.
  - Remove `once` from the LspDetach autocmds for inlay_hint and diagnostic.
    We only set up the autocmd once now. Gets removed when buffer is deleted.
3. Have the `LspNotify` handler also refresh the inlay_hint / diagnostics when
   receiving the `textDocument/didOpen` event. Before this point, the LSP
   backend doesn't have the contents of the buffer, so can't provide inlay hints
   or diagnostics.

Downsides of this approach:
* When inlay_hint / diagnostics are disabled on a buffer, it will continue to
  receive `LspNotify` events for that buffer. The callback exits early since the
  `enabled` flag is false.

Alternatives:
* Can we wrap the call to `nvim_del_autocmd` in `pcall` to swallow any errors
  resulting from trying to delete the autocmd?

Fixes #24456

Helped-by: Maria José Solano &lt;majosolano99@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
"Failed to delete autocmd" error when deleting LspNotify autocmd. #24456

Solution:
Change a few things in the inlay_hint and diagnostic LSP code:
1. Re-introduce the `enabled` flag for the buffer state tables. Previously I was
   relying on the presence of an autocmd id in the state table to track whether
   inlay_hint / diagnostic was enabled for a buffer. There are two reasons why
   this doesn't work well:
  - Each time inlay_hint / diagnostic is enabled, we call `nvim_buf_attach` on
    the buffer, resulting in multiple `on_reload` or `on_detach` callbacks being
    registered.
  - Commands like `bwipeout` delete buffer local autocmds, sometimes before our
    `on_detach` callbacks have a chance to delete them first. This causes the
  - Use module local enabled state for diagnostic as well. bwipeout can race
    with on_detach callbacks for deleting autocmds. Error referenced in #24456.
2. Change the `LspDetach` autocmd to run each time (i.e., remove the `once`
   flag). Since we're only registering autocmds once per buffer now, we
   need to make sure that we set the enabled flag properly each time the LSP
   client detaches from the buffer.
  - Remove `once` from the LspDetach autocmds for inlay_hint and diagnostic.
    We only set up the autocmd once now. Gets removed when buffer is deleted.
3. Have the `LspNotify` handler also refresh the inlay_hint / diagnostics when
   receiving the `textDocument/didOpen` event. Before this point, the LSP
   backend doesn't have the contents of the buffer, so can't provide inlay hints
   or diagnostics.

Downsides of this approach:
* When inlay_hint / diagnostics are disabled on a buffer, it will continue to
  receive `LspNotify` events for that buffer. The callback exits early since the
  `enabled` flag is false.

Alternatives:
* Can we wrap the call to `nvim_del_autocmd` in `pcall` to swallow any errors
  resulting from trying to delete the autocmd?

Fixes #24456

Helped-by: Maria José Solano &lt;majosolano99@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lsp): implement textDocument/diagnostic (#24128)</title>
<updated>2023-07-20T07:03:48+00:00</updated>
<author>
<name>Chris AtLee</name>
<email>chris@atlee.ca</email>
</author>
<published>2023-07-20T07:03:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=63b3408551561127f7845470eb51404bcd6f547b'/>
<id>63b3408551561127f7845470eb51404bcd6f547b</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>fix(diagnostic): use correct field name for tags (#22835)</title>
<updated>2023-03-31T10:23:19+00:00</updated>
<author>
<name>Akin</name>
<email>22454918+akinsho@users.noreply.github.com</email>
</author>
<published>2023-03-31T10:23:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ed10e4ef60c63d924b9969abdf77adaad506b676'/>
<id>ed10e4ef60c63d924b9969abdf77adaad506b676</id>
<content type='text'>
LSP tags are added to the diagnostic as "tags" but referred to as "_tags"
in the diagnostic underline handler</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LSP tags are added to the diagnostic as "tags" but referred to as "_tags"
in the diagnostic underline handler</pre>
</div>
</content>
</entry>
<entry>
<title>feat(diagnostic): add support for tags</title>
<updated>2023-03-30T13:49:58+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-03-30T13:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=226a6c3eaef2a7220841d3d5e69e1baf543b3d6f'/>
<id>226a6c3eaef2a7220841d3d5e69e1baf543b3d6f</id>
<content type='text'>
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LSP spec supports two tags that can be added to diagnostics:
unnecessary and deprecated. Extend vim.diagnostic to be able to handle
these.
</pre>
</div>
</content>
</entry>
</feed>
