diff --git a/README.md b/README.md index 3df9867..b3b7dff 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Provides intelligent editing features for fennel files. ## Quick Links -* [Install](docs/manual.md#installation) -* [Configuration](docs/manual.md#configuration) +* [Install](docs/installation.md) +* [Configuration](docs/manual.md) * [Packaging](docs/packaging.md) * [Writing your own lint](docs/linting.md) diff --git a/docs/manual.md b/docs/manual.md index 26e1bbb..1459e44 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -1,6 +1,35 @@ # Manual -This document has information on how to configure and use fennel-ls after you [installed it](installation.md). +This document has information on how to configure and use fennel-ls after you +[installed it](installation.md). + +## Quick start + +fennel-ls can be used with no configuration beyond connecting it to your text +editor, but if you are using external libraries you will need to add them to +the configuration to get completions, documentation, and correct diagnostics. + +If a [docset is available](http://wiki.fennel-lang.org/LanguageServer) for the +library you are using: + +- download it and place it in `~/.local/share/fennel-ls/docsets/` +- create a `flsproject.fnl` in the root directory of your project +- add the docset to it, it must match the name of the file you downloaded, + without the `.lua` extension: + ```fnl + {:libraries {:library-name true}} + ``` + +If a docset is not available, add the globals created by the library to the +`extra-globals` field, separated by spaces, so that they are not reported as +errors: + +```fnl +{:extra-globals "module1 module2 function1 function2"} +``` + +The rest of this document provides additional details on the configuration and +usage of fennel-ls. ## Configuration