<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/lsp.lua, branch aucmd_textputpost</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(lsp)!: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512</title>
<updated>2023-11-12T12:54:27+00:00</updated>
<author>
<name>LW</name>
<email>git@llllvvuu.dev</email>
</author>
<published>2023-11-12T12:54:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=448907f65d6709fa234d8366053e33311a01bdb9'/>
<id>448907f65d6709fa234d8366053e33311a01bdb9</id>
<content type='text'>
refactor!: `vim.lsp.inlay_hint()` -&gt; `vim.lsp.inlay_hint.enable()`

Problem:
The LSP specification allows inlay hints to include tooltips, clickable
label parts, and code actions; but Neovim provides no API to query for
these.

Solution:
Add minimal viable extension point from which plugins can query for
inlay hints in a range, in order to build functionality on top of.

Possible Next Steps
---

- Add `virt_text_idx` field to `vim.fn.getmousepos()` return value, for
  usage in mappings of `&lt;LeftMouse&gt;`, `&lt;C-LeftMouse&gt;`, etc</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
refactor!: `vim.lsp.inlay_hint()` -&gt; `vim.lsp.inlay_hint.enable()`

Problem:
The LSP specification allows inlay hints to include tooltips, clickable
label parts, and code actions; but Neovim provides no API to query for
these.

Solution:
Add minimal viable extension point from which plugins can query for
inlay hints in a range, in order to build functionality on top of.

Possible Next Steps
---

- Add `virt_text_idx` field to `vim.fn.getmousepos()` return value, for
  usage in mappings of `&lt;LeftMouse&gt;`, `&lt;C-LeftMouse&gt;`, etc</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): move completion logic into _completion module</title>
<updated>2023-10-21T11:49:05+00:00</updated>
<author>
<name>Mathias Fussenegger</name>
<email>f.mathias@zignar.net</email>
</author>
<published>2023-10-21T07:47:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1e10310f4cc70cf95a68457c2be9e7459b5bbba6'/>
<id>1e10310f4cc70cf95a68457c2be9e7459b5bbba6</id>
<content type='text'>
To reduce cross-chatter between modules and for https://github.com/neovim/neovim/issues/25272
Also preparing for https://github.com/neovim/neovim/issues/25714
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To reduce cross-chatter between modules and for https://github.com/neovim/neovim/issues/25272
Also preparing for https://github.com/neovim/neovim/issues/25714
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lsp): display initialization errors (#25409)</title>
<updated>2023-10-11T20:38:58+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2023-10-11T20:38:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2fde6295df8cdfb36ed02ef5f9a3b6a523b1ac23'/>
<id>2fde6295df8cdfb36ed02ef5f9a3b6a523b1ac23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>feat(lsp): remove notify from vim.lsp.buf_detach_client (#25140)</title>
<updated>2023-09-14T06:40:53+00:00</updated>
<author>
<name>Mathias Fußenegger</name>
<email>mfussenegger@users.noreply.github.com</email>
</author>
<published>2023-09-14T06:40:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a49924a318520a3b5c2f210f22a8d450165e89b5'/>
<id>a49924a318520a3b5c2f210f22a8d450165e89b5</id>
<content type='text'>
Closes https://github.com/neovim/neovim/issues/19838</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/neovim/neovim/issues/19838</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): add type annotation for lsp.Client.server_capabilities (#24925)</title>
<updated>2023-08-31T08:14:20+00:00</updated>
<author>
<name>Jongwook Choi</name>
<email>wookayin@gmail.com</email>
</author>
<published>2023-08-31T08:14:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0e7e25af20cf98a19f4f50ee80774fce07cef12e'/>
<id>0e7e25af20cf98a19f4f50ee80774fce07cef12e</id>
<content type='text'>
The class `lsp.Client` has a public member `server_capabilities`,
which is assumed to be non-nil once initialized, as documented in
`:help vim.lsp.client`. Due to the possibility that it may be nil
before initialization, `lsp.Client` was not having a proper lua type
annotations on the field `server_capabilities`.

Instead of having a nil `server_capabilities` until initialized in
the RPC response callback, we can have an initial value of empty table.
This CHANGES the behavior of the `server_capabilities` field in a way
that it is no longer `nil` until initialization. Note that, as
already documented, `server_capabilities` should never be nil when
it is once initialized and thus ready to be used in user configs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The class `lsp.Client` has a public member `server_capabilities`,
which is assumed to be non-nil once initialized, as documented in
`:help vim.lsp.client`. Due to the possibility that it may be nil
before initialization, `lsp.Client` was not having a proper lua type
annotations on the field `server_capabilities`.

Instead of having a nil `server_capabilities` until initialized in
the RPC response callback, we can have an initial value of empty table.
This CHANGES the behavior of the `server_capabilities` field in a way
that it is no longer `nil` until initialization. Note that, as
already documented, `server_capabilities` should never be nil when
it is once initialized and thus ready to be used in user configs.</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>fix(lsp): extra "." when completing with tsserver #24646</title>
<updated>2023-08-11T12:20:05+00:00</updated>
<author>
<name>Raphael</name>
<email>glephunter@gmail.com</email>
</author>
<published>2023-08-11T12:20:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=72e64a1afef0df1bd244bfb31dfc8619d91ff709'/>
<id>72e64a1afef0df1bd244bfb31dfc8619d91ff709</id>
<content type='text'>
Problem:
With tsserver LSP, omni completion after "." inserts an extra "."

Solution:
Apply adjust_start_col() regardless of `filterText`.
adjust_start_col() is explained here:
https://github.com/neovim/neovim/blob/0ea8dfeb3dc347579753169d9e3588f6306ab703/runtime/lua/vim/lsp.lua#L2334-L2351

The `filterText` field is used in the following situations rather than as
a condition for obtaining column values:
1. Real-time filtering: When the user types characters in the editor, the
   language server can use the filterText field to filter the list of
   suggestions and only return suggestions that match the typed characters. This
   helps to provide more precise recommendations.
2. Fuzzy matching: The filterText field can be used to perform fuzzy matching,
   allowing matching in the middle or beginning of input characters, not limited
   to prefix matching. This can provide a more flexible code completion
   experience.

Inspecting usage of `filtertext` in vim-lsp and coc and lsp-mode:
- vim-lsp uses a `refresh_pattern` to judge filterText as completionitem word
  (although I think this is not the correct usage).
- coc uses it for filtering.

Fix #22803</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
With tsserver LSP, omni completion after "." inserts an extra "."

Solution:
Apply adjust_start_col() regardless of `filterText`.
adjust_start_col() is explained here:
https://github.com/neovim/neovim/blob/0ea8dfeb3dc347579753169d9e3588f6306ab703/runtime/lua/vim/lsp.lua#L2334-L2351

The `filterText` field is used in the following situations rather than as
a condition for obtaining column values:
1. Real-time filtering: When the user types characters in the editor, the
   language server can use the filterText field to filter the list of
   suggestions and only return suggestions that match the typed characters. This
   helps to provide more precise recommendations.
2. Fuzzy matching: The filterText field can be used to perform fuzzy matching,
   allowing matching in the middle or beginning of input characters, not limited
   to prefix matching. This can provide a more flexible code completion
   experience.

Inspecting usage of `filtertext` in vim-lsp and coc and lsp-mode:
- vim-lsp uses a `refresh_pattern` to judge filterText as completionitem word
  (although I think this is not the correct usage).
- coc uses it for filtering.

Fix #22803</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>refactor(lsp): use protocol.Methods instead of strings #24570</title>
<updated>2023-08-05T09:03:57+00:00</updated>
<author>
<name>Raphael</name>
<email>glephunter@gmail.com</email>
</author>
<published>2023-08-05T09:03:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=42630923fc00633d806af97c1792b2ed4a71e1cc'/>
<id>42630923fc00633d806af97c1792b2ed4a71e1cc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
