Commit Graph

70 Commits

Author SHA1 Message Date
Simon Hauser
68c30dd560 fix: only expand if we are not in_fast_event() 2021-03-07 08:41:45 +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
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
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
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
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
Simon Hauser
a0b37473a9 fix: tags now work with hasktags (#375) 2020-12-31 16:17:09 +01:00
Alvaro Muñoz
e0705b5d4a feat: append mode for previewers.utils.job_maker (#372) 2020-12-30 00:56:12 +01:00
Simon Hauser
1d40ab5ccd feat: All buffer previewers are now async and more config options (#354)
Configure preview window with:
autocmd User TelescopePreviewerLoaded setlocal wrap
autocmd User TelescopePreviewerLoaded setlocal number

file_maker example: Use regex highlighting for certain filetype like `*min.js` because they slow
down things with treesitter highlighter. Just a snippet for tests. We will do an extension :)

local previewers = require('telescope.previewers')
local putils = require('telescope.previewers.utils')
local pfiletype = require('plenary.filetype')

local _bad = { '.*%.min%.js' }
local bad_files = function(filepath)
  for _, v in ipairs(_bad) do
    if filepath:match(v) then
      return true
    end
  end

  return false
end

local new_maker = function(filepath, bufnr, bufname, use_ft_detect, callback)
  if use_ft_detect == nil then use_ft_detect = true end

  if bad_files(filepath) then
    previewers.buffer_previewer_maker(filepath, bufnr, bufname, false, callback)
    local ft = pfiletype.detect(filepath)
    putils.regex_highlighter(bufnr, ft)
  else
    previewers.buffer_previewer_maker(filepath, bufnr, bufname, use_ft_detect, callback)
  end
end

require('telescope').setup {
  defaults = {
    buffer_previewer_maker = new_maker,
  }
}
2020-12-29 21:05:59 +01:00
Simon Hauser
8c90d4855c Refactor previewers (#345) 2020-12-19 16:45:02 +01:00