Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: quickfix #293

Merged
merged 16 commits into from
Jan 11, 2021
Merged

feat: quickfix #293

merged 16 commits into from
Jan 11, 2021

Conversation

tjdevries
Copy link
Member

I'm working on changing structure of how we store and manage entries.

Once I do that, we can store all the entries.

Once I do that, it should be relatively trivial to turn all the entries into quickfix items.

(still WIP and playing around with new ideas / simple data structures)

@tjdevries tjdevries changed the title feat: quickfix (not implemented) feat: quickfix Dec 18, 2020
@elianiva
Copy link
Member

elianiva commented Dec 18, 2020

I got this weird spacing using this branch.

image
image

@tjdevries
Copy link
Member Author

Ah, I don't know that I've checked descending yet.

@tjdevries
Copy link
Member Author

@elianiva is it fixed now?

@elianiva
Copy link
Member

Yup, it has been fixed.

@elianiva
Copy link
Member

elianiva commented Dec 27, 2020

simplescreenrecorder-2020-12-27_19.35.51.mp4

Found another issue. If your cursor is at the bottom of the list and you if you try to go down, it will broke the list.
Sometimes the cursor just dissappeared, sometimes the entire list got messed up, and sometimes it jumps to a random position and lost its highlight like I've shown in the vid. Hopefully my video is clear enough.

Update: After some more testing, this only occured if the list is full.

@tjdevries
Copy link
Member Author

I think I fixed your issue, have to fix some testing code though.

@elianiva
Copy link
Member

can confirm, it works now :)

@kkharji kkharji requested a review from a team January 8, 2021 23:31
@elianiva
Copy link
Member

elianiva commented Jan 9, 2021

found an issue with the multiselect highlighting, notice how the highlight didn't get applied when my cursor is placed below the selection? It works fine after I move it above the selected item.

edit: apparently if we move the cursor upwards until it gets back to the bottom, it doesn't matter where we place the cursor, the highlight will work just fine. But if we move the cursor downwards until it gets back to the top, no matter where we place the cursor, the highlight won't get applied.

edit: did some more testing, this doesn't happen if we select multiple items that are close to each other. (second video)

simplescreenrecorder-2021-01-09_08.24.51.mp4
simplescreenrecorder-2021-01-09_08.32.26.mp4

@kkharji
Copy link
Member

kkharji commented Jan 9, 2021

  • toggle_selection should select the current line and move to the next line. (kinda expected behavior comming from ranger, although we should have an option to disable it)
  • experienced the same issue from @elianiva report
  • hitting enter after select a list of items (for fd picker case) doesn't open the selected files and add them to bufferlist, am I missing something?

@tjdevries is there any additional aspect would like me to test?

@Conni2461
Copy link
Member

Conni2461 commented Jan 9, 2021

  1. Do we wanna put LinkedList.lua into plenary?
  2. selection_strategy = 'row' is broken but that is also broken in current master. Its initialized wrong with sorting_strategy = 'decending' and i kinda expect it to do something slightly different. Or at least a while ago i fixed it to something different. E.g. I am at row index 20 and after typing there are only 15 row entries left, i expect it to be on the last possible index but now it resets. It might be the scroller?!

Edit: Yes its the scroller it works correct with scroll_strategy = 'limit'. So lets have this issue low prio and we can fix that later. No one complained about it and i don't even think most of the people know or use the different selection_strategies 😆

Edit 2: I think a fix could be in Pickers:set_selection doing the scroller after self:can_select_row(). Nevertheless i was running into Error executing vim.schedule lua callback: ...lugged/telescope.nvim/lua/telescope/pickers/scroller.lua:66: Must never exceed max results: { result = 40, args = { 40 0 40 } } when using selection_strategy = 'row'. Reproduce steps are use row -> picker fd -> type garbage till no more results can be found.

@tjdevries
Copy link
Member Author

For now, just ignore multi selection. I just fixed some bugs I noticed along the way. I will work on that next. This is primarily focused on sending to quickfix list and making sure that results show correctly

@tjdevries tjdevries merged commit 8783bea into master Jan 11, 2021
wordhou pushed a commit to wordhou/telescope.nvim that referenced this pull request Jan 17, 2021
* 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
oberblastmeister added a commit to oberblastmeister/telescope.nvim that referenced this pull request Jan 24, 2021
made tree more ergonmic

deleted unneeded comments

fix: Checks for next server on buffer

fix: typo (nvim-telescope#339)

added stack root and node

added preprocessing

using staticfinder instead of separate finder, custom entry maker

added selections and remember

removed unused stuff

fixed warnings

fixed remember and selections pop

started branch

added go function

changed up test

fix: don't error when no hidden buffers are available (nvim-telescope#341)

feat: add search_dirs opt to builtin.find_files to search from multiple dirs (nvim-telescope#237)

Fix: Use plenary.filetype.detect and remove own filetype detect (nvim-telescope#326)

requires newest plenary.nvim version or you will have a bad day

Update autocmd, highlights and help_tags previewers (nvim-telescope#332)

Also make vim buffer line configurable

Fix builtin.builtin again and add TelescopePreviewMatch hlgroup (nvim-telescope#342)

removed root parameter from go function

changed back to not do_close

removed node and leaf classes

removed stack class instead for table.insert and table.remove

fixed warning

started branch

added better preprocessor and tree class

started some tests

finished making tests pass

cleaned up

fixed make entry and updated example

Add more colour (nvim-telescope#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

fix results count padding (nvim-telescope#348)

fix: Better highlights (nvim-telescope#344)

* scratch: easy reproduce for buffers

* fix: Many highlight fixes

Revert "fix: Better highlights (nvim-telescope#344)" (nvim-telescope#350)

This reverts commit eca83f2.

Refactor previewers (nvim-telescope#345)

More colours (nvim-telescope#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

Feat: displayer hl_chars and TelescopeResults hlgroups (nvim-telescope#349)

LSP check capabilities (nvim-telescope#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

fix: README example configuration (nvim-telescope#357)

Both `find_files()` and `help_tags()` were bound to `<leader>ff`. This resulted in <leader>ff not opening the `find_files()` dialog

feat: Add better highlighting and new CI abilities  (nvim-telescope#355)

* Revert "Revert "fix: Better highlights (nvim-telescope#344)" (nvim-telescope#350)"

This reverts commit 7950fc8.

* better highlights take 2

* fixup

* install fd find for sameness

* add some debug output

* more deterministic

* better ci

fix: normal mode toggle issue

feat: include buf local maps, execute item on enter (nvim-telescope#360)

keymaps should now include local buffer mappings and execute the mappings one enter

ci: more tests (nvim-telescope#359)

* more tests

* lint

Feat: Add hidden to find_files (nvim-telescope#340)

fix: bug scroller.create (nvim-telescope#366)

Corrects error creation

feat: all entry_makers are now overridable and icons for builtin.buffers (nvim-telescope#364)

feat: All buffer previewers are now async and more config options (nvim-telescope#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,
  }
}

feat: append mode for previewers.utils.job_maker (nvim-telescope#372)

fix: add ts_parsers.ft_to_lang to detect lang (nvim-telescope#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`
nvim-treesitter/nvim-treesitter#796

fix: has ts (nvim-telescope#374)

fix: tags now work with hasktags (nvim-telescope#375)

fix: make sure preview buffer is valid before writing to it (nvim-telescope#376)

fix: live_grep throws an error if you insert `\` (nvim-telescope#378)

fix: escape chars instead of resetting the prompt (nvim-telescope#379)

fix: termopen previewer for powershell (nvim-telescope#382)

add selected command to cmd-history (nvim-telescope#383)

Fix missing global (nvim-telescope#384)

* add selected command to cmd-history

* make N_ function global

* fix vimoptions description resolution and add color

feat: add extension in telescope command (nvim-telescope#380)

fix: live_grep will now accept cwd (nvim-telescope#390)

feat: Add highlight to builtin.git_status (nvim-telescope#388)

feat: add actions.get_current_line (nvim-telescope#391)

fix: handle directories in windows with dir (term_previewer) (nvim-telescope#395)

add devicons to oldfiles picker (nvim-telescope#397)

Spell suggestions (nvim-telescope#399)

* feat: spell suggest picker

* set correct window title

* add entry to readme

fix: remove quotes from spell suggestions (nvim-telescope#400)

refactor telescope command (nvim-telescope#398)

* refactor telescope command

* addd telescope default options support

* fix variable name wrong

* convert command line string to lua type

* add comment.

* update readme for use theme in commandline

* enhance complete in commandline

* enhance complete in commandline

* enhance covert commandline options

fix: custom extensions opts for commands  (nvim-telescope#404)

fix: use valid paths for term_previewer vimgrep and qflist (nvim-telescope#402)

fix nvim-telescope#406 (nvim-telescope#407)

feat: quickfix (nvim-telescope#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

feat: add feature request issue template (nvim-telescope#418)

fix: previewer windows fix (nvim-telescope#371)

refactor file_maker signature and fix scrolling (nvim-telescope#412)

feat: only_search_text (nvim-telescope#419)

fix: git_branch only remove remotes/origin part (nvim-telescope#423)

fix nvim-telescope#385 (nvim-telescope#422)

fix nvim-telescope#426 (nvim-telescope#427)

feat: show git log for remote branches (nvim-telescope#428)

fix: preview for unnamed buffers (nvim-telescope#434)

support convert custom command arg (nvim-telescope#439)

* support convert custom command arg

* format code

* remove unused variable

feat: allow to list files in git submodules (nvim-telescope#329)

Co-authored-by: Simon Hauser <[email protected]>

improve conver_user_opts function readable (nvim-telescope#441)

feat: Add option to set initial_mode (nvim-telescope#442)

Substring matcher (nvim-telescope#443)

* add substr_matcher

* correct function name

* use util.split function and remove unused opts

fix: error message too many open files (nvim-telescope#432)

and buffer previewer still "erroring" out for builtin.buffers

feat: add ignore_current_buffer opt to builtin buffers (nvim-telescope#444)

fix: Treesitter link in README to correct section

grep_string/live_grep support multiple dirs (nvim-telescope#448)

+ overwriting vimgrep_argumnets

fix: escape filename before opening it (nvim-telescope#453)

fix: fnameescape in from_entry (nvim-telescope#454)

if entry.path is nil vim.fn.fnameescape will return null which results
in all other option no longer be checked

feat: add vim buffer directory viewer using plenary scandir.ls_async (nvim-telescope#421)

feat: git_status (??) now shows file or directory
fix: attempt to index field 'state' (a nil value)

fix: escape filename for previewer and action (nvim-telescope#456)

started branch

more stuff

removed accidental file

removed accidental menu stuff
@kaddkaka
Copy link
Contributor

kaddkaka commented May 9, 2021

@Conni2461 referred me to this PR for some scroller issues. So I hope it's ok that I mention this one here too:

Pressing <down> when the search result is empty generates an error that steals the focus for about 1 second (new inserted characters will not be seen for that second but show up later). The error is:

E5108: Error executing lua ...se/opt/telescope.nvim/lua/telescope/pickers/scroller.lua:66: Must never exceed max results: { result = 35, args = { 35 0 35 } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants