From 5db904498226533c50c2fefcf7d2d6331b361aeb Mon Sep 17 00:00:00 2001 From: Randy Lai Date: Sun, 20 Apr 2025 21:40:29 -0700 Subject: [PATCH 1/2] Move R and R markdown syntaxes to vscode-R-syntax --- CODE_OF_CONDUCT.md | 46 --- LICENSE | 2 +- PULL_REQUEST_TEMPLATE.md | 5 - README.md | 7 +- ThirdPartyNotices.txt | 33 -- package-lock.json | 8 +- package.json | 9 +- syntax/Markdown Redcarpet.json | 146 --------- syntax/RMarkdown.json | 13 - syntax/r.json | 531 --------------------------------- webpack.config.js | 81 ++--- 11 files changed, 55 insertions(+), 826 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 PULL_REQUEST_TEMPLATE.md delete mode 100644 ThirdPartyNotices.txt delete mode 100644 syntax/Markdown Redcarpet.json delete mode 100644 syntax/RMarkdown.json delete mode 100644 syntax/r.json diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 005e54073..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, 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 both within project spaces and in public spaces when an individual is representing the project or its community. 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 . The project team will review and investigate all complaints, and will respond in a way that it deems 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 [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/LICENSE b/LICENSE index e3e6dfca4..bd31956d6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 REditorSupport +Copyright (c) 2025 REditorSupport Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 62ba3cedc..000000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -# What problem did you solve? - -## (If you have)Screenshot - -## (If you do not have screenshot) How can I check this pull request? diff --git a/README.md b/README.md index fc7460c16..a2a3671fa 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ [![Badge](https://aka.ms/vsls-badge)](https://aka.ms/vsls) -This [VS Code](https://code.visualstudio.com/) extension provides support for the [R programming language](https://www.r-project.org), including features such as -extended syntax highlighting, R language service based on code analysis, interacting with R terminals, viewing data, plots, workspace variables, help pages, managing packages, and working with [R Markdown](https://rmarkdown.rstudio.com/) documents. +This [VS Code](https://code.visualstudio.com/) extension provides support for the [R programming language](https://www.r-project.org), including features such as R language service based on code analysis, interacting with R terminals, viewing data, plots, workspace variables, help pages, managing packages, and working with [R Markdown](https://rmarkdown.rstudio.com/) documents. + +The R and R Markdown syntaxes are located in a slibing package [vscode-R-syntax](https://github.com/REditorSupport/vscode-R-syntax). Go to the [wiki](https://github.com/REditorSupport/vscode-R/wiki) to view the documentation of the extension. @@ -33,8 +34,6 @@ Go to the installation wiki pages ([Windows](https://github.com/REditorSupport/v ## Features -* Extended syntax highlighting for R, R Markdown, and R Documentation. - * Snippets for R and R Markdown. * [R Language Service](https://github.com/REditorSupport/vscode-R/wiki/R-Language-Service): Code completion, function signature, symbol highlight, document outline, formatting, definition, diagnostics, references, and more. diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt deleted file mode 100644 index a81c7684a..000000000 --- a/ThirdPartyNotices.txt +++ /dev/null @@ -1,33 +0,0 @@ -THIRD-PARTY SOFTWARE NOTICES AND INFORMATION - -This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Yuki Ueda received such components are set forth below. Yuki Ueda reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. - -1. microsoft/vscode 1.43 (https://github.com/microsoft/vscode) - -%% microsoft/vscode NOTICES AND INFORMATION BEGIN HERE -========================================= -MIT License - -Copyright (c) 2015 - present Microsoft Corporation - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================= -END OF microsoft/vscode NOTICES AND INFORMATION diff --git a/package-lock.json b/package-lock.json index ecf465c06..47e724ad6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "r", - "version": "2.8.5", + "version": "2.8.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "r", - "version": "2.8.5", + "version": "2.8.6", "license": "SEE LICENSE IN LICENSE", "dependencies": { "ag-grid-community": "^31.3.2", @@ -49,8 +49,8 @@ "sinon": "^15.0.1", "ts-loader": "^9.3.1", "typescript": "^4.7.2", - "webpack": "^5.76.0", - "webpack-cli": "^4.7.2" + "webpack": "^5.99.6", + "webpack-cli": "^4.10.0" }, "engines": { "vscode": "^1.75.0" diff --git a/package.json b/package.json index 2bd6a4dbc..9fa5dd896 100644 --- a/package.json +++ b/package.json @@ -2111,8 +2111,8 @@ "sinon": "^15.0.1", "ts-loader": "^9.3.1", "typescript": "^4.7.2", - "webpack": "^5.76.0", - "webpack-cli": "^4.7.2" + "webpack": "^5.99.6", + "webpack-cli": "^4.10.0" }, "dependencies": { "ag-grid-community": "^31.3.2", @@ -2129,5 +2129,8 @@ "vscode-languageclient": "^9.0.1", "vsls": "^1.0.4753", "winreg": "^1.2.4" - } + }, + "extensionDependencies": [ + "REditorSupport.r-syntax" + ] } diff --git a/syntax/Markdown Redcarpet.json b/syntax/Markdown Redcarpet.json deleted file mode 100644 index 290833aef..000000000 --- a/syntax/Markdown Redcarpet.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "fileTypes" : [], - "injectionSelector" : "L:text.html.rmarkdown", - "patterns" : [ - {"include" :"#block"}, - {"include" : "#inline"} - ], - "repository" : { - "block" : { - "patterns" : [ - {"include" : "#fenced_block_r"}, - {"include" : "#fenced_block_c"}, - {"include" : "#fenced_block_cpp"}, - {"include" : "#fenced_block_yaml"}, - {"include" : "#fenced_block"}, - {"include" : "#fenced_block_julia"}, - {"include" : "#fenced_block_stan"}, - {"include" : "#fenced_block_python"}, - {"include" : "#fenced_block_sql"}, - {"include" : "#fenced_block_css"}, - {"include" : "#fenced_block_scss"}, - {"include" : "#fenced_block_js"}, - {"include" : "#link-def"}, - {"include" : "#html"}, - {"include" : "#paragraph"} - ], - "repository" : { - "fenced_block_c" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:c|C)\\s*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.c", - "patterns" : [ - {"include" : "source.c"} - ] - }, - "fenced_block_cpp" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:cpp|c\\+\\+|C\\+\\+).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.cpp", - "patterns" : [ - {"include" : "source.cpp"} - ] - }, - "fenced_block_r" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:r|R).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.r", - "patterns" : [ - {"include" : "source.r"} - ] - }, - "fenced_block_yaml" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:yaml|YAML).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.yaml", - "patterns" : [ - {"include" : "source.yaml"} - ] - }, - "fenced_block_julia" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:julia).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.julia", - "patterns" : [ - {"include" : "source.julia"} - ] - }, - "fenced_block_stan" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:stan).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.stan", - "patterns" : [ - {"include" : "source.stan"} - ] - }, - "fenced_block_python" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:python).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.python", - "patterns" : [ - {"include" : "source.python"} - ] - }, - "fenced_block_sql" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:sql).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.sql", - "patterns" : [ - {"include" : "source.sql"} - ] - }, - "fenced_block_css" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:css).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.css", - "patterns" : [ - {"include" : "source.css"} - ] - }, - "fenced_block_scss" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:scss).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.css.scss", - "patterns" : [ - {"include" : "source.css.scss"} - ] - }, - "fenced_block_js" : { - "begin" : "(^|\\G)([`]{3})\\{*[ ]*(?:js).*\\}*$", - "end" : "(^|\\G)([`]{3})($|\\z)", - "name" : "meta.embedded.block.js", - "patterns" : [ - {"include" : "source.js"} - ] - } - } - }, - "inline" : { - "patterns" : [ - {"include" : "#code-inline-r"} - ], - "repository" : { - "code-inline-r" : { - "begin" : "(`[r|R][ ]+)", - "beginCaptures" : { - "1" : { - "name" : "punctuation.definition.raw.rmarkdown" - } - }, - "end" : "(`)", - "endCaptures" : { - "1" : { - "name" : "punctuation.definition.raw.rmarkdown" - } - }, - "contentName" : "meta.embedded.block.r", - "patterns" : [ - {"include" : "source.r"} - ] - } - } - } - }, - "scopeName" : "text.html.markdown.redcarpet", - "uuid" : "BE79A69A-B9F5-4BCD-9068-893496E86663" -} diff --git a/syntax/RMarkdown.json b/syntax/RMarkdown.json deleted file mode 100644 index f322648f2..000000000 --- a/syntax/RMarkdown.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "R Markdown", - "scopeName": "text.html.rmarkdown", - "fileTypes": [ - "Rmd", - "rmd" - ], - "patterns": [ - { - "include": "text.html.markdown" - } - ] -} diff --git a/syntax/r.json b/syntax/r.json deleted file mode 100644 index 48b0db057..000000000 --- a/syntax/r.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "fileTypes": [ - "R", - "r", - "S", - "s", - "Rprofile" - ], - "foldingStartMarker": "(\\(\\s*$|\\{\\s*$)", - "foldingStopMarker": "(^\\s*\\)|^\\s*\\})", - "keyEquivalent": "^~R", - "name": "R", - "patterns": [ - { "include": "#roxygen" }, - { "include": "#comments" }, - { "include": "#constants" }, - { "include": "#accessor" }, - { "include": "#operators" }, - { "include": "#keywords" }, - { "include": "#storage-type" }, - { "include": "#strings" }, - { "include": "#brackets" }, - { "include": "#function-declarations" }, - { "include": "#lambda-functions" }, - { "include": "#builtin-functions" }, - { "include": "#function-calls" } - ], - "repository": { - "accessor": { - "patterns": [ - { - "begin": "(\\$)(?=(?:[a-zA-Z._][\\w.]*|`[^`]+`))", - "beginCaptures": { "1": { "name": "keyword.accessor.dollar.r" } }, - "end": "(?!\\G)", - "endCaptures": {}, - "patterns": [ { "include": "#function-calls" } ] - } - ] - }, - "comments": { - "patterns": [ - { - "captures": { - "1": { "name": "comment.line.pragma.r" }, - "2": { "name": "entity.name.pragma.name.r" } - }, - "match": "^(#pragma[ \\t]+mark)[ \\t](.*)", - "name": "comment.line.pragma-mark.r" - }, - { - "begin": "(^[ \\t]+)?(?=#)", - "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.r" } }, - "end": "(?!\\G)", - "patterns": [ - { - "begin": "#", - "beginCaptures": { "0": { "name": "punctuation.definition.comment.r" } }, - "end": "\\n", - "name": "comment.line.number-sign.r" - } - ] - } - ] - }, - "constants": { - "patterns": [ - { - "match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b", - "name": "support.constant.misc.r" - }, - { - "match": "\\b(TRUE|FALSE|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_|Inf|NaN)\\b", - "name": "constant.language.r" - }, - { - "match": "\\b0(x|X)[0-9a-fA-F]+i\\b", - "name": "constant.numeric.imaginary.hexadecimal.r" - }, - { - "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?i\\b", - "name": "constant.numeric.imaginary.decimal.r" - }, - { - "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?i\\b", - "name": "constant.numeric.imaginary.decimal.r" - }, - { - "match": "\\b0(x|X)[0-9a-fA-F]+L\\b", - "name": "constant.numeric.integer.hexadecimal.r" - }, - { - "match": "\\b(?:[0-9]+\\.?[0-9]*)(?:(e|E)(\\+|-)?[0-9]+)?L\\b", - "name": "constant.numeric.integer.decimal.r" - }, - { - "match": "\\b0(x|X)[0-9a-fA-F]+\\b", - "name": "constant.numeric.float.hexadecimal.r" - }, - { - "match": "\\b[0-9]+\\.?[0-9]*(?:(e|E)(\\+|-)?[0-9]+)?\\b", - "name": "constant.numeric.float.decimal.r" - }, - { - "match": "\\.[0-9]+(?:(e|E)(\\+|-)?[0-9]+)?\\b", - "name": "constant.numeric.float.decimal.r" - } - ] - }, - "operators": { - "patterns": [ - { - "match": "%[*/ox]%", - "name": "keyword.operator.arithmetic.r" - }, - { - "match": "(<<-|->>)", - "name": "keyword.operator.assignment.r" - }, - { - "match": "%(between|chin|do|dopar|in|like|\\+replace|\\+|:|T>|<>|>|\\$)%", - "name": "keyword.operator.other.r" - }, - { - "match": "\\.\\.\\.", - "name": "keyword.other.r" - }, - { - "match": ":::?", - "name": "punctuation.accessor.colons.r" - }, - { - "match": "(%%|\\*\\*)", - "name": "keyword.operator.arithmetic.r" - }, - { - "match": "(<-|->)", - "name": "keyword.operator.assignment.r" - }, - { - "match": "\\|>", - "name": "keyword.operator.assignment.redirection.r" - }, - { - "match": "(==|!=|<>|<=?|>=?)", - "name": "keyword.operator.comparison.r" - }, - { - "match": "(&&?|\\|\\|?)", - "name": "keyword.operator.logical.r" - }, - { - "match": ":=", - "name": "keyword.operator.other.r" - }, - { - "match": "[-+*/^]", - "name": "keyword.operator.arithmetic.r" - }, - { - "match": "=", - "name": "keyword.operator.assignment.r" - }, - { - "match": "!", - "name": "keyword.operator.logical.r" - }, - { - "match": "[:~@]", - "name": "keyword.other.r" - }, - { - "match": ";", - "name": "punctuation.terminator.semicolon.r" - } - ] - }, - "keywords": { - "patterns": [ - { - "match": "\\bif\\b(?=\\s*\\()", - "name": "keyword.control.conditional.if.r" - }, - { - "match": "\\belse\\b", - "name": "keyword.control.conditional.else.r" - }, - { - "match": "\\bbreak\\b", - "name": "keyword.control.flow.break.r" - }, - { - "match": "\\bnext\\b", - "name": "keyword.control.flow.continue.r" - }, - { - "match": "\\breturn(?=\\s*\\()", - "name": "keyword.control.flow.return.r" - }, - { - "match": "\\brepeat\\b", - "name": "keyword.control.loop.repeat.r" - }, - { - "match": "\\bfor\\b(?=\\s*\\()", - "name": "keyword.control.loop.for.r" - }, - { - "match": "\\bwhile\\b(?=\\s*\\()", - "name": "keyword.control.loop.while.r" - }, - { - "match": "\\bin\\b", - "name": "keyword.operator.word.r" - } - ] - }, - "storage-type": { - "patterns": [ - { - "begin": "\\b(character|complex|double|expression|integer|list|logical|numeric|single|raw|pairlist)\\b\\s*(\\()", - "beginCaptures": { - "1": { "name": "storage.type.r" }, - "2": { "name": "punctuation.definition.arguments.begin.r" } - }, - "contentName": "meta.function-call.arguments.r", - "end": "(\\))", - "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.r" } }, - "name": "meta.function-call.r", - "patterns": [ { "include": "#function-call-arguments" } ] - } - ] - }, - "strings": { - "patterns": [ - { - "begin": "[rR]\"(-*)\\[", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\]\\1\"", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.double.raw.r" - }, - { - "begin": "[rR]'(-*)\\[", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\]\\1'", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.single.raw.r" - }, - { - "begin": "[rR]\"(-*)\\{", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\}\\1\"", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.double.raw.r" - }, - { - "begin": "[rR]'(-*)\\{", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\}\\1'", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.single.raw.r" - }, - { - "begin": "[rR]\"(-*)\\(", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\)\\1\"", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.double.raw.r" - }, - { - "begin": "[rR]'(-*)\\(", - "beginCaptures": { "0": { "name": "punctuation.definition.string.raw.begin.r" } }, - "end": "\\)\\1'", - "endCaptures": { "0": { "name": "punctuation.definition.string.raw.end.r" } }, - "name": "string.quoted.single.raw.r" - }, - { - "begin": "\"", - "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.r" } }, - "end": "\"", - "endCaptures": { "0": { "name": "punctuation.definition.string.end.r" } }, - "name": "string.quoted.double.r", - "patterns": [ - { - "match": "\\\\.", - "name": "constant.character.escape.r" - } - ] - }, - { - "begin": "'", - "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.r" } }, - "end": "'", - "endCaptures": { "0": { "name": "punctuation.definition.string.end.r" } }, - "name": "string.quoted.single.r", - "patterns": [ - { - "match": "\\\\.", - "name": "constant.character.escape.r" - } - ] - } - ] - }, - "brackets": { - "patterns": [ - { - "begin": "\\(", - "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.r" } }, - "end": "\\)", - "endCaptures": { "0": { "name": "punctuation.section.parens.end.r" } }, - "patterns": [ { "include": "source.r" } ] - }, - { - "begin": "\\[(?!\\[)", - "beginCaptures": { "0": { "name": "punctuation.section.brackets.single.begin.r" } }, - "end": "\\]", - "endCaptures": { "0": { "name": "punctuation.section.brackets.single.end.r" } }, - "patterns": [ { "include": "source.r" } ] - }, - { - "begin": "\\[\\[", - "beginCaptures": { "0": { "name": "punctuation.section.brackets.double.begin.r" } }, - "end": "\\]\\]", - "endCaptures": { "0": { "name": "punctuation.section.brackets.double.end.r" } }, - "contentName": "meta.item-access.arguments.r", - "patterns": [ { "include": "source.r" } ] - }, - { - "begin": "\\{", - "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.r" } }, - "end": "\\}", - "endCaptures": { "0": { "name": "punctuation.section.braces.end.r" } }, - "patterns": [ { "include": "source.r" } ] - } - ] - }, - "function-declarations": { - "patterns": [ - { - "begin": "((?:[a-zA-Z._][\\w.]*|`[^`]+`))\\s*( https://webpack.js.org/configuration/node/ + target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/ - entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ - output: { + entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/ + output: { // the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/ - path: path.resolve(__dirname, 'dist'), - filename: 'extension.js', - libraryTarget: 'commonjs2', - devtoolModuleFilenameTemplate: '../[resource-path]' - }, - devtool: 'source-map', - externals: { - 'utf-8-validate': 'commonjs utf-8-validate', - bufferutil: 'commonjs bufferutil', - vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ - }, - resolve: { + path: path.resolve(__dirname, 'dist'), + filename: 'extension.js', + libraryTarget: 'commonjs2', + devtoolModuleFilenameTemplate: '../[resource-path]' + }, + devtool: 'source-map', + externals: { + 'utf-8-validate': 'commonjs utf-8-validate', + bufferutil: 'commonjs bufferutil', + vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/ + }, + resolve: { // support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader - extensions: ['.ts', '.js'] - }, - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: [ - { - loader: 'ts-loader' - } + extensions: ['.ts', '.js'] + }, + module: { + rules: [ + { + test: /\.ts$/, + exclude: /node_modules/, + use: [ + { + loader: 'ts-loader', + } + ] + } ] - } - ] - }, - plugins: [ - new CopyPlugin({ - patterns: [ - { from: './node_modules/jquery/dist/jquery.min.js', to: 'resources' }, - { from: './node_modules/jquery.json-viewer/json-viewer', to: 'resources' }, - { from: './node_modules/ag-grid-community/dist/ag-grid-community.min.noStyle.js', to: 'resources' }, - { from: './node_modules/ag-grid-community/styles/ag-grid.min.css', to: 'resources' }, - { from: './node_modules/ag-grid-community/styles/ag-theme-balham.min.css', to: 'resources' }, - ] - }), - ], + }, + plugins: [ + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + new CopyPlugin({ + patterns: [ + { from: './node_modules/jquery/dist/jquery.min.js', to: 'resources' }, + { from: './node_modules/jquery.json-viewer/json-viewer', to: 'resources' }, + { from: './node_modules/ag-grid-community/dist/ag-grid-community.min.noStyle.js', to: 'resources' }, + { from: './node_modules/ag-grid-community/styles/ag-grid.min.css', to: 'resources' }, + { from: './node_modules/ag-grid-community/styles/ag-theme-balham.min.css', to: 'resources' }, + ] + }), + ], }; From def4350e2317f72507e37826245839b15a27d3cd Mon Sep 17 00:00:00 2001 From: Randy Lai Date: Tue, 13 May 2025 18:53:46 -0700 Subject: [PATCH 2/2] remove syntax.test --- src/test/suite/syntax.test.ts | 54 -- test/coloriize-results/test_r.json | 1047 ---------------------------- test/colorize-fixtures/test.R | 34 - test/colorize-fixtures/test.Rd | 21 - test/colorize-fixtures/test.Rmd | 22 - 5 files changed, 1178 deletions(-) delete mode 100644 src/test/suite/syntax.test.ts delete mode 100644 test/coloriize-results/test_r.json delete mode 100644 test/colorize-fixtures/test.R delete mode 100644 test/colorize-fixtures/test.Rd delete mode 100644 test/colorize-fixtures/test.Rmd diff --git a/src/test/suite/syntax.test.ts b/src/test/suite/syntax.test.ts deleted file mode 100644 index 59866d665..000000000 --- a/src/test/suite/syntax.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -import { readFileSync } from 'fs'; -import { join } from 'path'; -import * as assert from 'assert'; - -interface syntaxFile { - 'repository': { - 'function-declarations': { - 'patterns': [ - { - 'begin':string - } - ] - } - } -} - - -const extension_root: string = join(__dirname, '..', '..', '..'); - -const r_syntax_file: string = join(extension_root, 'syntax', 'r.json'); -console.log(r_syntax_file); -const rsyntax_raw = readFileSync(r_syntax_file) as unknown; -const rsyntax: syntaxFile = JSON.parse(rsyntax_raw as string) as syntaxFile; - -const function_pattern: string = rsyntax.repository['function-declarations'].patterns[0].begin; - -suite('Syntax Highlighting', () => { - - test('function-declarations - basic match', () => { - const re = new RegExp(function_pattern); - const line = 'x <- function(x) {'; - const match = re.exec(line); - assert.ok(match); - assert.strictEqual(match[3], 'function'); - }); - - test('function-declarations - extra spacing', () => { - const re = new RegExp(function_pattern); - const line = 'x <- function (x) {'; - const match = re.exec(line); - assert.ok(match); - assert.strictEqual(match[3], 'function'); - }); - - test('function-declarations - false function', () => { - const re = new RegExp(function_pattern); - const line = 'x <- functions'; - const match = re.exec(line); - assert.strictEqual(match, null); - }); - -}); diff --git a/test/coloriize-results/test_r.json b/test/coloriize-results/test_r.json deleted file mode 100644 index 563b19781..000000000 --- a/test/coloriize-results/test_r.json +++ /dev/null @@ -1,1047 +0,0 @@ -[ - { - "c": "#", - "t": "source.r comment.line.number-sign.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " © Microsoft. All rights reserved.", - "t": "source.r comment.line.number-sign.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " Add together two numbers.", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "@param", - "t": "source.r comment.line.roxygen.r keyword.other.r", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "x", - "t": "source.r comment.line.roxygen.r variable.parameter.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": " A number.", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "@param", - "t": "source.r comment.line.roxygen.r keyword.other.r", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "y", - "t": "source.r comment.line.roxygen.r variable.parameter.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": " A number.", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "@return", - "t": "source.r comment.line.roxygen.r keyword.other.r", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " The sum of \\code{x} and \\code{y}.", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " ", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "@examples", - "t": "source.r comment.line.roxygen.r keyword.other.r", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " add(1, 1)", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "#'", - "t": "source.r comment.line.roxygen.r punctuation.definition.comment.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": " add(10, 1)", - "t": "source.r comment.line.roxygen.r", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "add", - "t": "source.r meta.function.r entity.name.function.r", - "r": { - "dark_plus": "entity.name.function: #DCDCAA", - "light_plus": "entity.name.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "entity.name.function: #DCDCAA" - } - }, - { - "c": " ", - "t": "source.r meta.function.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "<-", - "t": "source.r meta.function.r keyword.operator.assignment.r", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.r meta.function.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "function", - "t": "source.r meta.function.r keyword.control.r", - "r": { - "dark_plus": "keyword.control: #C586C0", - "light_plus": "keyword.control: #AF00DB", - "dark_vs": "keyword.control: #569CD6", - "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #C586C0" - } - }, - { - "c": "(", - "t": "source.r meta.function.r punctuation.section.parens.begin.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "x", - "t": "source.r meta.function.r meta.function.parameters.r variable.parameter.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ",", - "t": "source.r meta.function.r meta.function.parameters.r punctuation.separator.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r meta.function.r meta.function.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "y", - "t": "source.r meta.function.r meta.function.parameters.r variable.parameter.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": ")", - "t": "source.r meta.function.r punctuation.section.parens.end.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "{", - "t": "source.r punctuation.section.braces.begin.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "x", - "t": "source.r variable.other.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": " ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "+", - "t": "source.r keyword.operator.arithmetic.r", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "y", - "t": "source.r variable.other.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": "}", - "t": "source.r punctuation.section.braces.end.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "add", - "t": "source.r meta.function-call.r variable.function.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": "(", - "t": "source.r meta.function-call.r punctuation.section.parens.begin.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "1", - "t": "source.r meta.function-call.r meta.function-call.arguments.r constant.numeric.float.decimal.r", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.r meta.function-call.r meta.function-call.arguments.r punctuation.separator.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r meta.function-call.r meta.function-call.arguments.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "-", - "t": "source.r meta.function-call.r meta.function-call.arguments.r keyword.operator.arithmetic.r", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": "2", - "t": "source.r meta.function-call.r meta.function-call.arguments.r constant.numeric.float.decimal.r", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.r meta.function-call.r meta.function-call.arguments.r punctuation.separator.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r meta.function-call.r meta.function-call.arguments.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "2.0", - "t": "source.r meta.function-call.r meta.function-call.arguments.r constant.numeric.float.decimal.r", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ")", - "t": "source.r meta.function-call.r punctuation.definition.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "add", - "t": "source.r meta.function-call.r variable.function.r", - "r": { - "dark_plus": "variable: #9CDCFE", - "light_plus": "variable: #001080", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "variable: #9CDCFE" - } - }, - { - "c": "(", - "t": "source.r meta.function-call.r punctuation.section.parens.begin.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "1.0e10", - "t": "source.r meta.function-call.r meta.function-call.arguments.r constant.numeric.float.decimal.r", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ",", - "t": "source.r meta.function-call.r meta.function-call.arguments.r punctuation.separator.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r meta.function-call.r meta.function-call.arguments.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "2.0e10", - "t": "source.r meta.function-call.r meta.function-call.arguments.r constant.numeric.float.decimal.r", - "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" - } - }, - { - "c": ")", - "t": "source.r meta.function-call.r punctuation.definition.parameters.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "paste", - "t": "source.r support.function.r", - "r": { - "dark_plus": "support.function: #DCDCAA", - "light_plus": "support.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.function: #DCDCAA" - } - }, - { - "c": "(", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "\"", - "t": "source.r string.quoted.double.r punctuation.definition.string.begin.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "one", - "t": "source.r string.quoted.double.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "\"", - "t": "source.r string.quoted.double.r punctuation.definition.string.end.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": ", ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "NULL", - "t": "source.r constant.language.r", - "r": { - "dark_plus": "constant.language: #569CD6", - "light_plus": "constant.language: #0000FF", - "dark_vs": "constant.language: #569CD6", - "light_vs": "constant.language: #0000FF", - "hc_black": "constant.language: #569CD6" - } - }, - { - "c": ")", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "paste", - "t": "source.r support.function.r", - "r": { - "dark_plus": "support.function: #DCDCAA", - "light_plus": "support.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.function: #DCDCAA" - } - }, - { - "c": "(", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "NA", - "t": "source.r constant.language.r", - "r": { - "dark_plus": "constant.language: #569CD6", - "light_plus": "constant.language: #0000FF", - "dark_vs": "constant.language: #569CD6", - "light_vs": "constant.language: #0000FF", - "hc_black": "constant.language: #569CD6" - } - }, - { - "c": ", ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "'", - "t": "source.r string.quoted.single.r punctuation.definition.string.begin.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "two", - "t": "source.r string.quoted.single.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "'", - "t": "source.r string.quoted.single.r punctuation.definition.string.end.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": ")", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "paste", - "t": "source.r support.function.r", - "r": { - "dark_plus": "support.function: #DCDCAA", - "light_plus": "support.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.function: #DCDCAA" - } - }, - { - "c": "(", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "\"", - "t": "source.r string.quoted.double.r punctuation.definition.string.begin.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "multi-", - "t": "source.r string.quoted.double.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": " line", - "t": "source.r string.quoted.double.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "\"", - "t": "source.r string.quoted.double.r punctuation.definition.string.end.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": ",", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": " ", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "'", - "t": "source.r string.quoted.single.r punctuation.definition.string.begin.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "multi-", - "t": "source.r string.quoted.single.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": " line", - "t": "source.r string.quoted.single.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": "'", - "t": "source.r string.quoted.single.r punctuation.definition.string.end.r", - "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" - } - }, - { - "c": ")", - "t": "source.r", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - } -] \ No newline at end of file diff --git a/test/colorize-fixtures/test.R b/test/colorize-fixtures/test.R deleted file mode 100644 index 563f9a069..000000000 --- a/test/colorize-fixtures/test.R +++ /dev/null @@ -1,34 +0,0 @@ -# © Microsoft. All rights reserved. - -#' Add together two numbers. -#' -#' @param x A number. -#' @param y A number. -#' @return The sum of \code{x} and \code{y}. -#' @examples -#' add(1, 1) -#' add(10, 1) - - -#' roxygen tag -#' @params x Numeric -f <- function(x) x + 1 - -add <- function(x, y) { - x + y -} - -#region - -print(add(1, -2)) -print(add(1.0e10, 2.0e10)) - -#endregion - -print(paste("one", NULL)) -print(paste(NA, 'two')) - -print(paste("multi- -line", -'multi- -line')) diff --git a/test/colorize-fixtures/test.Rd b/test/colorize-fixtures/test.Rd deleted file mode 100644 index 186f67da9..000000000 --- a/test/colorize-fixtures/test.Rd +++ /dev/null @@ -1,21 +0,0 @@ -\name{add} -\alias{add} -\title{Add together two numbers} -\usage{ -add(x, y) -} -\arguments{ - \item{x}{A number} - - \item{y}{A number} -} -\value{ -The sum of \code{x} and \code{y} -} -\description{ -Add together two numbers -} -\examples{ -add(1, 1) -add(10, 1) -} \ No newline at end of file diff --git a/test/colorize-fixtures/test.Rmd b/test/colorize-fixtures/test.Rmd deleted file mode 100644 index 61b0ecdb9..000000000 --- a/test/colorize-fixtures/test.Rmd +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Viridis Demo" -output: html_document ---- - -```{r include = FALSE} -library(viridis) -``` - -The code below demonstrates two color palettes in the [viridis](https://github.com/sjmgarnier/viridis) package. Each plot displays a contour map of the Maunga Whau volcano in Auckland, New Zealand. - -## Viridis colors - -```{r} -image(volcano, col = viridis(200)) -``` - -## Magma colors - -```{r} -image(volcano, col = viridis(200, option = "A")) -```