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

Regex to determine path delimiters #612

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

exzolink
Copy link

@exzolink exzolink commented Sep 23, 2024

Fix for #611

Hasn't been tested on Linux, and you might know a better way to fix it.

@Iron-E Iron-E added the bug Something isn't working label Sep 24, 2024
@Iron-E Iron-E linked an issue Sep 24, 2024 that may be closed by this pull request
@Iron-E Iron-E self-requested a review September 24, 2024 13:02
Copy link
Collaborator

@Iron-E Iron-E left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR :) I think this is a good approach! there might be some things that we can do to integrate it more tightly into the codebase. Let me know what your thoughts are on the following:

  1. Neovim 0.8 introduced vim.fs.normalize(), which converts allows for unifying the representation of paths across operating systems.
  2. We have a dedicated fs module filled with filesystem helpers
    • we could implement a fs.split_path based on whether vim.fs.normalize() is available
  3. Then, we can replace instances of splitting filenames over path separators with fs.split

@exzolink
Copy link
Author

Yes, agree, this would be a great solution.

@Iron-E
Copy link
Collaborator

Iron-E commented Sep 25, 2024

Yes, agree, this would be a great solution.

Are you interested in taking a stab at it? I'd be happy to answer any questions

@exzolink
Copy link
Author

I'd glad to help, but right now I don't have enough time to dive into all of this, since I only recently jumped into the Neovim and Lua :)

@Iron-E
Copy link
Collaborator

Iron-E commented Sep 25, 2024

I'd glad to help, but right now I don't have enough time to dive into all of this, since I only recently jumped into the Neovim and Lua :)

That's fair 🙂

I appreciate your time digging into the root cause of the issue; it will make enacting these changes significantly easier!

@Iron-E Iron-E mentioned this pull request Oct 2, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full path in titles with nvim-tree on Windows
2 participants