Skip to content

Commit d704e39

Browse files
committed
docs: Describe wiki links style configuration in README
1 parent 9307131 commit d704e39

File tree

1 file changed

+38
-12
lines changed

1 file changed

+38
-12
lines changed

README.md

+38-12
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ features below.
1818
Marksman **works on MacOS, Linux, and Windows** and is distributed as a **self-contained binary** for each OS.
1919

2020
The server provides assistance with:
21+
2122
* Markdown inline links:
2223
```md
2324
This is [inline link](/some-file.md#some-heading).
@@ -43,10 +44,11 @@ for wiki-links to detect broken references and duplicate/ambiguous headings.
4344

4445
* VSCode via [Marksman VSCode][mn-vscode].
4546
* Neovim:
46-
* via [mason.nvim][mason-nvim] (automatic server installation) (Requires [mason-lspconfig.nvim][mason-nvim-lsp-config])
47+
* via [mason.nvim][mason-nvim] (automatic server installation) (
48+
Requires [mason-lspconfig.nvim][mason-nvim-lsp-config])
4749
* via [nvim-lspconfig][nvim-marksman],
4850
* via [CoC-marksman][coc-marksman].
49-
* Emacs:
51+
* Emacs:
5052
* via [LSP Mode](https://emacs-lsp.github.io/lsp-mode/page/lsp-marksman/) (automatic server installation).
5153

5254
Example config for `use-package` users:
@@ -65,7 +67,8 @@ for wiki-links to detect broken references and duplicate/ambiguous headings.
6567
(add-to-list 'eglot-server-programs '(markdown-mode . ("marksman")))
6668
(add-hook 'markdown-mode-hook #'eglot-ensure)
6769
````
68-
* [Helix](https://helix-editor.com/) supports Marksman out of the box. However, you need add `marksman` binary to your `PATH` manually.
70+
* [Helix](https://helix-editor.com/) supports Marksman out of the box. However, you need add `marksman` binary to
71+
your `PATH` manually.
6972
* Sublime Text via [LSP-marksman][sublime-marksman] (automatic server
7073
installation).
7174
@@ -110,8 +113,8 @@ generally most features should work equaly in all editors.
110113
- **Hover preview**:
111114
![Hover](assets/readme/gifs/hover.gif)
112115
- **Completion**:
113-
* ![Completion Markdown](assets/readme/gifs/completion-markdown.gif)
114-
* ![Completion Wiki](assets/readme/gifs/completion-wiki.gif)
116+
* ![Completion Markdown](assets/readme/gifs/completion-markdown.gif)
117+
* ![Completion Wiki](assets/readme/gifs/completion-wiki.gif)
115118
- **Find references**:
116119
![Find references](assets/readme/gifs/find-references.gif)
117120
- **Project-wide diagnostics**:
@@ -125,32 +128,45 @@ generally most features should work equaly in all editors.
125128

126129
- ✅ Document symbols from headings.
127130
- ✅ Workspace symbols from headings.
128-
* Query matching is subsequence-based, that is `lsp` will match both `LSP` and `Low Seismic Profile`.
131+
* Query matching is subsequence-based, that is `lsp` will match both `LSP` and `Low Seismic Profile`.
129132
- ✅ Completion for links (inline, reference, wiki).
130133
- ✅ Hover prevew for links.
131134
- ✅ "Go to definition" for links.
132135
- ✅ "Find references" for headings and links.
133136
- ✅ Diagnostics for wiki-links.
134137
- ✅ Support multi-folder workspaces.
135138
- ✅ Custom parser for more fine-grained note structure.
136-
- 🗓 Code Lens with "# references" on headings.
139+
- 🗓 Code Lens with "# references" on headings.
137140
- ✅ Rename refactor.
138-
- 🗓 Add support for images (diagnostics, completion, goto).
139-
- 🗓 Add "check" command for standalone workspace checking.
140-
- 🗓 Add "build" command that rewrites all cross-references into proper
141+
- 🗓 Add support for images (diagnostics, completion, goto).
142+
- 🗓 Add "check" command for standalone workspace checking.
143+
- 🗓 Add "build" command that rewrites all cross-references into proper
141144
relative markdown links for further embedding into a static site generator
142145
such as Jekyll or Hakyll.
143-
- 🗓 Support for Jupyter notebooks.
146+
- 🗓 Support for Jupyter notebooks.
144147

145148
### Configuration
149+
146150
See [Configuration](docs/configuration.md) docs for more details.
147151

152+
### Wiki links
153+
154+
Alongside regular markdown links, Marksman also supports wiki-style links, e.g. ``[[some-doc]]``
155+
or ``[[#some-heading]]``. This is particularly convenient when working with a Zettelkasten-like repository of markdown
156+
notes, as it streamlines linking and cross-linking of notes. This is what tool like [Obsidian][obsidian]
157+
and [Emanote][emanote] use.
158+
159+
By default Marksman uses a document **title's slug** when referencing a document, however there is an configuration
160+
setting to use a **file name** or a file path instead. This functionality is currently **experimental** and may change
161+
in future depending on user's feedback. See [Configuration](docs/configuration.md) for more details.
162+
148163
### Code actions
149164

150165
Code actions usually can be enabled/disabled via a configuration option. See
151166
[configuration](#configuration) for more details.
152167

153168
#### Table of Contents
169+
154170
Marksman has a code action to create and update a table of contents of a document.
155171

156172
![Table of Contents](assets/readme/gifs/toc.gif)
@@ -169,16 +185,18 @@ files<sup>[4](#fn4)</sup>. Marksman has a custom **single-file mode** that
169185
provides a *subset* of language features for markdown files open outside of any
170186
project. This works well for small one-off edits or when opening random
171187
markdown files. However, when you have several interconnected documents do
172-
consider setting up a project folder for them for an improved experience.
188+
consider setting up a project folder for them for an improved experience.
173189

174190
How a folder (aka project, aka root) is found varies between editors, but
175191
usually it's either
192+
176193
1. a root of a VCS repository (applicable to all languages),
177194
2. a folder with `.marksman.toml` marker file (specific to Marksman
178195
integrations).
179196

180197
When Marksman doesn't provide cross-file language assist for your files and you
181198
don't understand why, you can either:
199+
182200
1. check your project into version control, or
183201
2. create a `.marksman.toml` at the root folder of your project, or
184202
3. refer to your editor/LSP client documentation regarding how a project root
@@ -221,17 +239,25 @@ LSP but it's not a part of the spec at least until and including v3.17.
221239
[original-zn]: https://github.com/artempyanykh/zeta-note
222240

223241
[nvim-marksman]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#marksman
242+
224243
[mason-nvim]: https://github.com/williamboman/mason.nvim
244+
225245
[mason-nvim-lsp-config]: https://github.com/williamboman/mason-lspconfig.nvim
226246

227247
[lsp-main]: https://microsoft.github.io/language-server-protocol/
228248

229249
[helix-editor]: https://helix-editor.com
250+
230251
[helix-marksman-pr]: https://github.com/helix-editor/helix/pull/3499
231252

232253
[coc-marksman]: https://github.com/yaegassy/coc-marksman
233254

234255
[eglot]: https://github.com/joaotavora/eglot
256+
235257
[eglot-marksman-pr]: https://github.com/joaotavora/eglot/pull/1013
236258

237259
[sublime-marksman]: https://github.com/bitsper2nd/LSP-marksman
260+
261+
[obsidian]: https://obsidian.md
262+
263+
[emanote]: https://emanote.srid.ca

0 commit comments

Comments
 (0)