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

Add parent as a detection method #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

archiif
Copy link

@archiif archiif commented Aug 7, 2022

This detection method simply sets the current working directory to the parent directory of the current file. Useful as a fallback when you are dealing with simple and generic projects that lsp and pattern can't meaningfully detect.
Also, the parent directory regex originally ended up producing results such as C: or D: on Windows, which fs_scandir for some reason interprets as the current working directory. So to fix that, the new regex will always produce paths that ends with a / when it successfully finds a parent directory.

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.

1 participant