Skip to content

Commit e6be96b

Browse files
committed
docs: Explain single-file mode in README
1 parent 098a7b8 commit e6be96b

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

+17-10
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,27 @@ Marksman by default reads ignore globs from `.gitignore`, `.hgignore`, and
158158
Marksman will search for and read ignore files in all sub-folders of the
159159
workspace. similarly to what Git does.
160160

161-
### Workspace folders and project roots
161+
### Workspace folders, project roots, and single-file mode
162162

163163
The LSP specification is designed to work with projects rather than individual
164-
files<sup>[4](#fn4)</sup>. How a root folder of a project is found varies
165-
between editors, but usually it's either
166-
1. a root of the version control system (applicable to all languages),
167-
2. a folder with `.marksman.toml` marker file (specific to Marksman integrations).
168-
169-
Therefore, in case Marksman doesn't provide Markdown language assist for your
170-
files and you don't understand why, you can either:
164+
files<sup>[4](#fn4)</sup>. Marksman has a custom **single-file mode** that
165+
provides a *subset* of language features for markdown files open outside of any
166+
project. This works well for small one-off edits or when opening random
167+
markdown files. However, when you have several interconnected documents do
168+
consider setting up a project folder for them for an improved experience.
169+
170+
How a folder (aka project, aka root) is found varies between editors, but
171+
usually it's either
172+
1. a root of a VCS repository (applicable to all languages),
173+
2. a folder with `.marksman.toml` marker file (specific to Marksman
174+
integrations).
175+
176+
When Marksman doesn't provide cross-file language assist for your files and you
177+
don't understand why, you can either:
171178
1. check your project into version control, or
172179
2. create a `.marksman.toml` at the root folder of your project, or
173-
3. refer to your editor/LSP client documentation regarding how project root is
174-
defined.
180+
3. refer to your editor/LSP client documentation regarding how a project root
181+
is defined.
175182

176183
## Where's `zeta-note` and where's Rust?
177184

0 commit comments

Comments
 (0)