Git Product home page Git Product logo

Comments (4)

danielfalk avatar danielfalk commented on August 24, 2024

I think this is consistent in the sense that it's truncating directory names longer than 16 chars. Yeah...it's an odd default that's not called out anywhere, It's using the shorten = 16 option from telescope.nvim.

This is definitely a weakness we have when using terminal-based applications, since we can't use a variable width typeface that would allow us to use so much less space for these.

Ideally there wouldn't need to be any options here because we'd just be able to do the most reasonable thing always. If anybody has any thoughts or examples of some project doing this well, I'd love to know about it.

I don't care for the way telescope shortens directories. I'd much prefer if it only shortens as much as it would need to make the directory fit, but for that, the path_display transformation functions would have to accept an "available length" parameter. At the very least though, I think we can expose an option that allows us to fall back to configuring the display of paths using telescope's options.

from smart-open.nvim.

danielfalk avatar danielfalk commented on August 24, 2024

This change is available on the 0.2.x branch, which is in a sort of pre-release state right now, so if you want to try it out and provide feedback, that would be great. I ended up creating a custom path formatter because I couldn't find anything existing that tried to give as much path information as possible given a space constraint. Also, I switched to using a highlighting class of Directory to give the directory a different color. I like the looks of this, so hopefully it's the correct way to use the highlighting class?

If there's anyone who can provide feedback on this, it would be a big help.

from smart-open.nvim.

lazywei avatar lazywei commented on August 24, 2024

It looks great! I just tried it and I think it works for whatever I have right now. Not sure if there is any edge case but at least it's working for me.
One thing not sure if related to the custom formatter: it seems the results are blinking/refreshing quite a bit whenever I'm typing. Maybe it's due to the refreshing period too short? It's not a big deal just some nitpick.

Thanks for working on this! It's a daily plugin for me :)

from smart-open.nvim.

danielfalk avatar danielfalk commented on August 24, 2024

Implemented on 0.2.x branch.

from smart-open.nvim.

Related Issues (20)

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.