Skip to content

Commit

Permalink
Update settings and documentation
Browse files Browse the repository at this point in the history
`remark-language-server` 3 adds a new setting.
  • Loading branch information
remcohaszing committed Apr 16, 2024
1 parent 6819726 commit 1113b4e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@
}
},
"contributes": {
"configuration": {
"title": "remark",
"properties": {
"remark.requireConfig": {
"type": "boolean",
"default": false,
"markdownDescription": "If true, only perform actions if a [configuration file](https://github.com/remarkjs/remark-language-server#configuration-file) is found."
}
}
},
"jsonValidation": [
{
"fileMatch": [
Expand Down
30 changes: 30 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Visual Studio Code extension to format and lint markdown files with remark.
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [Configuration file](#configuration-file)
* [Settings](#settings)
* [Formatting](#formatting)
* [Plugins](#plugins)
* [Compatibility](#compatibility)
Expand Down Expand Up @@ -72,6 +74,32 @@ Here’s an example that should produce problems you can use to verify:
1) Hello, _Jupiter_ and *Neptune*!
```

## Configuration file

`remark-language-server` uses the same configuration files as
[`remark-cli`][remark-cli].
These files are:

* `.remarkrc`
* `.remarkrc.cjs`
* `.remarkrc.js`
* `.remarkrc.json`
* `.remarkrc.mjs`
* `.remarkrc.yaml`
* `.remarkrc.yml`
* `package.json`

Language clients should notify the language server if these files change.
They are looked up starting at the folder where the checked markdown file
exists.

## Settings

This extension supports the following settings:

* `remark.requireConfig` (`boolean`, default: `false`) — If true, only perform
actions if a [configuration file][configuration-file] is found.

## Formatting

This extension can format markdown files.
Expand Down Expand Up @@ -141,6 +169,8 @@ abide by its terms.

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

[configuration-file]: #configuration-file

[downloads-badge]: https://img.shields.io/visual-studio-marketplace/d/unifiedjs.vscode-remark

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

0 comments on commit 1113b4e

Please sign in to comment.