Commit Graph

55 Commits

Author SHA1 Message Date
fdschmidt93
a6c7498bdc feat: filetype_hook & improved docs; fix preview partial override (#1273) 2021-09-27 15:24:35 +02:00
Sávio Carlos Martins Costa
87471bc3ff feat: add highlight group: TelescopePreviewMessage (#1286)
* feat: add highlight group: TelescopePreviewMessage

* fix indentation from 4 to 2 spaces
2021-09-27 11:59:05 +02:00
Simon Hauser
41f362006b fix: tags now also support suppercollider tags (#1284) 2021-09-26 12:56:06 +02:00
fdschmidt93
2e7584f1cf fix: stacked hooks in buffer previewer (#1253) 2021-09-17 20:02:56 +02:00
fdschmidt93
5a020a8859 fix: fallback to syntax hl if treesitter fails (#1249) 2021-09-17 00:07:54 +02:00
fdschmidt93
7c5b846f6f feat: skip/timeout preview if file cannot be easily previewed (#1231)
* For full configuration, see `:h telescope.defaults.preview`
* Unblocks previewer on binaries, too large files, and files that take too long to read
* Allows toggling treesitter highlighting for buffer_previewer
* Allows to globally opt out of previewer
2021-09-16 23:01:40 +02:00
Simon Hauser
5131df7df1 docs: rewrite readme and add missing config values + builtin opts 2021-09-16 11:12:12 +02:00
fdschmidt93
1c35ea319e fix: stale lnum in buffer previewer (#1229)
* fix: lnum to jump to might be stale eg when resuming buffer picker after changes
2021-09-10 13:21:04 +02:00
fdschmidt93
ac42f0c26c fix: clear buffer previewer fully for caching (#1201) 2021-09-02 16:36:08 +02:00
fdschmidt93
97b7e6095f fix: string display for builtin.pickers (#1194) 2021-09-01 21:54:14 +02:00
fdschmidt93
5d37c3ea08 feat: allow caching and resuming picker (#1051)
* expose `cache_picker` in telescope.setup to configure caching, see `:h telescope.defaults.cache_picker`
* add builtin.resume and builtin.pickers picker
2021-09-01 18:17:18 +02:00
Omar Zeghouani
a1a7785acf fix: autocommands cursor outside of buffer (#1157)
Closes #957
2021-09-01 16:12:28 +02:00
fdschmidt93
50e5e86ac3 fix: safer teardown of buffer previewer (#1158) 2021-08-23 20:20:41 +02:00
fdschmidt93
79dc995f82 fix: (terminal) buffer previewer (#1120)
Use existing buffers for buffer previewer to allow previewing special buffer types
2021-08-23 15:27:11 +02:00
zeertzjq
654903fc04 fix: preview the correct man page section (#1076) 2021-08-04 22:19:39 +02: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
Simon Hauser
664690029f fix: unknown filetype error message (#1034) 2021-07-20 19:20:22 +02:00
fdschmidt93
3f841cb3c5 fix: error from hopping faster than preview (#1006) 2021-07-16 22:24:54 -04:00
anott03
df579bac42 refactor: move from telescope.path to plenary.path (#473)
This will deprecate telescope.path, we will remove it soon. Please move over to plenary.path

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2021-07-14 19:25:00 +02:00
TJ DeVries
5a53ec5c2f feat: Consistent and sensible layout_config (#922)
* feat: Consistent and sensible layout_config

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

* [WIP]: Thu 17 Jun 2021 03:36:44 PM EDT

* [WIP]: Thu 17 Jun 2021 03:38:11 PM EDT

* layout_default -> layout_defaults

* remove options from bug repot

* Conni2461 suggestions: part 1

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

* Conni2461 suggestions: part 2

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

* Linting

* Improve deprecation checks

- Move `layout_defaults` handling to `deprecated.lua`
- Check for "layout keys" outside of `layout_config` on `setup`

* fixup: Just add a few more words

Co-authored-by: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com>
Co-authored-by: Github Actions <actions@github>
2021-07-01 05:41:58 -04:00
Simon Hauser
6ac5ee0854 feat: cycle previewers with commit and bcommit already using it (#528)
- new git previewers
- jump to line in bcommit previewer
- vimdiff for bcommits
- dynamic preview window titles
- more previewers documentation

Cycle previewers are not mapped yet. So you need to setup yourself:
```lua
require('telescope').setup {
  defaults = {
    mappings = {
      i = {
        ["<C-s>"] = actions.cycle_previewers_next,
        ["<C-a>"] = actions.cycle_previewers_prev,
      },
    },
  }
}
```

Co-authored-by: Thore Strassburg <thore@weilbier.net>
2021-06-14 21:50:46 +02:00
Michał Nowotnik
22a78a4636 fix: prevents flickering when first loading a buffer preview entry (#797)
There's a slight lag on the first preview loading (during preview buffer creation).
It is not visible the next time user chooses a file for preview because scratch buffer
for the file already exists. This lag *and* setting preview window to display the newly
created buffer before its fully initialized causes a brief flash of blank terminal background.

This change delays setting preview window to display the new preview buffer and consequently
eliminates the flash. It should improve user experience since flickering can be distracting.
2021-05-11 20:16:04 +02:00
Amirreza Askarpour
9fd242db26 feat: add git_stash picker (#800) 2021-05-11 10:20:57 +02:00
Simon Hauser
aefc831735 fix: no longer leaking one buffer previewer in some occasions (#664)
* fix: stop leaking last preview buffer
* fix: formatting for docs
* fix: async check if file is dir or not and
  - fix for in_fast_event when overriding file_maker
* fix: filtering for space in keymaps and fzy
* fix: show correct result numbers when using file_ignore_patterns
* Handle early close. Caused because we actually cleaning up buffers now
* cleanup
* [docgen] Update doc/telescope.txt
2021-03-30 12:32:18 +02:00
Simon Hauser
68c30dd560 fix: only expand if we are not in_fast_event() 2021-03-07 08:41:45 +01:00
Simon Hauser
3faca0802f docs: start documenting previewers (#574)
Co-authored-by: Muhammed Zakir <MuhammedZakir@users.noreply.github.com>
2021-03-03 18:14:46 +01:00
Simon Hauser
ca92ec1a83 fix: a lot of small things and adds more customization for caret (#554)
Attention:
prompt_prefix will no longer add a space at the end. So if you still want a space at the end make sure your configuration has one.
The default should not be changed. So if you haven't copied prompt_prefix in your config this doesn't affect you.

Feat:
- prompt prefix does no longer always end with space
- selection_caret configurable. Default: `> `
- result_prefix configurable. Default: `  `
- more actions for git_branches
  - <c-t> does track the branch
  - <c-r> does rebase branch
  - also added delete branch action but not configured. See readme on how to do that

Fixes:
- fix docgen ci
- Better error for lsp_workspace_symbols
- better formatting for CONTRIBUTING.md
- move from systemlist to plenary.job
- git branch now supports checkout on remote branches
2021-02-27 16:26:25 +01:00
Jae-Won Chung
e2696d694a fix: change git previewers from using -P to --no-pager for better compatibility (#558) 2021-02-26 11:54:33 +01:00
Simon Hauser
b5051eeb01 feat: make buffer previewer default and deprecate bat previewer (#420)
To revert back to bat previewers put this into your config:

file_previewer = require'telescope.previewers'.cat.new,
grep_previewer = require'telescope.previewers'.vimgrep.new,
qflist_previewer = require'telescope.previewers'.qflist.new,
2021-02-24 03:47:22 +01:00
Simon Hauser
09d1e3a607 feat: buffer previewers ls is now colorized (#505)
Requires up to date plenary version
2021-02-12 22:30:55 +01:00
Simon Hauser
3a7fa41857 fix: all git builtin respect cwd now (#517) 2021-02-09 18:25:57 +01:00
Raphael
feacafacbc remove bat env theme variable (#489) 2021-02-02 20:39:01 +08:00
JINNOUCHI Yasushi
c422d86eb9 feat: add sections opt for man_pages and fix for macos (#413)
:Telescope man_pages sections=3 will only show man pages from section 3
:Telescope man_pages sections=1,2,3 will show man pages from section 1, 2 and 3
2021-02-02 13:23:37 +01:00
Simon Hauser
9e76b1613a fix: remove env workaround for term_previewer (#482)
Also fixes #484
2021-02-01 14:50:01 +01:00
TJ DeVries
4e0dfa2e70 fix: dont error if the previewer is not able to set at the current time 2021-01-30 22:57:36 -05:00
elianiva
b1fb172b7f fix: no TS highlight if it gets loaded after Telescope (#479) 2021-01-30 23:34:05 +07:00
Corentin Brunel
2a5db2f4f1 fix: git branches previewer add nil check to cend (#478)
Co-authored-by: Corentin Brunel <cbrunel@localhost.localdomain>
2021-01-30 10:16:17 +01:00
Alvaro Muñoz
951ede2a70 fix: allow previewer win customization (#460) 2021-01-24 23:53:58 +01:00
elianiva
099910dcd9 fix: escape filename for previewer and action (#456) 2021-01-23 19:35:29 +07:00
Simon Hauser
223ec81774 feat: add vim buffer directory viewer using plenary scandir.ls_async (#421)
feat: git_status (??) now shows file or directory
fix: attempt to index field 'state' (a nil value)
2021-01-22 21:03:39 +01:00
Simon Hauser
d75d9ae428 fix: error message too many open files (#432)
and buffer previewer still "erroring" out for builtin.buffers
2021-01-19 18:28:47 +01:00
Simon Hauser
00e898a1f9 fix: preview for unnamed buffers (#434) 2021-01-15 16:42:26 +01:00
Simon Hauser
e08a5b1331 feat: show git log for remote branches (#428) 2021-01-15 09:27:46 +01:00
Simon Hauser
5592d709c6 refactor file_maker signature and fix scrolling (#412) 2021-01-11 21:10:42 +01:00
Simon Hauser
07f8f3d340 fix: previewer windows fix (#371) 2021-01-11 21:02:24 +01:00
JINNOUCHI Yasushi
cc6749a5aa fix: use valid paths for term_previewer vimgrep and qflist (#402) 2021-01-09 12:06:11 +01:00
Mike
d2ba51c6ca fix: handle directories in windows with dir (term_previewer) (#395) 2021-01-05 20:11:36 +01:00
Simon Hauser
4691863f43 fix: termopen previewer for powershell (#382) 2021-01-03 20:27:23 +01:00
Alvaro Muñoz
f15af583eb fix: make sure preview buffer is valid before writing to it (#376) 2021-01-01 20:42:36 +01:00
Simon Hauser
a0b37473a9 fix: tags now work with hasktags (#375) 2020-12-31 16:17:09 +01:00