Skip to content

Commit 1113b4e

Browse files
committed
Update settings and documentation
`remark-language-server` 3 adds a new setting.
1 parent 6819726 commit 1113b4e

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@
102102
}
103103
},
104104
"contributes": {
105+
"configuration": {
106+
"title": "remark",
107+
"properties": {
108+
"remark.requireConfig": {
109+
"type": "boolean",
110+
"default": false,
111+
"markdownDescription": "If true, only perform actions if a [configuration file](https://github.com/remarkjs/remark-language-server#configuration-file) is found."
112+
}
113+
}
114+
},
105115
"jsonValidation": [
106116
{
107117
"fileMatch": [

readme.md

+30
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Visual Studio Code extension to format and lint markdown files with remark.
1414
* [When should I use this?](#when-should-i-use-this)
1515
* [Install](#install)
1616
* [Use](#use)
17+
* [Configuration file](#configuration-file)
18+
* [Settings](#settings)
1719
* [Formatting](#formatting)
1820
* [Plugins](#plugins)
1921
* [Compatibility](#compatibility)
@@ -72,6 +74,32 @@ Here’s an example that should produce problems you can use to verify:
7274
1) Hello, _Jupiter_ and *Neptune*!
7375
```
7476

77+
## Configuration file
78+
79+
`remark-language-server` uses the same configuration files as
80+
[`remark-cli`][remark-cli].
81+
These files are:
82+
83+
* `.remarkrc`
84+
* `.remarkrc.cjs`
85+
* `.remarkrc.js`
86+
* `.remarkrc.json`
87+
* `.remarkrc.mjs`
88+
* `.remarkrc.yaml`
89+
* `.remarkrc.yml`
90+
* `package.json`
91+
92+
Language clients should notify the language server if these files change.
93+
They are looked up starting at the folder where the checked markdown file
94+
exists.
95+
96+
## Settings
97+
98+
This extension supports the following settings:
99+
100+
* `remark.requireConfig` (`boolean`, default: `false`) — If true, only perform
101+
actions if a [configuration file][configuration-file] is found.
102+
75103
## Formatting
76104

77105
This extension can format markdown files.
@@ -141,6 +169,8 @@ abide by its terms.
141169

142170
[build]: https://github.com/remarkjs/vscode-remark/actions
143171

172+
[configuration-file]: #configuration-file
173+
144174
[downloads-badge]: https://img.shields.io/visual-studio-marketplace/d/unifiedjs.vscode-remark
145175

146176
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg

0 commit comments

Comments
 (0)