Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(grapple-nvim)!: update to Grapple v0.10.0 #779

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lua/astrocommunity/motion/grapple-nvim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Neovim plugin for tagging important files
**Repository:** <https://github.com/cbochs/grapple.nvim>

### Example of a custom Heirline component for AstroNvim

![image](https://github.com/Subjective/astrocommunity/assets/56745535/333069eb-dea7-428f-b28d-31fd5912f95f)

```lua
Expand All @@ -14,13 +15,14 @@ status.component.grapple = {
provider = function()
local available, grapple = pcall(require, "grapple")
if available then
local key = grapple.key { buffer = 0 }
if key ~= nil then return " " .. key .. " " end
return grapple.statusline()
end
end,
}
```

**Example Configuration:**

```lua
return {
plugins = {
Expand All @@ -34,8 +36,7 @@ return {
provider = function()
local available, grapple = pcall(require, "grapple")
if available then
local key = grapple.key { buffer = 0 }
if key ~= nil then return " " .. key .. " " end
return grapple.statusline()
end
end,
}
Expand Down
18 changes: 9 additions & 9 deletions lua/astrocommunity/motion/grapple-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ maps.n[prefix] = { desc = icon .. "Grapple" }
require("astronvim.utils").set_mappings(maps)
return {
"cbochs/grapple.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
cmd = { "Grapple" },
keys = {
{ prefix .. "a", "<cmd>GrappleTag<CR>", desc = "Add file" },
{ prefix .. "d", "<cmd>GrappleUntag<CR>", desc = "Remove file" },
{ prefix .. "t", "<cmd>GrappleToggle<CR>", desc = "Toggle a file" },
{ prefix .. "e", "<cmd>GrapplePopup tags<CR>", desc = "Select from tags" },
{ prefix .. "s", "<cmd>GrapplePopup scopes<CR>", desc = "Select a project scope" },
{ prefix .. "x", "<cmd>GrappleReset<CR>", desc = "Clear tags from current project" },
{ "<C-n>", "<cmd>GrappleCycle forward<CR>", desc = "Select next tag" },
{ "<C-p>", "<cmd>GrappleCycle backward<CR>", desc = "Select previous tag" },
{ prefix .. "a", "<cmd>Grapple tag<CR>", desc = "Add file" },
{ prefix .. "d", "<cmd>Grapple untag<CR>", desc = "Remove file" },
{ prefix .. "t", "<cmd>Grapple toggle<CR>", desc = "Toggle a file" },
{ prefix .. "e", "<cmd>Grapple open_tags<CR>", desc = "Select from tags" },
{ prefix .. "s", "<cmd>Grapple open_scopes<CR>", desc = "Select a scope" },
{ prefix .. "l", "<cmd>Grapple open_loaded<CR>", desc = "Select a loaded scope" },
{ prefix .. "x", "<cmd>Grapple reset<CR>", desc = "Clear tags from current project" },
{ "<C-n>", "<cmd>Grapple cycle forward<CR>", desc = "Select next tag" },
{ "<C-p>", "<cmd>Grapple cycle backward<CR>", desc = "Select previous tag" },
},
}
Loading