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: add templ diagnose command #840

Merged
merged 5 commits into from
Jul 8, 2024
Merged

feat: add templ diagnose command #840

merged 5 commits into from
Jul 8, 2024

Conversation

a-h
Copy link
Owner

@a-h a-h commented Jul 8, 2024

We're getting a number of reports where people are running a different version of templ than they think they are, or their environment is not set up correctly.

This PR adds a new templ diagnose command to assist with diagnosis of faults.

There's also a JSON mode, which is intended for use by the VS Code and Neovim extensions. The extensions should be upgraded to run this new command (templ diagnose -json) from within the context of the extension, thereby showing users the state of the environment that's visible to the editor, rather than the shell that they run commands at.

@a-h a-h requested a review from joerdav July 8, 2024 09:31
Copy link
Collaborator

@joerdav joerdav left a comment

Choose a reason for hiding this comment

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

Nice! I may have called it templ check as this is similar to other tools I've used to check your env. But I think it is fine as is.

@a-h
Copy link
Owner Author

a-h commented Jul 8, 2024

I think check sounds better, since diagnose is a more complex word, plus, it clashes with LSP diagnostic warnings.

I'll update it.

@a-h
Copy link
Owner Author

a-h commented Jul 8, 2024

Actually, maybe info is a better name. Check also sounds like it could be something that works on files.

@joerdav
Copy link
Collaborator

joerdav commented Jul 8, 2024

Info is fine too, for reference the neovim equivalent command is :checkhealth

@a-h
Copy link
Owner Author

a-h commented Jul 8, 2024

OK, I think that's it.

@a-h a-h merged commit a98204d into main Jul 8, 2024
6 checks passed
@a-h a-h deleted the diagnose_command branch July 8, 2024 10:04
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