Skip to content

Commit 834be4e

Browse files
committed
docs: update README
1 parent 3c0080a commit 834be4e

File tree

1 file changed

+59
-6
lines changed

1 file changed

+59
-6
lines changed

README.md

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,67 @@
55
[![codecov](https://codecov.io/gh/vim-fall/fall-std/graph/badge.svg?token=FWTFEJT1X1)](https://codecov.io/gh/vim-fall/fall-std)
66
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
77

8-
Standard library for using [Fall](https://github.com/vim-fall/fall), a
8+
A standard library for using [Fall](https://github.com/vim-fall/fall), a
99
Vim/Neovim Fuzzy Finder plugin powered by
10-
[Denops](https://github.com/vim-denops/denops.vim).
10+
[Denops](https://github.com/vim-denops/denops.vim). Users should import this
11+
library in Fall's configuration file (`fall/config.ts`) to use the built-in
12+
extensions and utility functions.
1113

12-
It is also used to develop extensions of Fall.
14+
## Usage
15+
16+
### Extensions
17+
18+
Extensions are available in the `builtin` directory. You can access them like
19+
this:
20+
21+
```typescript
22+
import * as builtin from "jsr:@vim-fall/std/builtin";
23+
24+
// Display all curators
25+
console.log(builtin.curator);
26+
27+
// Display all sources
28+
console.log(builtin.source);
29+
30+
// Display all actions
31+
console.log(builtin.action);
32+
33+
// ...
34+
```
35+
36+
### Utility Functions
37+
38+
Utility functions are defined in the root directory. You can access them like
39+
this:
40+
41+
```typescript
42+
import * as builtin from "jsr:@vim-fall/std/builtin";
43+
import * as std from "jsr:@vim-fall/std";
44+
45+
// Refine a source with refiners
46+
const refinedSource = std.refineSource(
47+
// File source
48+
builtin.source.file,
49+
// Refiner to filter files based on the current working directory
50+
builtin.refiner.cwd,
51+
// Refiner to modify item paths to be relative from the current working directory
52+
builtin.refiner.relativePath,
53+
// ...
54+
);
55+
```
56+
57+
### More Extensions
58+
59+
For more extensions (including integrations with other Vim plugins, non-standard
60+
workflows, etc.), check out
61+
[vim-fall/fall-extra](https://github.com/vim-fall/fall-extra)
62+
([@vim-fall/extra](https://jsr.io/@vim-fall/extra)).
1363

1464
## License
1565

16-
The code in this repository follows the MIT license, as detailed in
17-
[LICENSE](./LICENSE). Contributors must agree that any modifications submitted
18-
to this repository also adhere to the license.
66+
The code in this repository follows the MIT license, as detailed in the LICENSE.
67+
Contributors must agree that any modifications submitted to this repository also
68+
adhere to the license.
69+
70+
This Markdown version will render properly when used in a Markdown environment.
71+
Let me know if you'd like to adjust anything further!

0 commit comments

Comments
 (0)