diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2021-01-11 13:29:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 13:29:37 -0500 |
| commit | 8783bea06e1e0dfa8dfd4834058923088471d832 (patch) | |
| tree | 050096ba649a94bb01e7c0b3a029e9b4eb060029 /lua/telescope/pickers/highlights.lua | |
| parent | de80a9837cd1d207981c1f6dbf504436f8bfee13 (diff) | |
feat: quickfix (#293)
* feat: quickfix (not implemented)
* [WIP]: Wed 09 Dec 2020 11:11:30 PM EST
* somewhat working linked list impl
* getting closer
* might be working
* might be working for real
* works and implemented basic example
* dont forget to close prompt
* fix descending and add more tests
* test fixes
* fix test
* more logging
* Fix some more tests
* Fix logging messing up tests
* fix: lint
* fix: multi select stuffs
Diffstat (limited to 'lua/telescope/pickers/highlights.lua')
| -rw-r--r-- | lua/telescope/pickers/highlights.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lua/telescope/pickers/highlights.lua b/lua/telescope/pickers/highlights.lua index 23e796e..62ffb4b 100644 --- a/lua/telescope/pickers/highlights.lua +++ b/lua/telescope/pickers/highlights.lua @@ -3,6 +3,7 @@ local a = vim.api local highlights = {} local ns_telescope_selection = a.nvim_create_namespace('telescope_selection') +local ns_telescope_multiselection = a.nvim_create_namespace('telescope_mulitselection') local ns_telescope_entry = a.nvim_create_namespace('telescope_entry') local Highlighter = {} @@ -75,6 +76,28 @@ function Highlighter:hi_selection(row, caret) ) end +function Highlighter:hi_multiselect(row, entry) + local results_bufnr = assert(self.picker.results_bufnr, "Must have a results bufnr") + + if self.picker.multi_select[entry] then + vim.api.nvim_buf_add_highlight( + results_bufnr, + ns_telescope_multiselection, + "TelescopeMultiSelection", + row, + 0, + -1 + ) + else + vim.api.nvim_buf_clear_namespace( + results_bufnr, + ns_telescope_multiselection, + row, + row + 1 + ) + end +end + highlights.new = function(...) return Highlighter:new(...) end |
