Commit Graph

88 Commits

Author SHA1 Message Date
James Trew
1e59188575 fix(utils.path_expand): improve windows support (#2999)
In order to maintain plenary compatibility (for now, and slightly for
other edgecase reasons), avoid converting backslashes to forward
slashes.
2024-03-23 03:56:56 +00:00
James Trew
3b8399c273 fix: expand/normalize paths more selectively (#2628) 2024-03-19 22:55:27 +00:00
James Trew
d8129bf9f0 fix(pickers): when no lnum given, don't set entry.lnum (#2865)
Fixes couple of regressions from #2791 when no line number info is given
in the prompt (eg. `file.txt` rather than `file.txt:10`).

Both issues stemming from the fact that when no line number info is
given, the `entry.lnum` was set to `0`. `entry.lnum` is 1-index.
- Sending results to quickfix would send faulty results (closes #2864)
- Will no open the file on the correct (previous) line number

For this, setting the lnum to 1 is still undesirable since this
overwrites the lnum priority handling in the `select` action.
2024-01-12 03:35:52 +00:00
Dmitriy Kovalenko
0bf09d05ab feat: Support Line Column in file pickers (#2791)
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.
2024-01-09 09:35:26 +01:00
Munif Tanjim
84d53dfdbe feat(pickers): fully customizable layout (#2572) 2023-09-27 08:34:22 +02:00
Sofronie Cristian
74be3c3bba fix(builtin.pickers): fix wrong picker resuming when using filtering (#2682)
When filtering is applied, `picker:get_index(picker:get_selection_row())` returns index relative to the filtered entry list rather than the original full results. This causes inaccurate indexing into the `cache_pickers` table.
2023-09-03 20:42:09 +00:00
James Trew
83133f66c8 fix(utils): is_uri empty path (#2671) 2023-08-29 10:36:56 -04:00
James Trew
1dfa66b845 perf(utils): linear scan is_uri (#2648) 2023-08-28 04:26:09 +00:00
Alejandro Maturrano
bc2330bc9c fix: handle windows file paths as uris (#2640)
* fix: handle windows file paths as uris

* nit: rename FILE_PATH_PATTERN to WINDOWS_ROOT_PATTERN
2023-08-10 00:30:14 +00:00
James Trew
7bb2fcecdc Revert "expand paths more smartly (#2599)" (#2615)
This reverts commit f52ea4061d.
2023-07-21 21:50:44 -04:00
James Trew
f52ea4061d expand paths more smartly (#2599) 2023-07-21 22:12:29 +00:00
TJ DeVries
47c755d737 fix: handle non-file uris for lsp (#2604) 2023-07-17 13:20:09 -04:00
James Trew
2ea8dcd17b feat(git): support detached working trees (#2597)
* feat(git): support detached working trees

closes #2595

* [docgen] Update doc/telescope.txt
skip-checks: true

* fix: use_file_path

---------

Co-authored-by: Github Actions <actions@github>
2023-07-14 17:12:03 +00:00
Christian Clason
d8c5ed4e40 feat(ts)!: use upstream treesitter implementation (#2499)
bumps minimum required neovim version to 0.9, see `help telescope.changelog-2499`
2023-05-24 10:43:04 +02:00
James Trew
c20d4fb592 fix: icon hl width for various pickers (#2450) 2023-04-09 10:04:20 +02:00
Maksym Klishevych
942fe5faef feat(treesitter): symbols & ignore symbols options (#2338)
* feat(treesitter): symbols & ignore symbols options

* renamed the function passed to utils.filter_symbols

---------

Co-authored-by: Maksym Klishevych <max@klishevy.ch>
2023-03-22 09:49:55 -04:00
James Trew
053f2303c4 docs: proof-read edits (#2311) 2023-01-22 09:57:53 +01:00
Simon Hauser
361a172fce fix: icons with multiple dots but without custom overrides (#2256) 2022-12-02 10:21:44 +01:00
Mat Jones
f37c603303 feat: support for multi-part file extensions like *.test.js (#2252) 2022-12-01 19:20:52 +01:00
Antoine Bertin
5fadc247c5 fix: selected icon highlight with color_devicons to false (#2187) 2022-10-08 09:10:26 +02:00
Simon Hauser
5f25375191 chore: remove deprecated functions / messages (#2063) 2022-07-12 13:24:23 +02:00
Simon Hauser
f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Charles Moscofian
b44e657986 fix(path_display): allow function on path_display (#2043) 2022-07-06 08:29:15 +02:00
Simon Hauser
1ba967f84e fix: truncate for builtin.buffers
fix #2022
2022-06-30 14:29:57 +02:00
Simon Hauser
83b6cadb2c break: deprecate utils.get_default utils.if_nil (#1545) 2022-06-30 14:01:49 +02:00
Simon Hauser
edc6f55ba2 docs: document limitations of file_ignore_patterns and transform_path (#1955) 2022-06-30 14:01:49 +02:00
zeertzjq
d96eaa914a fix: block autocommands when setting preview buffer (#2010)
Telescope creates most floating windows with `noautocmd = true`, so
these windows do not trigger autocommands, but preview buffer is set in
window using `nvim_win_set_buf()`, which triggers buffer autocommands.
This may be unwanted, so block them using 'eventignore'.
2022-06-15 10:43:10 +02:00
xeluxee
20040cac31 fix: correctly use nvim-web-devicons (#1937)
Also performance improvements for utils.path_tail
2022-05-15 21:58:03 +02:00
fdschmidt93
d88094fbfd feat: show assigned function in actions.which_key (#1871) 2022-04-22 15:52:22 +02:00
Antoine Bertin
6e7ed1b963 feat: add default hl group for devicons (#1849) 2022-04-18 14:05:57 +02:00
tami5
ef7b6ada6d feat: improve UX with vim.notify (#1763)
* fix(notify): don't report request on new line

* ref(notify): update message format

* ref(msgs): always quote values + decrease duplication

* fix(ci): undefined variables

* ref(actions): temporary silent actions.__index errors

* cleanup

* revert: panic effort, we continue to use error for those

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-03-13 18:11:27 +01:00
Simon Hauser
75b5730432 chore: delete unused functions (#1788)
* chore: delete unused functions

* chore: remove unused file

No one needs this WIP file as well. We already have all these pickers
implemented in a better way
2022-03-13 07:31:37 +01:00
tami5
ddb9e56160 feat(lsp): ignore_symbols option (#1745)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-03-11 14:41:48 +01:00
Simon Hauser
802fe5d49e fix: transform_path nil input (#1576) 2021-12-27 09:49:07 +01:00
Simon Hauser
56325fefb2 feat: migrate to Telescope diagnostics using vim.diagnostic (#1553) 2021-12-10 17:49:06 +01:00
johnybx
b952c2f852 feat: add hide / unhide preview (#1305)
* feat: add hide / unhide preview or results and prompt

* fix edit actions while only preview window is active

* add option to start telescope without previewer -> "disable_previewer_at_startup"

* remove hide / unhide prompt and resutls, improve hide / unhide preview

* fix tests - check if popup window should be created with borders - popup.create does not support setting borderhighlight and border=false

* allow toggle preview even if preview is set to false

* reuse recalculate_layout in hide / unhide preview

* add docs to toggle preview

* check if preview window is valid window

* remove unnecessary changes

* cleanup, remove unnecessary changes

* close all previewers, refactor toggle preview code

[docgen] Update doc/telescope.txt
skip-checks: true
2021-11-18 19:44:12 +00:00
Luke Kershaw
729492406e feat: exclude option for shorten in path_display (#1429)
* feat: allow excluding positions for `shorten` in `path_display`

* [docgen] Update doc/telescope.txt
skip-checks: true

Co-authored-by: Github Actions <actions@github>
2021-11-14 09:37:15 +00:00
Simon Hauser
587a10d149 chore: remove a lot of deprecated stuff (#1399) 2021-11-01 20:30:10 +01:00
tami5
60660334c7 feat(defaults): enable customization of path_display.truncate (#1264)
followup to https://github.com/nvim-telescope/telescope.nvim/pull/1254
and implementation of
https://github.com/nvim-telescope/telescope.nvim/pull/1254#issuecomment-922527270
2021-09-20 12:52:59 +03:00
Luke Kershaw
f0db7d3a59 feat: truncate option for path_display (#1254) 2021-09-19 20:38:00 +02:00
qualious
1d17cc4abc feat: smart path (#914)
path_display = { "smart" }

Co-authored-by: Deniz <deniz@admentum.se>
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2021-09-12 21:14:00 +02:00
fdschmidt93
fbe004142f feat: show keymaps for builtin actions (#1084)
* Add default mappings `<C-/>`and `?` for insert and normal mode, respectively, to show registered keymappings (`actions.which_key`) attached to prompt buffer
2021-09-01 20:11:53 +02:00
Simon Hauser
baf39e5339 doc: generate docgen
i forgot it. My bad
2021-09-01 16:53:56 +02:00
Logan Connolly
b0c04c62b5 feat: add utility for fetching buffer directory (#902) 2021-09-01 16:52:45 +02:00
TJ DeVries
260f4617b6 startup: load once and only when called for devicons (#1139) 2021-08-20 13:47:30 -04:00
TJ DeVries
273942cc47 fixup: stylua 2021-08-06 13:14:13 -04:00
TJ DeVries
ae897cec08 fix: Do not transform URIs 2021-08-06 13:12:13 -04:00
Simon Hauser
79644ab677 chore: use stylua for formatting (#1040)
* chore: stylua job and config

* reformat with stylua
2021-07-23 11:42:37 -04:00
Luke Kershaw
8c3f2b630b feat: check type of path_display and warn user if wrong (#1023) 2021-07-18 12:19:27 +01:00
Luke Kershaw
1866265fea feat: Add length option for shorten_path (#886)
* feat: add `shorten_len` option for path shortening

- adds option to configure the length of shortened parts of filenames
- only affects paths when "shorten" is in `path_display`

* chore: revert rebase for `path.lua` to 876bed9

* refactor: replace `shorten_len` with the `shorten` key in `path_display`

- also deprecates `utils.path_shorten` and passes straight to `plenary`s `Path:shorten`

* feat: allow `path_display` to handle table keys, as well as strings
2021-07-16 17:41:39 +01:00