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

Handle LaTeX files with non .tex extension #4466

Merged
merged 4 commits into from
Nov 25, 2024
Merged

Handle LaTeX files with non .tex extension #4466

merged 4 commits into from
Nov 25, 2024

Conversation

jlelong
Copy link
Collaborator

@jlelong jlelong commented Nov 21, 2024

Related to #4457

This PR adds a new configuration variable to let the user specify file extensions to be treated as LaTeX files similarly to .tex files.

@James-Yu What do you think of this very little intrusive approach?

This variable lists all the file extensions that LW will consider as
LaTeX files.
@James-Yu
Copy link
Owner

I’m good with the change, just one thing: it seems that changing the config cannot change the respective behavior on-the-fly, until a vscode reload. May be we move the new ext var to file.ts, and register an onConfigChange handler to change it lively?

@jlelong
Copy link
Collaborator Author

jlelong commented Nov 21, 2024

It is not completely clear to me because allowing to change the value on-the-fly will only work for adding more extensions. Files with extensions that were cached will not be removed from the caching mechanism. So I am a bit hesitating.

@James-Yu
Copy link
Owner

That's mostly for consistency. iirc changes on all other configs are now reflected immediately without the need of reload. Further, I ignored the impact on caches when changing the config. It might be more complex than I thought.

@jlelong
Copy link
Collaborator Author

jlelong commented Nov 22, 2024

Fine. I completely agree with the consistency argument. I will make the appropriate changes.

@jlelong jlelong marked this pull request as draft November 23, 2024 07:39
@jlelong
Copy link
Collaborator Author

jlelong commented Nov 23, 2024

Thanks for the tests.
I still need to think of it a little as currently building will not work properly because of langId computation.

This is required to enable the recipe mechanism
@jlelong jlelong marked this pull request as ready for review November 23, 2024 16:35
@jlelong
Copy link
Collaborator Author

jlelong commented Nov 23, 2024

@James-Yu Everything seems fine to me now. What do you think?

@jlelong jlelong merged commit f819eea into master Nov 25, 2024
11 checks passed
@jlelong jlelong deleted the 4457_extra_ext branch November 25, 2024 05:15
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