aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/client.lua
Commit message (Collapse)AuthorAge
* refactor(lsp): simplify client trackingLewis Russell2024-03-25
| | | | | | | | | | | - Remove: - uninitialized_clients - active_clients - all_buffer_active_clients - Add: - all_clients - Use `lsp.get_clients()` to get buffer clients.
* fix(test): typingLewis Russell2024-03-25
|
* Revert "refactor(lsp): simplify client tracking"Lewis Russell2024-03-25
| | | | This reverts commit 3f238b39cfdf27657b2d9452c6ffd28f8209c95f.
* refactor(lsp): simplify client trackingLewis Russell2024-03-25
| | | | | | | | | | | - Remove: - uninitialized_clients - active_clients - all_buffer_active_clients - Add: - all_clients - Use `lsp.get_clients()` to get buffer clients.
* fix(lsp): handle stale bufnr on LspRequest autocmd trigger (#27981)Jaehwang Jung2024-03-22
| | | continuation of https://github.com/neovim/neovim/pull/24013
* docs: small fixes (#27364)dundargoc2024-03-12
| | | | | | | | Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com> Co-authored-by: Ynda Jas <yndajas@gmail.com> Co-authored-by: Owen Hines <TheOdd@users.noreply.github.com> Co-authored-by: Wanten <41904684+WantenMN@users.noreply.github.com> Co-authored-by: lukasvrenner <118417051+lukasvrenner@users.noreply.github.com> Co-authored-by: cuinix <915115094@qq.com>
* docs: support inline markdownLewis Russell2024-03-09
| | | | | | - Tags are now created with `[tag]()` - References are now created with `[tag]` - Code spans are no longer wrapped
* docs(lsp): nits and typos in client.luaMaria José Solano2024-03-06
|
* docs(lua): improvements for LSP and DiagnosticLewis Russell2024-03-05
|
* fix(lsp): defer writing error msgs (#27688)Jaehwang Jung2024-03-02
| | | | | | | | | | | | | Context: Nvim catches errors from the user's `on_exit` and rpc handler callbacks and prints the error message. Problem: Printing the error message uses Nvim api functions. But callbacks mentioned above run in `:h lua-loop-callbacks` where most of `vim.api` is not allowed, so Nvim itself raises error. Solution: `vim.schedule()` the error reporting when necessary.
* Merge pull request #27347 from lewis6991/fswatchLewis Russell2024-03-01
|\ | | | | feat(lsp): add fswatch watchfunc backend
| * fix(lsp): cancel watchers when closing a clientLewis Russell2024-03-01
| |
* | docs: improve/add documentation of Lua typesLewis Russell2024-03-01
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
* docs(lsp): mark `ClientConfig.init_options` as optionalChristian Clason2024-02-24
| | | | Followup to neovim/neovim#27443
* refactor(lsp): resolve the config-client entanglementLewis Russell2024-02-13
| | | | | | | | | | | | | | | | | | | | | Previously the LSP-Client object contained some fields that are also in the client config, but for a lot of other fields, the config was used directly making the two objects vaguely entangled with either not having a clear role. Now the config object is treated purely as config (read-only) from the client, and any fields the client needs from the config are now copied in as additional fields. This means: - the config object is no longet normalised and is left as the user provided it. - the client only reads the config on creation of the client and all other implementations now read the clients version of the fields. In addition, internal support for multiple callbacks has been added to the client so the client tracking logic (done in lua.lsp) can be done more robustly instead of wrapping the user callbacks which may error.
* fix(lsp): re-add client.commands and mark privateLewis Russell2024-02-12
|
* refactor(lsp): move more code to client.luaLewis Russell2024-02-11
| | | | | | | | | | | | The dispatchers used by the RPC client should be defined in the client, so they have been moved there. Due to this, it also made sense to move all code related to client configuration and the creation of the RPC client there too. Now vim.lsp.start_client is significantly simplified and now mostly contains logic for tracking open clients. - Renamed client.new -> client.start
* refactor(lsp): add type annotationsMaria José Solano2024-02-10
|
* refactor(lsp): tidy up loggingLewis Russell2024-02-08
|
* fix(lsp): set fallback client name properlyzeertzjq2024-02-08
|
* refactor(lsp): move client code to a regular Lua classLewis Russell2024-02-07
Problem: The LSP client code is implemented as a complicated closure-class (class defined in a single function). Solution: Move LSP client code to a more conventional Lua class and move to a separate file.