From 7e5114eeb85ecb59b802ce5dfa29b2384ed2e89b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 8 Sep 2024 11:29:59 +0000 Subject: [PATCH] chore(build): auto-generate docs --- docs/configuration_recipes.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/configuration_recipes.md b/docs/configuration_recipes.md index 6af78a8..adf4a66 100644 --- a/docs/configuration_recipes.md +++ b/docs/configuration_recipes.md @@ -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", "", 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 @@ -54,6 +70,8 @@ vim.keymap.set("i", "", function() end) ``` +### Buffer keywords + ```lua -- Source: "hrsh7th/cmp-buffer" (requires "max397574/care-cmp") -- Limitations: Searches in whole buffers, forwards and backwards cursor @@ -66,6 +84,8 @@ vim.keymap.set("i", "", function() end) ``` +### Buffer lines + ```lua -- Source: "amarakon/nvim-cmp-buffer-lines" (requires "max397574/care-cmp") -- Limitations: Not tested enough to know