Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(builtin): support vscode snippet variable CURRENT_TIMEZONE_OFFSET #1091

Merged
merged 3 commits into from
Dec 17, 2023

Conversation

yuanji-dev
Copy link
Contributor

CURRENT_TIMEZONE_OFFSET was added since April 2023 (version 1.78) in vscode.

Also Snippets in Visual Studio Code the doc here mentions:

CURRENT_TIMEZONE_OFFSET The current UTC time zone offset as +HH:MM or -HH:MM (example -07:00).

This PR is to support the variable in LuaSnip.

@L3MON4D3
Copy link
Owner

Hey, thanks for the contribution!
Could you exchange os.data("%z") with the more portable version described here? Seems like windows doesn't support "%z" :/

@L3MON4D3
Copy link
Owner

I think it'd be best to put that function into a new file, util/time.lua. But util/util.lua would also be fine

@yuanji-dev
Copy link
Contributor Author

Hi @L3MON4D3
Thanks for your review, I tried to update the code based on your feedback, could you please take a look again?

@L3MON4D3
Copy link
Owner

L3MON4D3 commented Dec 17, 2023

Ah yes!
Looks perfect, thank you very much!

@L3MON4D3 L3MON4D3 merged commit 57c9f5c into L3MON4D3:master Dec 17, 2023
@yuanji-dev yuanji-dev deleted the dev branch December 26, 2023 03:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants