Skip to content

Commit

Permalink
chore(build): auto-generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 8, 2024
1 parent 754511d commit 7e5114e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/configuration_recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ There are always certain sources required for the mappings.
You likely also want to set [completion_events](/config#completion-events) to an
empty table `{}` to disable autocompletion if you want this behavior.

### LSP Omnifunc

You can create something similar to the behavior of setting omnifunc to
`vim.lsp.omnifunc()` like this:

```lua
-- Source: none, is builtin
vim.keymap.set("i", "<c-x><c-o>", function()
require("care").api.complete(function(name)
return name == "lsp"
end)
end)
```

### Paths

```lua
-- Source: "hrsh7th/cmp-path" (requires "max397574/care-cmp")
-- Limitations: In comparison to builtin completion the pattern to find filenames is different
Expand All @@ -54,6 +70,8 @@ vim.keymap.set("i", "<c-x><c-f>", function()
end)
```

### Buffer keywords

```lua
-- Source: "hrsh7th/cmp-buffer" (requires "max397574/care-cmp")
-- Limitations: Searches in whole buffers, forwards and backwards cursor
Expand All @@ -66,6 +84,8 @@ vim.keymap.set("i", "<c-x><c-i>", function()
end)
```

### Buffer lines

```lua
-- Source: "amarakon/nvim-cmp-buffer-lines" (requires "max397574/care-cmp")
-- Limitations: Not tested enough to know
Expand Down

0 comments on commit 7e5114e

Please sign in to comment.