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

goto_file: file path resolution relative to either the workspace or the current file #8126

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

Conversation

cbr9
Copy link
Contributor

@cbr9 cbr9 commented Aug 31, 2023

I'm currently working on a LaTeX project with the following structure:

1282085

The LaTeX compiler (I'm using xelatex) interprets paths relative to the main.tex file (which is at the root of the folder in this case). So even in background/chapters/main.tex, I can't just type ./ssl.tex. Since the PR that implement relative paths in goto_file_impl, if I type mim (match inside the brackets) and then gf in one of the input statements on the left, helix will open the file chapters/background/chapters/background/file.tex. So to select the file I need now takes extra keystrokes.

This PR makes goto_file_impl first check if it can find the file relative to the current working directory, and if it doesn't exist, open it relative to the currently opened file.

@cbr9
Copy link
Contributor Author

cbr9 commented Sep 10, 2023

Anything against this?

@pascalkuthe
Copy link
Member

I think the path relative to the current file should definitely take priority. Also the CWD is not the workspace root (which is what you are currently checking against). Apart from that it's probably fine, We have lots of open PRs, it can take a while until we get around to a review.

@pascalkuthe pascalkuthe added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants