<feed xmlns='http://www.w3.org/2005/Atom'>
<title>neovim/runtime/lua/vim/lsp/buf.lua, branch master</title>
<subtitle>Vim-fork focused on extensibility and usability</subtitle>
<id>http://git.waynecole.info/neovim/atom?h=master</id>
<link rel='self' href='http://git.waynecole.info/neovim/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/'/>
<updated>2026-04-23T10:46:59Z</updated>
<entry>
<title>fix(lsp): filter code_action diagnostics to the cursor #38988</title>
<updated>2026-04-23T10:46:59Z</updated>
<author>
<name>Barrett Ruth</name>
<email>62671086+barrettruth@users.noreply.github.com</email>
</author>
<published>2026-04-23T10:46:59Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=ecb8402197f1883feec1c7a9f9d02a39912ae04a'/>
<id>urn:sha1:ecb8402197f1883feec1c7a9f9d02a39912ae04a</id>
<content type='text'>
Problem:
Cursor-position `vim.lsp.buf.code_action()` requests include all diagnostics on the current line, so unrelated same-line diagnostics affect the returned actions.

Solution:
Filter same-line diagnostics to the cursor position for cursor-position requests.</content>
</entry>
<entry>
<title>docs(lsp): description for `on_list` example #39230</title>
<updated>2026-04-19T22:30:45Z</updated>
<author>
<name>Maria Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2026-04-19T22:30:45Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=e8b39687749770e915135736a75d2de3536568e0'/>
<id>urn:sha1:e8b39687749770e915135736a75d2de3536568e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor(lsp): provide a default list handler example #39005</title>
<updated>2026-04-16T19:15:04Z</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-04-16T19:15:04Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=a61a0bf407a83690ffaa0fd6098cbd4390323f0b'/>
<id>urn:sha1:a61a0bf407a83690ffaa0fd6098cbd4390323f0b</id>
<content type='text'>
Problem:
Difficult for us to provide default handlers for functions like
`vim.lsp.buf.definition`. When users wanted to fine-tune the default behavior,
they don't know how.

Solution:
- Document an example providing `on_list` boilerplate to make it easier for
  users to modify and override.
- Also, considering that the parameters of the previous
  `on_list`(`vim.lsp.ListOpts.OnList`) are compatible with the parameters of
  `setqflist`, remove that custom type in favor of passing
  `vim.fn.setqflist.what`.</content>
</entry>
<entry>
<title>fix(lsp): check stale context in hover/signature callback #38724</title>
<updated>2026-04-11T14:32:56Z</updated>
<author>
<name>glepnir</name>
<email>glephunter@gmail.com</email>
</author>
<published>2026-04-11T14:32:56Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=af9a72d8c105129bb107ee0bc9a38ade44caf7b6'/>
<id>urn:sha1:af9a72d8c105129bb107ee0bc9a38ade44caf7b6</id>
<content type='text'>
Problem: hover/signature callback lacked consistency checks, so slow LSP servers
could open a float after the cursor had already moved away.

Solution: guard the callback with buf validity, buf version, and cursor
position checks before opening the float. Also fix table capacity calculation.</content>
</entry>
<entry>
<title>refactor(lsp): share code by `get_locations` #38902</title>
<updated>2026-04-09T17:46:50Z</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-04-09T17:46:50Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=f9e068117be9c6ca05d3e42530895449cbdc2a17'/>
<id>urn:sha1:f9e068117be9c6ca05d3e42530895449cbdc2a17</id>
<content type='text'>
Problem:
`vim.lsp.buf.definition`/`vim.lsp.buf.declaration` use the same underlying code
via `get_locations`, whereas `vim.lsp.buf.reference` does not. This is because
`buf.reference` does not perform a jump when there is only one item.

Solution:
In #38510, I simplified the jump logic using `:cfirst`, so they can now share
code more easily. Additionally, this PR enables `buf.definition` to display the
corresponding qflist name.</content>
</entry>
<entry>
<title>fix(diagnostics)!: restore `is_pull` namespace argument #38698</title>
<updated>2026-04-08T20:11:01Z</updated>
<author>
<name>Maria Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2026-04-08T20:11:01Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=665ebce56924fbbdc4a13327a360a46791ae4c54'/>
<id>urn:sha1:665ebce56924fbbdc4a13327a360a46791ae4c54</id>
<content type='text'>
Problem:
The current LSP diagnostic implementation can't differ between a pull
diagnostic with no identifier and a set of diagnostics provided via push
diagnostics.

"Anonymous pull providers" are expected by the protocol https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticOptions
, depending on how the capability was registered:
- Dynamic registrations have an identifier.
- Static registrations will not.

Solution:
Restore the `is_pull` argument removed in
https://github.com/neovim/neovim/pull/37938, keeping the identifier of
pull diagnostic collections.</content>
</entry>
<entry>
<title>refactor(lsp): remove implicit rpc error tostring #38707</title>
<updated>2026-04-02T12:53:29Z</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-04-02T12:53:29Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=0eb2eb4106a303f5d99a3e108ebd10654d627cde'/>
<id>urn:sha1:0eb2eb4106a303f5d99a3e108ebd10654d627cde</id>
<content type='text'>
Problem:
LSP error responses implicitly rely on a custom `__tostring` function
(`vim.lsp.rpc.format_rpc_error`) for formatting. This causes errors that are not
created via `vim.lsp.rpc.error` to behave inconsistently with those that are.

Furthermore, we usually use `log.error` to print these errors, which uses
`vim.inspect` under the hood, so the custom `__tostring`  provides little
benefit.

This increases the difficulty of refactoring the code, as it tightly couples RPC
error handling with the LSP.

Solution:
Convert every potential `__tostring` call to an explicit one. Since we don't
describe this behavior in the documentation, this should not be a breaking
change.</content>
</entry>
<entry>
<title>feat(lsp): respect 'switchbuf' for jump commands, drop `reuse_win` #38510</title>
<updated>2026-03-30T14:54:55Z</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-03-30T14:54:55Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=57797ed7d465afabf522df2f53e78e570b9e2833'/>
<id>urn:sha1:57797ed7d465afabf522df2f53e78e570b9e2833</id>
<content type='text'>
Problem:
LSP jump operations such as `buf.definition`/`buf.type_definition` do
not follow the 'switchbuf' option. Instead their behavior is controlled
by `vim.lsp.LocationOpts.reuse_win`. When `reuse_win=true`, the effect
is very similar to `set switchbuf=useopen`.

Note that functions like `buf.definition` open the quickfix
window when there are multiple results, and jumping between quickfix
entries already follows 'switchbuf', so unifying the behavior is more
intuitive.

Solution:
Follow the 'switchbuf' option and drop `reuse_win`.

We can achieve this behavior by using :cfirst when the quickfix list has
only one item, rather than customizing the jump logic as before.</content>
</entry>
<entry>
<title>fix(lsp): get_namespace signature (#38449)</title>
<updated>2026-03-23T22:42:47Z</updated>
<author>
<name>Tristan Knight</name>
<email>admin@snappeh.com</email>
</author>
<published>2026-03-23T22:42:47Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=7c3df3e2ea1390731e5fac5411e3ad7e1de4a3d0'/>
<id>urn:sha1:7c3df3e2ea1390731e5fac5411e3ad7e1de4a3d0</id>
<content type='text'>
Problem: Since the change to `pull_id` in #37938 we used the
deprecated signature internally

Solution: Don't</content>
</entry>
<entry>
<title>feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360</title>
<updated>2026-03-21T16:00:06Z</updated>
<author>
<name>skewb1k</name>
<email>skewb1kunix@gmail.com</email>
</author>
<published>2026-03-21T16:00:06Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/neovim/commit/?id=4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b'/>
<id>urn:sha1:4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b</id>
<content type='text'>
The `buffer` option remains functional but is now undocumented.
Providing both will raise an error. Since providing `buf` was disallowed
before, there is no code that will break due to using `buffer` alongside
`buf`.</content>
</entry>
</feed>
