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: filename now supports oil.nvim #1298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tronikelis
Copy link
Contributor

#1077

This PR adds filename support for oil.nvim, so it's no longer the full path but how the user specified the path to be shown

To be honest this is kind of a selfish PR where I am modifying the vanilla component, and as I said in my previous PR it would be better to somehow extract this logic for the user to write himself, but maybe that's too much effort

@cgimenes
Copy link

Why isn't this done inside the oil extension?

@tronikelis
Copy link
Contributor Author

Why isn't this done inside the oil extension?

Is it possible to do this easily? When I implemented this I remember checking out extensions and seeing some blocker that I can't recall.

If possible yeah, this should be an extension, but the only way I see is somehow extending the current filename to add support

@cgimenes
Copy link

I don't think we would really need the filename component. AFAIK something like this would work as a custom component inside de oil extension:

function() {
      -- proper module exists validation
      local oil = require 'oil'
      return oil.get_current_dir() .. oil.get_cursor_entry().name
}

@tronikelis
Copy link
Contributor Author

I don't think we would really need the filename component. AFAIK something like this would work as a custom component inside de oil extension:

function() {
      -- proper module exists validation
      local oil = require 'oil'
      return oil.get_current_dir() .. oil.get_cursor_entry().name
}

The filename component automatically shrinks the path when it does not fit, without it I wouldn't be able to read the path when in a terminal split most of the time, without that it's not even worth adding it imo.

Your solution would show the full path all the time

@cgimenes
Copy link

I see. So, we could move this shrinking logic to another place for it to be reusable. What do you think?

@tronikelis
Copy link
Contributor Author

I see. So, we could move this shrinking logic to another place for it to be reusable. What do you think?

That's one solution, but we are not really solving the root problem, the root problem is that getting the current directory should be exposed to the global config somehow, then everything would just work

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.

2 participants