-
Notifications
You must be signed in to change notification settings - Fork 432
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
feature request: fileExtension type setting for html #703
Comments
I am also finding it a bit challenging to locally edit html with special GAS syntax. I would love a custom file formatter for VS Code, as a possible new feature? There is a similar vs-code extension for handling django-html: Additional links: |
I don't know how to create a new syntax checker but I know it is possible. Once the file extension is changed there are ways to specify the syntax checker to use. |
I took a first stab at this and made a VSCode extension that can be manually installed, which extends the grammar for html files to partially handle GAS syntax. It's a bit clunky and limited, but you can check it out: The better solution would be define a new language, eg, ghtml, with a more robust definition. Note: I know this doesn't directly relate to clasp but this is tooling that I think would support clasp and would improve the local development experience. |
Love it. This is great. I will check it out when I get a moment. Consider tagging this issue in your README so folks who come across yours can come vote on this. :) |
Made some improvements: Now the extension adds It works a little bit! Bit it's fairly buggy & limited. Help & feedback welcome. |
So I was looking through the code and see where (I think) the necessary changes need to be made to support an option to save |
I got this working for pulling (custom html extension). I'm working on push but have to modify some other code too. See #884 884 |
- Fixed issues with `fileExtension` (see google#884) - Added `htmlExtension` for a custom HTML file extension (see google#703)
So I think I got it. I don't know Typescript that well but it seems to work. I don't want to submit a pull request until someone can help me test? What I did:
|
@imthenachoman just stumbled upon this issue myself and found this feature request. Is the above still your preferred solution? |
@TommyJay337 Yes. Why do you ask? |
@imthenachoman Simply curiosity, it seemed like a dead end as your PRs seemed untouched. This may or may not be the correct place to ask, but: If I wanted to test out your version of Clasp, how would one go about doing so? I assume that I would have to initially uninstall google/clasp. |
To be honest, the entire
You should be able to follow |
@imthenachoman unfortunate. Thank you very much for the instructions, it seems everything works as intended. However, if I attempt to use htmlExtension or fileExtension I get an error:
Would you happen to have any troubleshooting ideas? Note: |
|
I don't know TypeScript. It took me a while to reverse engineer Honestly, I've given up on them merging my PR. :/ |
I think it would be helpful to be able to specify the local file extension for
html
files. We can already do this with thegs
files usingfileExtension
and I think we just need one forhtml
files.The whole purpose of
clasp
is to make it easier to edit locally. GAShtml
files are not typicalhtml
files but because they have ahtml
extension any editor/IDE will treat them as anhtml
file.If we could specify our own extension, like
gtml
then we can use file extension association with our IDEs to treat it differently. For example, to accommodate syntax highlighting for scriptlets and auto-complete.Expected Behavior
A settings option to specify what file extension
html
files should be locally.Actual Behavior
N/A
Steps to Reproduce the Problem
N/A
Specifications
node -v
): v10.16.2clasp -v
): 2.2.1The text was updated successfully, but these errors were encountered: