Commit Graph
18 Commits
Author SHA1 Message Date
Chinmay Dalal 427d62c434 feat(build.zig): update to zig 0.16 2026-04-21 11:18:43 +02:00
Chinmay Dalal 8df6e5ea92 docs(build.zig): document zig build 2026-01-14 13:16:38 -05:00
Chinmay Dalal 5ec0c1ca07 feat(build.zig): install parsers in install step
Problem: The install step does not install parsers
Solution: Make the install step depend on installing parsers
2026-01-14 13:16:38 -05:00
Chinmay Dalal 41bc3020c4 fix(build.zig): format build.zig to keep lines under 100 chars 2026-01-13 22:09:03 -05:00
Chinmay Dalal b618511ef9 fix(editorconfig): use 4 spaces indentation for zig files 2026-01-13 22:09:03 -05:00
Chinmay Dalal 6d9031390c feat(build.zig): add option to use system dependencies
Problem:
build.zig always downloads dependencies and statically links them,
which is frowned upon by distro packagers.

Solution:
Add option to use system libraries.
2026-01-13 22:09:03 -05:00
Chinmay Dalal 21fa19f3e8 fix(lsp): don't use hl_mode = combine for inlay hints #24276
Problem: `hl_mode` for inlay hints is `combine`, causing bugs like
inlay hints using highlights from the previous character
(#24152, #24068)

Solution: Don't use hl_mode=combine for inlay hints.
2023-07-08 00:14:52 -07:00
Chinmay Dalal 7968322e7a fix(lsp): inlay_hint nil reference error #24202
Problem:
vim_lsp_inlayhint: Error executing lua: .../lsp/_inlay_hint.lua:249: attempt to index field 'applied' (a nil value)

Solution:
Assign {} to bufstates.applied in on_reload

fixes #24172
2023-06-29 07:26:29 -07:00
Chinmay Dalal fa0a25dcb3 fix(lsp): error in reset_timer on second detach #24117
Problem:
On running `zig fmt` manually, the on_lines callback and the
server both detach (for some reason), and both of them call
`clear()`. This fixes it, otherwise the second one to detach
has an error in `reset_timer` since the bufstate doesn't exist

Solution:
* exit early in clear if `bufstates[bufnr]` is nil
* set bufstatte.enabled to true on reload instead of making bufstate nil
2023-06-23 16:33:15 -07:00
Chinmay Dalal 94a904b453 fix(lsp): reapplying already-applied hints #24114
Problem:
The decoration provider clears the whole buffer then redraws all the hints every
time the window was redrawn. This may lead to an infinite loop.

Solution:
Store the last applied version for a line and only clear and redraw the line if
the buffer version has changed.
2023-06-23 04:49:54 -07:00
Chinmay DalalandJustin M. Keyes 1b679ac192 fix(lsp): define LspInlayHint highlight group #24073
fixes #24068

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-06-21 00:33:56 -07:00
Chinmay Dalal d3e0352574 fix(lsp): check if inlay hints are enabled for a buffer before disabling (#24074)
disabling before enabling throws an error otherwise, because bufstate[bufnr]
doesn't exist
2023-06-20 18:36:31 +02:00
Chinmay Dalal 19eef8156b docs(lsp): LspInlayHint highlight group #24071 2023-06-20 03:20:17 -07:00
Chinmay Dalal 96b94f8d77 fix(lsp): duplicate on_detach, on_reload callbacks #24067
M.enable already clears bufstate[bufnr] and the namespace,
the duplicate callbacks cause an error (indexing bufstate[bufnr] fails)
2023-06-20 02:36:06 -07:00
Chinmay Dalal ca5de9306c feat(lsp): inlay hints #23984
Add automatic refresh and a public interface on top of #23736

 * add on_reload, on_detach handlers in `enable()` buf_attach, and
  LspDetach autocommand in case of manual detach
* unify `__buffers` and `hint_cache_by_buf`
* use callback bufnr in `on_lines` callback, bufstate: remove __index override
* move user-facing functions into vim.lsp.buf, unify enable/disable/toggle

Closes #18086
2023-06-19 23:06:54 -07:00
Chinmay Dalal 643546b82b feat(lsp): add handlers for inlay hints (#23736)
initial support; public API left for a follow-up PR
2023-06-11 11:53:37 +02:00
Chinmay Dalal 116a3f4683 fix(treesitter): create new parser if language is not the same as cached parser (#18149) 2022-04-22 16:15:28 +02:00
Chinmay Dalal e481901748 docs: treesitter.txt - fix overflowing lines, document minimum_language_version (#17286) 2022-02-13 14:43:25 +01:00