~vigoux/complementree.nvim

d0b7f7a88ce4e1134eab8637f8a1138566724dda — Thomas Vigouroux 6 months ago 8f7b2f7
docs: tidy documentations

Remove references to luasnip (not needed anymore)
Add instructions for installing with paq

Fixes: https://todo.sr.ht/~vigoux/complementree.nvim/1
1 files changed, 20 insertions(+), 11 deletions(-)

M README.md
M README.md => README.md +20 -11
@@ 11,8 11,24 @@ Features and design goals:

## Installation

Using [packer.nvim](https://github.com/wbthomason/packer.nvim), add
the following in your `startup` call:
```lua
use {'https://git.sr.ht/~vigoux/complementree.nvim', requires = {'L3MON4D3/LuaSnip', 'https://git.sr.ht/~vigoux/azy.nvim'} }
use {'https://git.sr.ht/~vigoux/complementree.nvim', requires = {'https://git.sr.ht/~vigoux/azy.nvim'} }
```

Using [paq.nvim](https://github.com/savq/paq-nvim), you can do the
following:
```lua
require "paq" {
    -- your other plugins...

    -- This is the bare minimum required
    "https://git.sr.ht/~vigoux/complementree.nvim",

    -- If needed you can add azy.nvim for fuzzy sorting
    "https://git.sr.ht/~vigoux/azy.nvim",
}
```

## Setting up


@@ 46,7 62,6 @@ We define a set of `sources` that are triggered when calling the
The defaults are:
- `treesitter`: all names defined in the current file (very basic for now)
- `lsp`: lsp-only source, with LSP snippets enabled
- `luasnip`: luasnip snippets
- `ctags`: tagfile elements, a more configurable form of `<C-X><C-]>`
- `filepath`: paths under the current directory
- `dummy`: nothing


@@ 75,13 90,12 @@ function as input:

The currently implemented matches functions are:
- `lsp_matches`: for lsp-only matches
- `luasnip_matches`: for LuaSnip matches.
- `filepath_matches`: for files under the current directory
- `ctags_matches`: for matches in the current tagfile
- `treesitter_matches`: for symbols defined in the current file (basic for now)

All the `_matches` function take a table of options as parameters, dig
into the [sources file](./teal/complementree/sources.tl) for more info
into the [sources file](./lua/complementree/sources.lua) for more info
about that.

Using combinators, you can complete using LSP + LuaSnip with the


@@ 113,7 127,7 @@ there are quite a bunch of them.

- `alphabetic`: sort results alphabetically
- `length`: sort results by length
If you have `romgrk/fzy-lua-native` installed, there will also be:
If you have `vigoux/azy.nvim` installed, there will also be:
- `fzy`: sort based on the fuzzy score (case sensitive)
- `ifzy`: case insensitive version



@@ 158,10 172,5 @@ Fuzzy LSP:
combinators.pipeline(sources.lsp_matches {}, comparators.fzy, filters.amount(6))
```

Fuzzy LSP and LuaSnip only if LSP returns something:
```lua
combinators.pipeline(combinators.optional(source.lsp_matches {}, source.luasnip_matches {}), comparators.fzy, filters.amount(6))
```

Look in the [defaults file](./teal/complementree/defaults.tl) for
Look in the [defaults file](./lua/complementree/defaults.lua) for
more.