diff --git a/lua/plugins.lua b/lua/plugins.lua index 61177e1..540fdf1 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -234,6 +234,11 @@ local plugins = { branch = "anticonceal", config = require("plugins.lsp-inlayhints"), }, + { + "cbochs/grapple.nvim", + dependencies = { "nvim-lua/plenary.nvim", }, + config = require("plugins.grapple"), + }, { "is0n/fm-nvim", config = require("plugins.fm-nvim"), diff --git a/lua/plugins/grapple.lua b/lua/plugins/grapple.lua new file mode 100644 index 0000000..b6371b4 --- /dev/null +++ b/lua/plugins/grapple.lua @@ -0,0 +1,33 @@ +--[[ + Copyright 2023 Oscar Wallberg + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +-- https://github.com/cbochs/grapple.nvim + +local function setup() + local grapple = require("grapple") + grapple.setup() + vim.keymap.set("n", "'", grapple.popup_tags) + for i = 1, 9 do + vim.keymap.set("n", "m" .. i, function () + grapple.tag({ key = "m" .. i, }) + end) + vim.keymap.set("n", "" .. i, function () + grapple.select({ key = "m" .. i, }) + end) + end +end + +return setup