Giter Club home page Giter Club logo

telescope-zf-native.nvim's People

Contributors

dsully avatar natecraddock avatar whoissethdaniel avatar younger-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

telescope-zf-native.nvim's Issues

Better sorting

When two paths rank the same, telescope will keep the results in the same order as given. That means that results like this are possible. It is preferable to match the shorter path, and then require an extra query term to match the longer path.

FR: Initial sorting when the query is empty

Thanks for this sorter, it's definitely an improvement which definitely deserves to be more popular.


So one issue I have is the initial sorting of results. It seems that when the query is empty, this sorter just passes the results from fd through without any sorting.

Showcase

This initial order is often not desirable, as this results for example in Makefile and README always being placed at the top, even though they are files that are rarely accessed in comparison to other files.

One reasonable solution would be to sort specific files further to the top, e.g. prioritizing lua, js, py files over md and Makefiles. Since there are probably quite diverse preferences for initial sorting, it might also make sense to offer an option for an initial-sorting-function, working similarly to telescope's tiebreaker.

For reference and more details, see also the issue I opened at the telescope repo: nvim-telescope/telescope.nvim#2905

Recent feature in `builtin.current_buffer_fuzzy_find` crashes telescope

Since nvim-telescope/telescope.nvim#2909, we will get the following error when we do :Telescope current_buffer_fuzzy_find.

E5108: Error executing lua: ...plugins/telescope.nvim/lua/telescope/builtin/__files.lua:549: bad argument #1 to 'unpack'
 (table expected, got nil)
stack traceback:
        [C]: in function 'unpack'
        ...plugins/telescope.nvim/lua/telescope/builtin/__files.lua:549: in function 'run_replace_or_original'
        ...epro/plugins/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'
        ....repro/plugins/telescope.nvim/lua/telescope/mappings.lua:269: in function <....repro/plugins/telescope.nvim/l
ua/telescope/mappings.lua:268>

To reproduce this error:

local root = vim.fn.fnamemodify('./.repro', ':p')
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
  vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end
local lazypath = root .. '/plugins/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)
local plugins = {
  'folke/tokyonight.nvim',
  {
    'nvim-telescope/telescope.nvim',
    commit = 'fac5da839e23e7a4c17a332a640541cd59ebfbd5',
    lazy = false,
    dependencies = {
      'nvim-lua/plenary.nvim',
      'natecraddock/telescope-zf-native.nvim',
    },
    config = function()
      require('telescope').setup({
        extensions = { ['zf-native'] = { generic = { enable = true } } },
      })
      require('telescope').load_extension('zf-native')
    end,
  },
}
require('lazy').setup(plugins, { root = root .. '/plugins' })
vim.cmd.colorscheme('tokyonight')

Sorting based on proximity to open buffer

Hey, thanks so much for this plugin, it has greatly improved my telescope experience :)

This is somewhat similar to #10 requests but based on a different criteria. If say I'm working in a large repo with a large amount of files that have the same name:

dir_a/
- file_1
- file_2
dir_b/
- file_1
- file_2

I would love to configure the sorting such that if I'm in dir_b/file_1 and I open Telescope and type file_2, the closest selection in Telescope is dir_b/file_2 even though alphabetically dir_a/ might be sooner.

Is that something achievable in the current sorting configuration or will I need to drop down and fiddle with Telescope comps myself? Thanks! :)

Feature: allow case sensitive setting

Hey. ๐Ÿ‘‹

I've been using this sorter for quite some time, and been very happy with it. Lately, I have been wanting to turn off the default smart casing though.

Would it be possible to add an option to enforce the result to be case sensitive?

All the best!

Cannot get same results for the telescope plugin

First of all, thank you for the zf project. I really like it!

The issue I'm facing is that I can't seem to get the same results for the Telescope plugin when searching with an additional space-delimited token. Here are the screenshots I took with ZF (git ls-files and fd) and Telescope:

fd
git ls
telescope

MacOS 14.3
nvim 0.9.5

zf-native: require("zf-native.health").check()

Installation ~
- libzf library path: .../lib/libzf-osx-arm64.so
- OK libzf path is valid

Configuration
  - zf telescope file sorter enabled
    - highlights: true
    - filename score priority: true
  - zf telescope generic sorter enabled
    - highlights: true
    - filename score priority: false ~

Picker settings:

        pickers = {
          find_files = {
            theme = "dropdown",
            find_command = {
              "fd",
              "--type",
              "f",
              "--color=never",
              "--hidden",
              "--follow",
              "-E",
              ".git/*",
            },

Thank you in advance

Looking for a maintainer

Hi! I hope you are all doing well!

I no longer use Neovim regularly, but I really would like to keep this plugin alive. It's been really simple to maintain, but I worry about the long-term.

So I'm looking for someone willing to step in and maintain this plugin. Either

  1. Someone who is willing to fork and create the new official project or
  2. Someone who wants to co-maintain the project

I think the second is the simplest, and no one has to update their configs to point to a new repository.

If no one steps up, I will try my best to make sure this works for as long as possible. But I won't make any promises. If a future Neovim release would cause an unreasonable amount of work for me to update this plugin, I probably wouldn't update it.

Sorry if that's sad news for anyone, and I apologize if this breaks someone's workflow someday. I don't think this plugin will stop working anytime soon, but if it does... ๐Ÿ˜ฌ

Probably the biggest risk in this breaking is a breaking change to Telescope.

candidates re-sorted on input with frecency.nvim

hey, there

great plugin y'all got going here. I use it everyday and it works real good

One thing I noticed is that, when used with https://github.com/nvim-telescope/telescope-frecency.nvim the candidates will get re-ordered as the user types an input.

I don't exactly know the sorting algorithm that gets used, but, while prioritizing basename as expected, the relative order of candidates won't stick.

I've tried this by inputting "wiki" to match the .wiki extension and the order between wiki files changes. Matching for my input works because I have no "wiki.something" path and "/some/path/file.wiki" has priority over "/wiki/path/file.something", but "/file/I/access/a/lot.wiki" will have lower priority "/other/file/I/have/visited/once.wiki"

I hope I've described the problem ok

Uppercase searching doesn't work

If any query string contains uppercase letters no search results are returned. From the same directory using fd -t f | zf and uppercase letters works fine, so it seems the bug is in the interface between telescope and libzf, not in zf itself.

`initial_sort` should not be applied to `oldfiles`

I noticed that the initial_sort for files also affects the oldfiles picker. This is somewhat unfortunate, since oldfiles is the one picker where the initial order of files actually makes sense as they are sorted by recency.

Applying the initial sort here basically makes the oldfiles picker worse. Could the oldfiles picker therefore be excluded from initial_sort?

no such file or directory: libzf.so

Love your algorithm, sometimes fzf gets very annoying. I'm already getting better matches in the terminal!
The zf repo generates an executable, how do I build the library?

Ability to enhance sorting (e.g. MRU/recent files first in results)

Hi, I love your sorter! Finally something which prioritizes the proper parts in paths.

But I would like to merge three pickers which I often use and I hate that I need THREE of them separately:

  • oldfiles (because I want to browse recent files but it doesn't show already opened buffers so I need the next one in the list)
  • buffers (so I can browse in opened buffers but if I don't have the demanded file open or it's not in old_files then I would like to search in all files and that is the last one in this list)
  • find_files

I think that if I can prioritize recently used buffers/files in the sorted result then I don't have to switch between pickers.

Is that already possible with your sorter or not? :) Or if you can point me to the right direction where I should investigate of how to do it..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.