From c1fc0b06683c5cdc96258ee75d7e34908686e63b Mon Sep 17 00:00:00 2001 From: Tobias Sachs Date: Sat, 17 Feb 2024 12:19:37 +0100 Subject: [PATCH] add btoggle --- stow/nvim/.config/nvim/init.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/stow/nvim/.config/nvim/init.lua b/stow/nvim/.config/nvim/init.lua index c028028..7f5536d 100644 --- a/stow/nvim/.config/nvim/init.lua +++ b/stow/nvim/.config/nvim/init.lua @@ -107,6 +107,9 @@ require('lazy').setup({ opts = { }, }, + -- { dir = '~/github/mynvimplugins/btoggle.nvim/' }, + { 'tobser/btoggle.nvim' }, + -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, @@ -272,7 +275,7 @@ augroup END require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'html', - 'c_sharp', 'perl', 'python' }, + 'c_sharp', 'perl', 'python' ,'markdown' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, @@ -519,5 +522,17 @@ vim.opt.diffopt = vim.opt.diffopt + "vertical" vim.opt.cursorline = true vim.opt.hlsearch = true +local bt = require("btoggle"); +bt.setup({ + ["true"] = "false", + ["True"] = "False", + ["False"] = "True", + ["false"] = "true", + ["foo"] = "bar", + ["bar"] = "bor", + ["bor"] = "foo" +}) +vim.keymap.set('n', 'b', bt.toggle) + -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et -- 2.39.2