Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikku/markmark
Markdown language tooling, exposed as a language server
https://github.com/nikku/markmark
language-server-protocol lsp markdown
Last synced: 3 days ago
JSON representation
Markdown language tooling, exposed as a language server
- Host: GitHub
- URL: https://github.com/nikku/markmark
- Owner: nikku
- License: mit
- Created: 2022-10-31T22:47:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T23:35:59.000Z (6 months ago)
- Last Synced: 2024-05-02T00:05:21.201Z (5 months ago)
- Topics: language-server-protocol, lsp, markdown
- Language: JavaScript
- Homepage:
- Size: 559 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# markmark
[![CI](https://github.com/nikku/markmark/actions/workflows/CI.yml/badge.svg)](https://github.com/nikku/markmark/actions/workflows/CI.yml)
[Markdown](https://en.wikipedia.org/wiki/Markdown) language tooling. Use standalone or plug-in as a [language server](https://microsoft.github.io/language-server-protocol/) into your favorite IDE.
## Features
Language tooling and code intelligence for [Markdown](https://en.wikipedia.org/wiki/Markdown) files:
* [x] Go to definition
* [x] Find references
* [x] Complete links and tags
* [X] Validate linksScalable across many Markdown files:
* [x] Project awareness
* [x] Built in or external file watching supportExposed as a [language server](#language-server), but also usable [standalone](#standalone).
## Installation
```sh
npm install -g markmark
```## Usage
### Language Server
Start using `markmark-lsp` binary (depends on the [language server protocol](https://microsoft.github.io/language-server-protocol/) integration of your editor):
```
markmark-lsp --stdio
```### Standalone
Instantiate `markmark` yourself to integrate it into your applications:
```javascript
import { Markmark } from 'markmark';const markmark = new Markmark(console);
// intialize
markmark.init({ watch: true });// add a search root
markmark.addRoot('file:///some-folder');// listen on
markmark.on('ready', () => {
console.log('Markmark is ready!');
});// find references at position
const refs = markmark.findReferences({
uri: 'file:///some-folder/foo.md',
position: {
start: { line: 1, column: 5 },
end: { line: 1, column: 5 }
}
});// find definitions at document position
const defs = markmark.findDefinitions({
uri: 'file:///some-folder/foo.md',
position: {
start: { line: 1, column: 5 },
end: { line: 1, column: 5 }
}
});
```## License
MIT