diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2025-06-02 13:44:00 +0100 |
|---|---|---|
| committer | Lewis Russell <me@lewisr.dev> | 2025-06-03 20:25:07 +0100 |
| commit | 533cc0ab354dbe3a0e5a3c8261f80a821a01fbea (patch) | |
| tree | 5bab5d2396998f664c622ed95ce569d986cbb649 /runtime/lua/vim/_editor.lua | |
| parent | 9641ad9369f66c9e30114a57914672eb2ca96d51 (diff) | |
| download | rneovim-533cc0ab354dbe3a0e5a3c8261f80a821a01fbea.tar.gz rneovim-533cc0ab354dbe3a0e5a3c8261f80a821a01fbea.tar.bz2 rneovim-533cc0ab354dbe3a0e5a3c8261f80a821a01fbea.zip | |
fix(vim.diagnostic): improve typing
Problem:
`vim.diagnostic.set()` doesn't actually accept a list of
`vim.Diagnostic` as internally `vim.diagnostic.set()` normalizes the
diagnostics and this normalization is assumed throughout the module.
Solution:
- Add a new type `vim.Diagnostic.Set` which is the input to `vim.diagnostic.set()`
- `col` is now an optional field and defaults to `0` to be consistent
with `vim.diagnostic.match()`.
- Change `table.insert(t, x)` to `table[#table + 1] = x` for improved
type checking.
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
0 files changed, 0 insertions, 0 deletions