nvim-context

Get the current Neovim context as JSON (cursor position, current file, visual selection and diagnostics) to help answer questions about code at the current cursor position, visual selections and diagn