aboutsummaryrefslogtreecommitdiff
path: root/util.lua
Commit message (Collapse)AuthorAgeFilesLines
* implement backward compatible style handlingFlorian Fischer2026-07-151-0/+11
| | | | Remove diagnostic_style_id and use vis.ui:style_push to obtain one.
* use the correct names of the position conversion functionsFlorian Fischer2026-05-301-4/+4
|
* support vis' new option get-callbackFlorian Fischer2026-05-141-2/+44
|
* append numbered members when mergingFlorian Fischer2025-11-301-14/+9
| | | | | Overriding numbered members is not intuitive. Merging {1} and {2} should return {1,2} not {2}.
* add table helper utility functionsFlorian Fischer2025-11-301-0/+56
|
* add special case for the gopls empty file rangeFlorian Fischer2025-07-021-3/+7
|
* fix conversion of last byte selectionsFlorian Fischer2025-07-021-0/+8
| | | | | | | | If a language server sends a selection including the last byte, the line number will be one greater than the actual number of lines. Those selections are not converted by our algorithm iterating all lines. Add a special case to still convert them. Fixes: f5c2043
* fix the line number detection with tabsFlorian Fischer2025-06-081-0/+25
| | | | | If a line includes tabs add the visually added space for each tab stop to the line length in order to detect a wrapped line.
* Merge branch 'sel_to_pos_v2' into 'main'Florian Fischer2025-05-151-0/+73
|\ | | | | | | | | | | | | Change vis_sel_to_pos to vis internals or to count lines itself Closes #38 See merge request muhq/vis-lspc!58
| * calculate the positions for multiple selections at onceFlorian Fischer2025-02-141-8/+35
| |
| * move file location converters functions into util moduleFlorian Fischer2025-02-141-0/+46
| | | | | | | | Use the the internal vis logic as fast path if available.
* | fix vis:pipe buffer support detectionFlorian Fischer2025-04-101-1/+1
|/ | | | | | Check a vis:pipe function call like we would call it in vis_pipe. Omitting the fullscreen parameter causes the pcall to succeed, although vis does not support using a string as data source.
* Fix find_upwardsMichiel van den Heuvel2025-02-021-2/+3
| | | | | | | | | | | - Use `util.vis_pipe` instead of `vis:pipe` as this does not work on the current release of vis. - Quote the path to the find-upwards script. It resides in `~/Library/Application Support` on my macOS setup, and while not very common, paths in other users' configurations might have the same issue. - At least during testing, `out` was nil in some cases. `find_upwards` checks it now.
* handle special cases in util.dirnamedetect-rootFlorian Fischer2025-01-111-1/+21
|
* make universal root detection opt-inFlorian Fischer2025-01-111-0/+7
|
* extract the upwards find code into the util moduleFlorian Fischer2025-01-091-0/+17
|
* fix used quotes and remove old code in commentsFlorian Fischer2024-09-151-1/+1
|
* move helper code into the util moduleFlorian Fischer2024-09-151-0/+164