Commit Graph

48 Commits

Author SHA1 Message Date
James Trew
979bfa2c44 feat(builtin.buffers): enhance and bind delete_buffer action (#3145)
* feat(builtin.buffers): enhance and bind `delete_buffer` action

* change default bind and add docs

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

---------

Co-authored-by: Github Actions <actions@github>
2024-06-15 14:24:18 +00:00
Chris Grieser
77cab9ad63 feat(builtin.colorscheme): add option ignore_builtins (#3155) 2024-06-15 15:29:34 +02:00
Yeri Pratama
7231b52276 fix(buffers): select_current not selecting current buffer index (#3147)
Co-authored-by: Yeri <yeri@accelbyte.net>
2024-06-09 14:09:00 +00:00
xudyang1
349660c0d3 fix(pickers): improve CRLF line splitting support for windows (#3127)
* fix(help_tags): show help tags on windows (#3126)

On Windows, `builtin.help_tags` picker does not show any help tags.

To fix this, the following changes are needed:

1. `util.path_tail` checks unix separator `/` on Windows and leave the
original implementation intact on unix systems.

2. Line endings should be taken carefully on Windows. `vim.split` with
   only newline `\n` character as separator may result in unexpected
   crash when parsing large files. When splits on lines are needed, call
   it with `\r?\n`, or even set up a wrapper function in utils is more
   prefered.

Fixes #3126

* fix: handle cross platform line splits
2024-05-26 14:15:31 +00:00
Tristan Knight
5665d93988 fix(builtin.spell_suggest): ciw into black hole register (#3124) 2024-05-23 02:41:23 +00:00
Christian Clason
bbdbb7593f fix: adapt to Nvim deprecations in 0.10 (#3109) 2024-05-17 14:39:12 +02:00
DevFortunato
96610122a4 fix(builtin.colorscheme): preview colorscheme without previewer (#3097)
* fix: enable_preview true

* fix: remove buflisted check and colorscheme command in the buffer previewer

---------

Co-authored-by: nobrain <moviemaker@alfonso>
2024-05-17 03:08:28 +00:00
Christoph Bier
02a60a8396 fix(builtin.oldfiles): fix cwd_only for windows (#3096)
Remove backslash escaping in oldfiles picker, which was needed
before the code was changed to use substring comparison instead of
regex matching. (Commit b3ff5f33)
2024-05-12 18:30:53 +00:00
Nolan Prochnau
486a6489c4 fix(builtin.commands): don't remap for feedkeys (#3087) 2024-05-03 01:28:13 +00:00
Kevin Traver
2d0d057791 fix(picker): notify on empty quickfix and loclist (#3082) 2024-05-01 02:26:27 +00:00
gzbfgjf2
d26b666b45 fix(marks): preserve uri filenames with path_expand (#3029) 2024-04-05 01:03:48 +00:00
fcying
04dfe370b0 fix: remove duplicate lazyloaded items in colorscheme (#2951) 2024-03-18 00:28:10 +00:00
Damjan 9000
6868df51d2 feat(bultin.buffer): add select_current option (#2918) 2024-02-24 15:21:25 +01:00
Tyler Miller
eb88dc6434 feat(builtin.autocommands): support jumping to lua callback src (#2916) 2024-02-14 03:00:33 +00:00
Arne Van Maele
da8b3d4859 feat(builtin.oldfiles): support file location opening (#2863) 2024-01-12 03:53:31 +00:00
James Trew
b3ff5f3320 fix(builtin.oldfiles): cwd matching with special characters (#2860)
`vim.fn.matchstrpos({expr}, {pat})` doesn't handle all characters well
since the pattern (cwd path in this case) is used as a regex pattern.
2024-01-11 02:02:29 +00:00
James Trew
5550bbb1b6 fix(builtin.marks): normalize mark path (#2859) 2024-01-11 01:38:09 +00:00
James Trew
8b56e9bb2d fix(builtin.buffers): better buffer in cwd check (#2847)
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.
2024-01-04 03:18:39 +00:00
James Trew
c621f71012 fix(builtin.buffers): improve only_cwd handling with partial matches (#2845)
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`
2024-01-04 00:49:03 +00:00
James Trew
3466159b0f fix(builtin.colorscheme): get current colorscheme (#2837) 2023-12-29 01:18:41 +00:00
James Trew
aacaa9cd03 refactor(colorscheme): clean up vim.cmd colorscheme calls (#2830) 2023-12-27 01:50:20 +00:00
Liu
9907deaed2 fix(builtin.commands): make 0-arg commands be repeatable by @: (#2808) 2023-12-24 19:25:02 +00:00
Brian Mayo
3f5f165447 feat(buffers): add buffers_sort option (#2793)
* refactor: add sort_buffers option to buffers picker

* refactor: validate sort_buffers opt is a function
2023-12-03 21:24:07 +03:00
LUCIANO FURTADO
4e77d1991d feat(marks): add support for displaying marks according to the mark_type (#2775)
* Fixes: #2763

* clean up docs type annotations

---------

Co-authored-by: LUCIANO FURTADO <l.furtado@f5.com>
Co-authored-by: James Trew <j.trew10@gmail.com>
2023-11-15 02:42:17 +00:00
Munif Tanjim
84d53dfdbe feat(pickers): fully customizable layout (#2572) 2023-09-27 08:34:22 +02:00
Sofronie Cristian
3d8e051c8c fix(internal.resume): dynamic_preview_title was not respected and title became static (#2696)
* fix(internal.resume): dynamic_preview_title was not respected and title became static

* run stylua
2023-09-09 23:33:01 +00: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
Munif Tanjim
9a82b5b73e fix: use :botright modifier for quickfix window open (#2554) 2023-06-07 23:54:23 +00:00
Kalmander
be49680937 fix(registers): add small delete remove black hole (#2553)
Co-authored-by: Tryggvi Kalman <tryggvikalman@protonmail.com>
2023-06-07 14:59:50 +02:00
bn-peters
5b7cedd7f2 feat(builtin): implement filter for keymaps (#2462) 2023-05-24 14:23:08 +02:00
Juan Barrios
8dd1cb2771 feat: sorting popup autocomplete items and initial builtin items (#2518) 2023-05-24 11:03:07 +02:00
Pete Matsyburka
0900f6fcaa fix: exclude directories from oldfiles picker (#2485) 2023-05-14 22:04:46 +02:00
Rishikesh Vaishnav
40dc952352 fix: replace default mapping rather than mapping CR directly for history and search pickers (#2506) 2023-05-14 21:44:48 +02:00
liugh
f409830422 fix(builtin.commands): add the command w/ zero arguments to cmd history when executed (#2320) 2023-02-19 11:47:09 +01:00
Svetlozar Iliev
5dfd807771 feat: Allow filtering for oldfiles and buffers (#2353) 2023-01-30 18:09:29 +01:00
Fernando Schauenburg
d5f6c0911d fix: man_pages on macOS and FreeBSD (#2326) (#2352)
macOS 13.x (Ventura, Darwin 22.x) uses `apropos(1)` from FreeBSD, which
does not behave the same as the previous implementation up to macOS 12.

`apropos(1)` takes a regular expression as an argument, so passing "."
causes it to match anything and therefore return all results to be
filtered by Telescope.
2023-01-30 08:01:35 +01:00
Hasan Mahmud
83eb2f9756 fix(oldfiles): use path separator from builtin utils in cwd_only (#2340) 2023-01-22 09:18:34 +01:00
emmanueltouzery
04af51dbfb fix(old_files): opts.cwd_only includes similarly named dirs (#2308) 2023-01-07 11:31:11 +03:00
Tobias S
e960efa60e fix: jumplist picker indexing the line after (#2273) 2022-12-21 12:10:42 +01:00
Xavier Young
4d77743a8e feat(builtin.keymaps): display noremap/buffer indicators and add lhs filter (#2246) 2022-11-27 20:04:07 +01:00
kyoh86
343a2b6b71 feat: add new action to open quickfix window from quickfixhistory (#2249) 2022-11-27 20:03:03 +01:00
kkharji
5e16fbc8ea feat(picker): command history filter (#2132)
* feat(picker): command history filter

I've recently start using command history. For sometime was a bit annoyed of unrelevant commands
like edit/write and others (most likely only used once)

I've considered using lua patterns, however, logical `or` isn't a thing. Additionally, passing a list of lua patterns and checking each pattern for each command history entry felt tedious.

This PR introduce a new optional function to filter command history items.

For example, in my configurations

~~~lua
local command_history_ignore = vim.regex "edit\\|Move\\|write\\|Write\\|e\\s\\|lua\\sI("
overrides.command_history = minimal {
  prompt_prefix = "CMDHistory> ",
  filter_fn = function(item)
    if #item < 3 then
      return false
    else
      return not command_history_ignore:match_str(item)
    end
  end,
}
~~~

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

Co-authored-by: Github Actions <actions@github>
2022-11-23 17:26:29 +01:00
ADoyle
d541e0d6e0 feat: the parameter "map" of attach_mappings can be list of modes to create mapping on multiple modes (#2220) 2022-11-06 17:42:29 +01:00
Tushar Kuntawar
2428953db3 fix: builtin register picker better sorting (#2175) 2022-09-27 21:17:11 +02:00
steven
b5833a682c fix: move the moon behind show_moon option and update documentation (#2072) (#2079) 2022-07-22 18:16:17 +02:00
Simon Hauser
737f8cd6b5 fix: Telescope command lsp_definition call (and potentially more) (#2086) 2022-07-22 17:52:41 +02:00
Simon Hauser
f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Simon Hauser
0621c1c6ba break: prefix internal files and add deprecation messages (#2032) 2022-07-01 22:20:12 +02:00