Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to unified-language-server 4 #13

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {createUnifiedLanguageServer} from 'unified-language-server'
process.title = 'remark-language-server'

createUnifiedLanguageServer({
configurationSection: 'remark',
ignoreName: '.remarkignore',
packageField: 'remarkConfig',
pluginPrefix: 'remark',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"index.js"
],
"dependencies": {
"unified-language-server": "^3.0.0"
"unified-language-server": "^4.0.0"
},
"devDependencies": {
"prettier": "^3.0.0",
Expand Down
23 changes: 22 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ A language server to lint and format markdown files with **[remark][]**.
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [Configuration file](#configuration-file)
* [Settings](#settings)
* [Examples](#examples)
* [Emacs](#emacs)
* [Neovim](#neovim)
Expand Down Expand Up @@ -51,6 +53,8 @@ Because this is based on
[`unified-languageserver-node`][unified-languageserver-node], the same features
are supported.

### Configuration file

`remark-language-server` uses the same configuration files as
[`remark-cli`][remark-cli].
These files are:
Expand All @@ -68,6 +72,13 @@ 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 language server supports the following settings:

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

## Examples

### Emacs
Expand All @@ -82,7 +93,11 @@ client.
This means you can add remark language server in one line:

```lua
require'lspconfig'.remark_ls.setup{}
require'lspconfig'.remark_ls.setup {
settings = {
requireConfig = true
}
}
```

`nvim-lspconfig` has
Expand All @@ -100,6 +115,10 @@ if (executable('remark-language-server'))
\ 'name': 'remark',
\ 'cmd': {server_info->['remark-language-server', '--stdio']},
\ 'allowlist': ['markdown'],
\ 'config': lsp_settings#get('remark-language-server', 'config', lsp_settings#server_config('remark-language-server')),
\ 'workspace_config': lsp_settings#get('remark-language-server', 'workspace_config', {
\ 'requireConfig': v:true,
\ }),
\ })
endif
```
Expand Down Expand Up @@ -140,6 +159,8 @@ abide by its terms.

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

[configuration-file]: #configuration-file

[downloads-badge]: https://img.shields.io/npm/dm/remark-language-server.svg

[downloads]: https://www.npmjs.com/package/remark-language-server
Expand Down
Loading