diff options
author | Jongwook Choi <wookayin@gmail.com> | 2023-08-31 04:14:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-31 10:14:20 +0200 |
commit | 0e7e25af20cf98a19f4f50ee80774fce07cef12e (patch) | |
tree | ac5e3ee8ef76bfd1672b8692332a307ca32d530b /src/nvim/lua/stdlib.c | |
parent | c235959fd909d75248c066a781475e207606c5aa (diff) | |
download | rneovim-0e7e25af20cf98a19f4f50ee80774fce07cef12e.tar.gz rneovim-0e7e25af20cf98a19f4f50ee80774fce07cef12e.tar.bz2 rneovim-0e7e25af20cf98a19f4f50ee80774fce07cef12e.zip |
refactor(lsp): add type annotation for lsp.Client.server_capabilities (#24925)
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.
Diffstat (limited to 'src/nvim/lua/stdlib.c')
0 files changed, 0 insertions, 0 deletions