summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/shared.lua
diff options
context:
space:
mode:
authorskewb1k <skewb1kunix@gmail.com>2025-08-03 17:42:44 +0300
committerGitHub <noreply@github.com>2025-08-03 07:42:44 -0700
commit40aef0d02e1a3f528e79ece3fe42b24f8d556251 (patch)
treece25c815b7f443eb58529fa6964032967a672eaf /runtime/lua/vim/shared.lua
parent2ef48fc65ccf9fe55426ef7e3efa115a210abed5 (diff)
fix(lsp): decode 'null' in server responses as vim.NIL #34849
Problem: Previously, 'null' value in LSP responses were decoded as 'nil'. This caused ambiguity for fields typed as '? | null' and led to loss of explicit 'null' values, particularly in 'data' parameters. Solution: Decode all JSON 'null' values as 'vim.NIL' and adjust handling where needed. This better aligns with the LSP specification, where 'null' and absent fields are distinct, and 'null' should not be used to represent missing values. This also enables proper validation of response messages to ensure that exactly one of 'result' or 'error' is present, as required by the JSON-RPC specification.
Diffstat (limited to 'runtime/lua/vim/shared.lua')
0 files changed, 0 insertions, 0 deletions