Commit Graph

407 Commits

Author SHA1 Message Date
elianiva
c3806f46b9 fix: live_grep throws an error if you insert \ (#378) 2021-01-03 11:59:16 +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
Simon Hauser
686d560fa5 fix: has ts (#374) 2020-12-31 11:50:39 +01:00
fffed
d72f73feeb fix: add ts_parsers.ft_to_lang to detect lang (#373)
Add detection of a proper buffer language by `ts_parsers.ft_to_lang` as `ts_parsers.has_parser` works with `language` but not with `filetype`
https://github.com/nvim-treesitter/nvim-treesitter/issues/796
2020-12-30 22:24:45 +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
tamago324
e555cd375f feat: all entry_makers are now overridable and icons for builtin.buffers (#364) 2020-12-27 17:15:52 +01:00
MenBrial
3e884e863a fix: bug scroller.create (#366)
Corrects error creation
2020-12-26 18:51:08 +01:00
Julian Berman
20fffc7c25 Feat: Add hidden to find_files (#340) 2020-12-26 18:48:49 +01:00
TJ DeVries
049602a2c5 ci: more tests (#359)
* more tests

* lint
2020-12-23 13:31:05 -05:00
tami5
4850c6df6d feat: include buf local maps, execute item on enter (#360)
keymaps should now include local buffer mappings and execute the mappings one enter
2020-12-23 20:36:20 +03:00
Cedric M'Passi
1e3ae28472 Fix: normal mode toggle issue in builtin.git_status
Fix bug introduced in #289
2020-12-21 22:37:16 +01:00
Cedric M'Passi
5a65c676af fix: normal mode toggle issue 2020-12-21 22:23:34 +01:00
TJ DeVries
2aa8bcb878 feat: Add better highlighting and new CI abilities (#355)
* Revert "Revert "fix: Better highlights (#344)" (#350)"

This reverts commit 7950fc8ba0.

* better highlights take 2

* fixup

* install fd find for sameness

* add some debug output

* more deterministic

* better ci
2020-12-21 16:03:48 -05:00
Sebsatian Keller
1e7ef41c70 fix: README example configuration (#357)
Both `find_files()` and `help_tags()` were bound to `<leader>ff`. This resulted in <leader>ff not opening the `find_files()` dialog
2020-12-21 23:05:17 +03:00
Senghan Bright
76f94588d3 LSP check capabilities (#356)
* check server capabilities before using LSP finders

* client indices do not always start at [1]

* succeed on first supported client

* use apply_checks method

* removed debug comment

* rename mappings table
2020-12-20 10:46:58 +01:00
Simon Hauser
2488e31df8 Feat: displayer hl_chars and TelescopeResults hlgroups (#349) 2020-12-19 21:13:05 +01:00
Senghan Bright
084a30b8fa More colours (#351)
* add vim hl_groups for autocmds finder

* spacing

* add displayer/colouring for git_commits

* LSP colouring and restore filename for workspace symbols

* resolve review issues.

* fix: handle 'show_line', 'ignore_filename', 'hide_filename'

* fix lsp workspace defaults

* allow for setting show_line when ignore filename is true

* move lsp_doc_symbol lineinfo to 2nd column

* reformat treesitter display to match LSP

* use utility functions for setting opts defaults

* add fix-me note for unlikely configuration permutation

* use hl_chars format for inline lineinfo
2020-12-19 20:25:08 +01:00
Simon Hauser
8c90d4855c Refactor previewers (#345) 2020-12-19 16:45:02 +01:00
Senghan Bright
7950fc8ba0 Revert "fix: Better highlights (#344)" (#350)
This reverts commit eca83f214a.
2020-12-18 23:44:58 +01:00
TJ DeVries
eca83f214a fix: Better highlights (#344)
* scratch: easy reproduce for buffers

* fix: Many highlight fixes
2020-12-18 23:42:51 +01:00
Senghan Bright
28abd7fb53 fix results count padding (#348) 2020-12-18 20:43:59 +01:00
Senghan Bright
68c5870345 Add more colour (#346)
* add colour to buffers finder

* new display function for LSP workspace/doc symbols

* add more hl_groups and opts paramter

* use make_display() for man_pages finder.

* use make_display for registers finder and add color

* don't use quickfix make_entry() for builtin finder

* make_entry() for builtin finder

* remove debug output

* revert change to internal.builtin finder

* fix_spacing
2020-12-18 15:41:55 +01:00
Simon Hauser
e5155a4aa3 Fix builtin.builtin again and add TelescopePreviewMatch hlgroup (#342) 2020-12-17 16:58:48 +01:00
Simon Hauser
f078d149a1 Update autocmd, highlights and help_tags previewers (#332)
Also make vim buffer line configurable
2020-12-17 15:58:38 +01:00
Simon Hauser
e5233f39c5 Fix: Use plenary.filetype.detect and remove own filetype detect (#326)
requires newest plenary.nvim version or you will have a bad day
2020-12-17 09:27:11 +01:00
Anirudh Haritas Murali
b5ff9de13d feat: add search_dirs opt to builtin.find_files to search from multiple dirs (#237) 2020-12-17 00:01:49 +03:00
Senghan Bright
205790285b fix: don't error when no hidden buffers are available (#341) 2020-12-16 21:36:50 +01:00
eth3lbert
af8d990c2c fix: typo (#339) 2020-12-15 09:26:05 +01:00
TJ DeVries
dfeebffd93 fix: Checks for next server on buffer 2020-12-14 11:41:16 -05:00
Senghan Bright
9a97982fc7 change quickfix make_entry to use column displayer (#331)
* change quickfix make_entry to use column displayer

* fix: don't convert filename to empty string
2020-12-13 17:25:25 +01:00
Christopher Laidler
7b5411ce54 Fix: typo (#333) 2020-12-13 11:49:14 +01:00
Simon Hauser
6e6fbbc49e Fix: scroller for descending (#327) 2020-12-11 16:48:14 +01:00
Dave Lage
d5ee177306 Capitalize supported items 2020-12-11 00:50:04 -05:00
TJ DeVries
f3609abd7f refactor: Move scroller into own testable module 2020-12-10 23:31:28 -05:00
TJ DeVries
b74c4b3efd Revert "fix: cycle scroll when num_results is small (#316)"
I didn't test this cause I'm noob. It's my fault not tami's

This reverts commit d9bf9181bc.
2020-12-10 23:01:41 -05:00
aca
d9bf9181bc fix: cycle scroll when num_results is small (#316) 2020-12-10 22:52:30 -05:00
Alessandro Martini
62b8655f15 fix: fix non escaped bat theme (#319)
When a bat theme contained spaces it would crash the bat previewer as
described in #318.
2020-12-10 22:46:39 -05:00
Dave Lage
77e8125ef5 Fix files link 2020-12-10 18:57:27 -05:00
Dave Lage
aa18920fc7 Add Example for pickers 2020-12-10 18:56:58 -05:00
Dave Lage
8661d0d0cc Upgrade Usage to main section 2020-12-10 18:46:04 -05:00
Dave Lage
9568d01fcf Move buffer lists to vim section 2020-12-10 18:44:24 -05:00
Dave Lage
466ee510bf Add links to sections in intro. 2020-12-10 18:40:06 -05:00
Dave Lage
328743ff5d Fix treesitter table 2020-12-10 18:39:10 -05:00
Dave Lage
be077b959f Formatting 2020-12-10 18:38:17 -05:00
Dave Lage
b4b4c7652d Make smaller targetable lists for pickers 2020-12-10 18:37:17 -05:00
Dave Lage
3a416f552b Extend context in intro. 2020-12-10 18:18:07 -05:00
Dave Lage
82722104d7 Update pickers links 2020-12-10 17:20:53 -05:00
Dave Lage
76cafdd2e6 Use lowercase to be consistent 2020-12-10 17:17:06 -05:00