From 363f4ac5e61784671bb1464d7293647c6fffe167 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 8 Mar 2022 10:01:40 +0100 Subject: [PATCH] nvim: Add telescope digraph search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added plugin for digraph search through telescope. When you want to enter a digraph, you can do so through the usual method, pressing and then entering the digraph shortcut (e.g. `OK` for ✓, or `n?` for ñ) OR you simply double press which opens a quick telescope window to select the digraph you want. --- nvim/.config/nvim/lua/maps.lua | 4 ++++ nvim/.config/nvim/lua/plugins.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index 5c4f83b..562a1b3 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -261,3 +261,7 @@ map.n.nore['[c'] = ':IPythonCellPrevCell' -- insert cell header above/below map.n.nore['cO'] = ':IPythonCellInsertAbovea' map.n.nore['co'] = ':IPythonCellInsertBelowa' + +-- PLUGIN: betterdigraphs +-- allow normal digraph insertion on c-k, search on c-k c-k +map.i.nore[''] = 'lua require "betterdigraphs".digraphs("i")' diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index b49c7c8..a13364c 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -165,6 +165,10 @@ require("packer").startup(function() }, config = function() require('plug._telescope') end } + use { + 'protex/better-digraphs.nvim', + requires = {{"nvim-telescope/telescope.nvim"}} + } -- snippeting use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine