* Fix jump regression in LSP references action handler
This change restores the possibility to exclude the current line when
invoking the lsp_references picker.
- opts.include_current_line is by default unset, so the previous
equality check would fail unless the option was set explicitly.
- vim.api.nvim_win_get_cursor() returns both line and column, so it
can't be directly compared with the returned line number.
- The actual comparison was expecting quickfix-like items, when in
actuality, we were dealing with raw LSP location objects.
* lsp: Pass offset_encoding to action_handlers
* LSP: Action handlers take both locations and items
* LSP: Rename (flattened_)results → locations
* LSP: Early return in list_or_jump
Remove backslash escaping in oldfiles picker, which was needed
before the code was changed to use substring comparison instead of
regex matching. (Commit b3ff5f33)
Previous implementation of placing the cursor on the first column of the
highlight failed to take into account that the highlighter can return
more than one data structure.
* feat(builtin.current_buffer_fuzzy_find): jump to first matched char
* use highlighter to detect column to jump to
* replace default select
* handle non 0 based column index
* handle no highlight scenario
---------
Co-authored-by: James Trew <j.trew10@gmail.com>
This implements a experimental interface for allowing prompts like this `file.txt:3:4`. It is already enabled on default for `find_files` and `git_files`.
Be wary of breaking changes for the interface if you plan to manually enable it.
Previously, using `string.find`, certain characters were taken as regex
special characters leading to bad matches.
New approach takes bufname truncated to the length of cwd and compares
the two strings.
closes#2843
Previously, bad partial matches between cwd and target buffer path would
result in non-cwd buffers showing up in the picker despite using
`only_cwd=true`.
eg.
cwd = `/foo/bar`
target buffer = `foo/bar1/baz.txt`
The target buffer starts with the cwd path.
This is fixed by appending a path separator before comparing/matching:
eg.
cwd = `/foo/bar/`
target buffer = `foo/bar1/baz.txt`
Previously, `git_status` with a prompt that has zero matches closes the
picker.
Only automatically close the picker if working tree is completely clean.
If working tree is not clean, and a prompt is given but no matches are
found, keep the picker open. This behavior is consistent with other
pickers where lack of matches doesn't result in the picker closing.
closes#2815
* feat(lsp_definitions): adding `tab drop` as `jump_type`
* feat(lsp-jump-types): `tab drop` for LSP features
Now, you're able to use `tab drop` as `jump_type` for these LSP
features: references, type definitions, definitions an implementations.
* fix(docs): reordering `tab drop` option
* feat: generate docs
* fix: nil problem with `vim.uri_to_fname`
* fix: removing warning about `file_uri` variable not being used
---------
Co-authored-by: Simon Hauser <simon.hauser@helsinki-systems.de>
The only possibility for having a table with different severities to
pass to `vim.diagnostics.get()` as opts is when setting a range (limit
and bound), so just check for an empty table when a range is set.
* fix: use nil for the default diagnostics severity
https://github.com/neovim/neovim/pull/24736 has introduced a new syntax
for severity format in `vim.diagnostic.get()`.
Fix#2661
* fix: fallback for 0.9.1
* fix: detect changes only when minor version > 9