Giter Club home page Giter Club logo

Comments (17)

raghur avatar raghur commented on May 29, 2024

When there's no input, fruzzy native mod sorts the files by least levenshtein distance ascending. It also removes the current file from the list. This is done so that you can bounce between similar files (x.py/x_test.py or .h/.cpp) quickly.

The python version does not do this since levenshtein libraries require a native mod and I don't want to complicate the installation.

Another thing I've noticed is that when using the native version I get the following message before executing a denite source:

That log is emitted once at initialization and is there to aid me in debugging when folks report issues :)

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

I think the debug log should be option.
It should not printed always.

from fruzzy.

raghur avatar raghur commented on May 29, 2024

I think the debug log should be option.
It should not printed always.

More options => more complications. Also for something this trivial and echo'ed once per vim/nvim instance, I'm going to keep it the way it is.

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

I don't like the option too. But I don't like the echo message.

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

I think logger.debug()γ€€is better for it.

from fruzzy.

raghur avatar raghur commented on May 29, 2024

logger.debug is useful during development - but that needs NVIM_PYTHON_LOG_LEVEL and NVIM_PYTHON_LOG_FILE to be set. Giving instructions to folks who're looking for support to setup logging and then grep through a huge log file vs "Hey - tell me what you see in :messages" is the difference.

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

Yes. But it is only used for debug.
It should not printed always.

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

If it is error, it should be printed always.
But the message is not.

from fruzzy.

raghur avatar raghur commented on May 29, 2024

I don't think we're going to agree on this :). While I see your point, for me, user convenience trumps other aspects. However, I'll think about adding something like fruzzy#version() to print out the revision

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

fruzzy#version()γ€€is better for me.

from fruzzy.

petobens avatar petobens commented on May 29, 2024

When there's no input, fruzzy native mod sorts the files by least levenshtein distance ascending. It also removes the current file from the list. This is done so that you can bounce between similar files (x.py/x_test.py or .h/.cpp) quickly.
The python version does not do this since levenshtein libraries require a native mod and I don't want to complicate the installation.

Can I disable this behaviour while still use the native mod? Also I read your post but I'm not quite sure if there are, at a user level, noticeable differences between the python version and the native. In other words, if there aren't big differences and you prefer not to change this initial sorting setting then my question is: do I loose any feature of the matcher by using the python version instead of the native one? Once again thanks!

from fruzzy.

Shougo avatar Shougo commented on May 29, 2024

I don't think the behavior is so useful...

from fruzzy.

raghur avatar raghur commented on May 29, 2024

Can I disable this behaviour while still use the native mod?

Not at the moment.

I'm not quite sure if there are, at a user level, noticeable differences between the python version and the native.

There are no differences other than this. Both have to pass the same tests. I'll probably add an option so that users can opt out if they want (till then you can switch to python version)

I don't think the behavior is so useful...

I actually sort of agree. When it works, it's really useful. When it doesn't, it leaves me head scratching. Till now I've found out that it doesn't work well with neomru (since that uses absolute paths). It seems to work well with file/file_rec though. Also, on windows, it seems to be more wonky due to path separator differences.

from fruzzy.

raghur avatar raghur commented on May 29, 2024

Can I disable this behaviour while still use the native mod?

pull from master now. Set g:fruzzy#sortonempty=0 in your .vimrc. You can use it with the native mod now.

from fruzzy.

petobens avatar petobens commented on May 29, 2024

@raghur thanks for the change. However I'm trying with

let g:fruzzy#sortonempty=0

but entries are still sorted relative to the current file when using Denite file_mru. Can you reproduce this?

Edit: oh you already said that in your comment. So this is expected? (i.e it's a feature rather than a bug?)

from fruzzy.

raghur avatar raghur commented on May 29, 2024

There was a bug that would have sorted entries even when sort on empty was set. I've now fixed Pls update and check.

from fruzzy.

petobens avatar petobens commented on May 29, 2024

Thank you!

from fruzzy.

Related Issues (16)

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.