-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b94a7d5
commit 008103f
Showing
3 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Getting started | ||
description: How to get started using care.nvim | ||
--- | ||
|
||
# Configuration recipes | ||
|
||
Here are some useful configurations for care. | ||
|
||
## Labels and shortcuts | ||
|
||
This configuration will add labels to your items and allow to select them with | ||
`ctrl+label`. | ||
|
||
```lua | ||
local labels = {"1", "2", "3", "4", "5", "6", "7", "8", "9"} | ||
|
||
-- Add this to formatting | ||
|
||
{ { | ||
" " .. require("care.presets.utils").LabelEntries(labels)(entry, data) .. " ", | ||
"Comment", | ||
}, }, | ||
|
||
-- Keymappings | ||
for i, label in ipairs(labels) do | ||
vim.keymap.set("i", "<c-"..label..">", function() | ||
require("care").api.select_visible(i) | ||
-- If you also want to confirm the entry | ||
require("care").api.confirm() | ||
end) | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters