about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-03-03 09:17:31 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2024-03-03 09:17:31 +0200
commit964e769ffd5df865780e098380a9a4a99360e50b (patch)
tree1ae4054e69d582516ac31f446d05ddc1123ba407 /src/tools/rust-analyzer/editors/code
parent3793e5ba23ca6a57ace8e3e267c22001cc5ef794 (diff)
parent4ef6a49b44e8aa380da7522442234bfd7a52c55e (diff)
downloadrust-964e769ffd5df865780e098380a9a4a99360e50b.tar.gz
rust-964e769ffd5df865780e098380a9a4a99360e50b.zip
Merge commit '4ef6a49b44e8aa380da7522442234bfd7a52c55e' into sync-from-ra
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-rw-r--r--src/tools/rust-analyzer/editors/code/.vscodeignore3
-rw-r--r--src/tools/rust-analyzer/editors/code/language-configuration-rustdoc.json37
-rw-r--r--src/tools/rust-analyzer/editors/code/package.json58
-rw-r--r--src/tools/rust-analyzer/editors/code/rustdoc-inject.json93
-rw-r--r--src/tools/rust-analyzer/editors/code/rustdoc.json82
5 files changed, 15 insertions, 258 deletions
diff --git a/src/tools/rust-analyzer/editors/code/.vscodeignore b/src/tools/rust-analyzer/editors/code/.vscodeignore
index 5c48205694f..09dc27056b3 100644
--- a/src/tools/rust-analyzer/editors/code/.vscodeignore
+++ b/src/tools/rust-analyzer/editors/code/.vscodeignore
@@ -12,6 +12,3 @@
 !ra_syntax_tree.tmGrammar.json
 !server
 !README.md
-!language-configuration-rustdoc.json
-!rustdoc-inject.json
-!rustdoc.json
diff --git a/src/tools/rust-analyzer/editors/code/language-configuration-rustdoc.json b/src/tools/rust-analyzer/editors/code/language-configuration-rustdoc.json
deleted file mode 100644
index c905d3b6067..00000000000
--- a/src/tools/rust-analyzer/editors/code/language-configuration-rustdoc.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-    "comments": {
-        "blockComment": ["<!--", "-->"]
-    },
-    "brackets": [
-        ["{", "}"],
-        ["[", "]"],
-        ["(", ")"]
-    ],
-    "colorizedBracketPairs": [],
-    "autoClosingPairs": [
-        { "open": "{", "close": "}" },
-        { "open": "[", "close": "]" },
-        { "open": "(", "close": ")" }
-    ],
-    "surroundingPairs": [
-        ["(", ")"],
-        ["[", "]"],
-        ["`", "`"],
-        ["_", "_"],
-        ["*", "*"],
-        ["{", "}"],
-        ["'", "'"],
-        ["\"", "\""]
-    ],
-    "folding": {
-        "offSide": true,
-        "markers": {
-            "start": "^\\s*<!--\\s*#?region\\b.*-->",
-            "end": "^\\s*<!--\\s*#?endregion\\b.*-->"
-        }
-    },
-    "wordPattern": {
-        "pattern": "(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})(((\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark})|[_])?(\\p{Alphabetic}|\\p{Number}|\\p{Nonspacing_Mark}))*",
-        "flags": "ug"
-    }
-}
diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json
index 3a1df5a2f90..d86365591a6 100644
--- a/src/tools/rust-analyzer/editors/code/package.json
+++ b/src/tools/rust-analyzer/editors/code/package.json
@@ -671,6 +671,21 @@
                         "string"
                     ]
                 },
+                "rust-analyzer.cargo.targetDir": {
+                    "markdownDescription": "Optional path to a rust-analyzer specific target directory.\nThis prevents rust-analyzer's `cargo check` and initial build-script and proc-macro\nbuilding from locking the `Cargo.lock` at the expense of duplicating build artifacts.\n\nSet to `true` to use a subdirectory of the existing target directory or\nset to a path relative to the workspace to use that path.",
+                    "default": null,
+                    "anyOf": [
+                        {
+                            "type": "null"
+                        },
+                        {
+                            "type": "boolean"
+                        },
+                        {
+                            "type": "string"
+                        }
+                    ]
+                },
                 "rust-analyzer.cargo.unsetTest": {
                     "markdownDescription": "Unsets the implicit `#[cfg(test)]` for the specified crates.",
                     "default": [
@@ -1543,21 +1558,6 @@
                         "type": "string"
                     }
                 },
-                "rust-analyzer.rust.analyzerTargetDir": {
-                    "markdownDescription": "Optional path to a rust-analyzer specific target directory.\nThis prevents rust-analyzer's `cargo check` from locking the `Cargo.lock`\nat the expense of duplicating build artifacts.\n\nSet to `true` to use a subdirectory of the existing target directory or\nset to a path relative to the workspace to use that path.",
-                    "default": null,
-                    "anyOf": [
-                        {
-                            "type": "null"
-                        },
-                        {
-                            "type": "boolean"
-                        },
-                        {
-                            "type": "string"
-                        }
-                    ]
-                },
                 "rust-analyzer.rustc.source": {
                     "markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private\nprojects, or \"discover\" to try to automatically find it if the `rustc-dev` component\nis installed.\n\nAny project which uses rust-analyzer with the rustcPrivate\ncrates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.\n\nThis option does not take effect until rust-analyzer is restarted.",
                     "default": null,
@@ -1758,13 +1758,6 @@
                     "rs"
                 ],
                 "configuration": "language-configuration.json"
-            },
-            {
-                "id": "rustdoc",
-                "extensions": [
-                    ".rustdoc"
-                ],
-                "configuration": "./language-configuration-rustdoc.json"
             }
         ],
         "grammars": [
@@ -1772,27 +1765,6 @@
                 "language": "ra_syntax_tree",
                 "scopeName": "source.ra_syntax_tree",
                 "path": "ra_syntax_tree.tmGrammar.json"
-            },
-            {
-                "language": "rustdoc",
-                "scopeName": "text.html.markdown.rustdoc",
-                "path": "rustdoc.json",
-                "embeddedLanguages": {
-                    "meta.embedded.block.html": "html",
-                    "meta.embedded.block.markdown": "markdown",
-                    "meta.embedded.block.rust": "rust"
-                }
-            },
-            {
-                "injectTo": [
-                    "source.rust"
-                ],
-                "scopeName": "comment.markdown-cell-inject.rustdoc",
-                "path": "rustdoc-inject.json",
-                "embeddedLanguages": {
-                    "meta.embedded.block.rustdoc": "rustdoc",
-                    "meta.embedded.block.rust": "rust"
-                }
             }
         ],
         "problemMatchers": [
diff --git a/src/tools/rust-analyzer/editors/code/rustdoc-inject.json b/src/tools/rust-analyzer/editors/code/rustdoc-inject.json
deleted file mode 100644
index 7a4498fea9d..00000000000
--- a/src/tools/rust-analyzer/editors/code/rustdoc-inject.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
-    "injectionSelector": "L:source.rust -string -comment -meta.embedded.block.rustdoc.md",
-    "patterns": [
-        {
-            "include": "#triple-slash"
-        },
-        {
-            "include": "#double-slash-exclamation"
-        },
-        {
-            "include": "#slash-start-exclamation"
-        },
-        {
-            "include": "#slash-double-start"
-        }
-    ],
-    "repository": {
-        "triple-slash": {
-            "begin": "(^|\\G)\\s*(///) ?",
-            "captures": {
-                "2": {
-                    "name": "comment.line.double-slash.rust"
-                }
-            },
-            "name": "comment.quote_code.triple-slash.rust",
-            "contentName": "meta.embedded.block.rustdoc",
-            "patterns": [
-                {
-                    "include": "text.html.markdown.rustdoc"
-                }
-            ],
-            "while": "(^|\\G)\\s*(///) ?"
-        },
-        "double-slash-exclamation": {
-            "begin": "(^|\\G)\\s*(//!) ?",
-            "captures": {
-                "2": {
-                    "name": "comment.line.double-slash.rust"
-                }
-            },
-            "name": "comment.quote_code.double-slash-exclamation.rust",
-            "contentName": "meta.embedded.block.rustdoc",
-            "patterns": [
-                {
-                    "include": "text.html.markdown.rustdoc"
-                }
-            ],
-            "while": "(^|\\G)\\s*(//!) ?"
-        },
-        "slash-start-exclamation": {
-            "begin": "(^)(/\\*!) ?$",
-            "captures": {
-                "2": {
-                    "name": "comment.block.rust"
-                }
-            },
-            "name": "comment.quote_code.slash-start-exclamation.rust",
-            "contentName": "meta.embedded.block.rustdoc",
-            "patterns": [
-                {
-                    "include": "text.html.markdown.rustdoc"
-                }
-            ],
-            "end": "( ?)(\\*/)"
-        },
-        "slash-double-start": {
-            "name": "comment.quote_code.slash-double-start-quote-star.rust",
-            "begin": "(?:^)\\s*/\\*\\* ?$",
-            "end": "\\*/",
-            "patterns": [
-                {
-                    "include": "#quote-star"
-                }
-            ]
-        },
-        "quote-star": {
-            "begin": "(^|\\G)\\s*(\\*(?!/)) ?",
-            "captures": {
-                "2": {
-                    "name": "comment.punctuation.definition.quote_code.slash-star.MR"
-                }
-            },
-            "contentName": "meta.embedded.block.rustdoc",
-            "patterns": [
-                {
-                    "include": "text.html.markdown.rustdoc"
-                }
-            ],
-            "while": "(^|\\G)\\s*(\\*(?!/)) ?"
-        }
-    },
-    "scopeName": "comment.markdown-cell-inject.rustdoc"
-}
diff --git a/src/tools/rust-analyzer/editors/code/rustdoc.json b/src/tools/rust-analyzer/editors/code/rustdoc.json
deleted file mode 100644
index cecfae9d753..00000000000
--- a/src/tools/rust-analyzer/editors/code/rustdoc.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
-    "name": "rustdoc",
-    "patterns": [
-        {
-            "include": "#fenced_code_block"
-        },
-        {
-            "include": "#markdown"
-        }
-    ],
-    "scopeName": "text.html.markdown.rustdoc",
-    "repository": {
-        "markdown": {
-            "patterns": [
-                {
-                    "include": "text.html.markdown"
-                }
-            ]
-        },
-        "fenced_code_block": {
-            "patterns": [
-                {
-                    "include": "#fenced_code_block_rust"
-                },
-                {
-                    "include": "#fenced_code_block_unknown"
-                }
-            ]
-        },
-        "fenced_code_block_rust": {
-            "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|not run|not_run)?((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
-            "name": "markup.fenced_code.block.markdown",
-            "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
-            "beginCaptures": {
-                "3": {
-                    "name": "punctuation.definition.markdown"
-                },
-                "4": {
-                    "name": "fenced_code.block.language.markdown"
-                },
-                "5": {
-                    "name": "fenced_code.block.language.attributes.markdown"
-                }
-            },
-            "endCaptures": {
-                "3": {
-                    "name": "punctuation.definition.markdown"
-                }
-            },
-            "patterns": [
-                {
-                    "begin": "(^|\\G)(\\s*)(.*)",
-                    "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
-                    "contentName": "meta.embedded.block.rust",
-                    "patterns": [
-                        {
-                            "include": "source.rust"
-                        }
-                    ]
-                }
-            ]
-        },
-        "fenced_code_block_unknown": {
-            "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`~]+)?$)",
-            "beginCaptures": {
-                "3": {
-                    "name": "punctuation.definition.markdown"
-                },
-                "4": {
-                    "name": "fenced_code.block.language"
-                }
-            },
-            "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
-            "endCaptures": {
-                "3": {
-                    "name": "punctuation.definition.markdown"
-                }
-            },
-            "name": "markup.fenced_code.block.markdown"
-        }
-    }
-}