-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for loading local processors
* This adds support for loading a local processor (such as `rehype`) from the file system (`node_modules/`) in the project * By default, it now shows a warningh notification when that processor can’t be found locally, instead of throwing an error * Optionally, a default processor can be passed when creating the language server, which will be used if a local processor can’t be found, instead of the previously mentioned warning notification Reviewed-by: Remco Haszing <[email protected]> Closes GH-23. Related to: remarkjs/remark-language-server#3.
- Loading branch information
Showing
9 changed files
with
266 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {remark} from 'remark' | ||
import {createUnifiedLanguageServer} from '../index.js' | ||
|
||
createUnifiedLanguageServer({ | ||
processorName: 'xxx-missing-yyy', | ||
defaultProcessor: remark | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {createUnifiedLanguageServer} from '../index.js' | ||
|
||
createUnifiedLanguageServer({ | ||
processorName: 'xxx-missing-yyy' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import {createUnifiedLanguageServer} from '../index.js' | ||
|
||
createUnifiedLanguageServer({ | ||
plugins: ['remark-parse', 'remark-stringify', './one-error.js'] | ||
processorName: 'remark', | ||
processorSpecifier: 'remark', | ||
plugins: ['./one-error.js'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import {createUnifiedLanguageServer} from '../index.js' | ||
|
||
createUnifiedLanguageServer({ | ||
plugins: ['remark-parse', 'remark-stringify', './lots-of-warnings.js'] | ||
processorName: 'remark', | ||
processorSpecifier: 'remark', | ||
plugins: ['./lots-of-warnings.js'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import {createUnifiedLanguageServer} from '../index.js' | ||
|
||
createUnifiedLanguageServer({plugins: ['remark-parse', 'remark-stringify']}) | ||
createUnifiedLanguageServer({ | ||
processorName: 'remark', | ||
processorSpecifier: 'remark' | ||
}) |