From 22caf2308a80d409a27f03da963d30d770903f08 Mon Sep 17 00:00:00 2001 From: "N. V. Lang" Date: Fri, 28 Jun 2024 04:36:29 +0200 Subject: [PATCH] wip --- CODE_OF_CONDUCT.md | 78 + CONTRIBUTING.md | 3 +- .../{sveltex => }/.gitattributes | 0 extras/vscode-extension/.gitignore | 5 + .../{sveltex => }/.vscodeignore | 2 +- extras/vscode-extension/CHANGELOG.md | 7 + extras/vscode-extension/README.md | 58 + .../language-configuration-markdown.json | 37 + .../{sveltex => }/language-configuration.json | 0 extras/vscode-extension/package.json | 175 + extras/vscode-extension/pnpm-lock.yaml | 22 + .../{sveltex => }/res/icon.svg | 0 .../{sveltex => }/res/icon@128.png | Bin extras/vscode-extension/res/icon@256.png | Bin 0 -> 16910 bytes .../res/screenshot-ayu-dark-bordered.png | Bin 0 -> 887492 bytes extras/vscode-extension/scripts/build.mjs | 18 + extras/vscode-extension/src/extension.ts | 89 + extras/vscode-extension/sveltex/CHANGELOG.md | 9 - extras/vscode-extension/sveltex/README.md | 47 - extras/vscode-extension/sveltex/package.json | 84 - .../sveltex/scripts/build.mjs | 17 - .../sveltex/syntaxes/sveltex.tmLanguage.json | 249 - .../sveltex/test.tmLanguage.yml | 0 extras/vscode-extension/sveltex/test.xml | 4941 ----------------- .../sveltex/vsc-extension-quickstart.md | 29 - .../syntaxes/markdown.tmLanguage.yaml | 71 +- .../syntaxes/sveltex.tmLanguage.yaml | 193 +- extras/vscode-extension/tsconfig.json | 16 + 28 files changed, 629 insertions(+), 5521 deletions(-) rename extras/vscode-extension/{sveltex => }/.gitattributes (100%) create mode 100644 extras/vscode-extension/.gitignore rename extras/vscode-extension/{sveltex => }/.vscodeignore (57%) create mode 100644 extras/vscode-extension/CHANGELOG.md create mode 100644 extras/vscode-extension/README.md create mode 100644 extras/vscode-extension/language-configuration-markdown.json rename extras/vscode-extension/{sveltex => }/language-configuration.json (100%) create mode 100644 extras/vscode-extension/package.json create mode 100644 extras/vscode-extension/pnpm-lock.yaml rename extras/vscode-extension/{sveltex => }/res/icon.svg (100%) rename extras/vscode-extension/{sveltex => }/res/icon@128.png (100%) create mode 100644 extras/vscode-extension/res/icon@256.png create mode 100644 extras/vscode-extension/res/screenshot-ayu-dark-bordered.png create mode 100644 extras/vscode-extension/scripts/build.mjs create mode 100644 extras/vscode-extension/src/extension.ts delete mode 100644 extras/vscode-extension/sveltex/CHANGELOG.md delete mode 100644 extras/vscode-extension/sveltex/README.md delete mode 100644 extras/vscode-extension/sveltex/package.json delete mode 100644 extras/vscode-extension/sveltex/scripts/build.mjs delete mode 100644 extras/vscode-extension/sveltex/syntaxes/sveltex.tmLanguage.json delete mode 100644 extras/vscode-extension/sveltex/test.tmLanguage.yml delete mode 100644 extras/vscode-extension/sveltex/test.xml delete mode 100644 extras/vscode-extension/sveltex/vsc-extension-quickstart.md rename extras/vscode-extension/{sveltex => }/syntaxes/markdown.tmLanguage.yaml (96%) rename extras/vscode-extension/{sveltex => }/syntaxes/sveltex.tmLanguage.yaml (60%) create mode 100644 extras/vscode-extension/tsconfig.json diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e69de29..556b1c9 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,78 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at +[security@sveltex.dev](mailto:security@sveltex.dev). All complaints will be +reviewed and investigated and will result in a response that is deemed necessary +and appropriate to the circumstances. The project team is obligated to maintain +confidentiality with regard to the reporter of an incident. Further details of +specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 278efdd..64e04e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,8 @@ To contribute to SvelTeX, fork the repository, create a branch, commit your changes, and submit a pull request. Furthermore: - Please add meaningful tests for your changes that cover all new code paths - and edge cases. If applicable, also add E2E Playwright tests. + and edge cases (exception: VS Code SvelTeX extension). If applicable, also + add E2E Playwright tests. - Please ensure that all tests pass before submitting your pull request. - Please ensure that your code follows the existing code style and formatting. - Please ensure that your code is well-documented, and possibly update diff --git a/extras/vscode-extension/sveltex/.gitattributes b/extras/vscode-extension/.gitattributes similarity index 100% rename from extras/vscode-extension/sveltex/.gitattributes rename to extras/vscode-extension/.gitattributes diff --git a/extras/vscode-extension/.gitignore b/extras/vscode-extension/.gitignore new file mode 100644 index 0000000..21e7941 --- /dev/null +++ b/extras/vscode-extension/.gitignore @@ -0,0 +1,5 @@ +syntaxes/*.json +syntaxes/*.json_default +out +node_modules +external diff --git a/extras/vscode-extension/sveltex/.vscodeignore b/extras/vscode-extension/.vscodeignore similarity index 57% rename from extras/vscode-extension/sveltex/.vscodeignore rename to extras/vscode-extension/.vscodeignore index f369b5e..fc0dc48 100644 --- a/extras/vscode-extension/sveltex/.vscodeignore +++ b/extras/vscode-extension/.vscodeignore @@ -1,4 +1,4 @@ .vscode/** .vscode-test/** .gitignore -vsc-extension-quickstart.md + diff --git a/extras/vscode-extension/CHANGELOG.md b/extras/vscode-extension/CHANGELOG.md new file mode 100644 index 0000000..c0190be --- /dev/null +++ b/extras/vscode-extension/CHANGELOG.md @@ -0,0 +1,7 @@ +# Change Log + +## [1.0.0] - 2024-06-28 + +### Added + +- Added basic support for SvelTeX syntax highlighting. diff --git a/extras/vscode-extension/README.md b/extras/vscode-extension/README.md new file mode 100644 index 0000000..d7212f8 --- /dev/null +++ b/extras/vscode-extension/README.md @@ -0,0 +1,58 @@ +# SvelTeX language support + +This extension adds syntax highlighting intended for [SvelTeX] files. SvelTeX is a +preprocessor for Svelte that aims to combine markdown, Svelte, and (some) LaTeX. + +## Features + +- Svelte + Markdown syntax highlighting (incl. fenced code blocks, though only with ~40 languages). +- Syntax highlighting for math expressions in `$...$`, `$$...$$`, `\(...\)`, and + `\[...\]` delimiters. +- LaTeX syntax highlighting in "LaTeX tags" (configurable). +- Turn off highlighting in "Escape tags" (configurable). +- `