]> src.twobees.de Git - dotfiles.git/commitdiff
add btoggle
authorTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sat, 17 Feb 2024 11:19:37 +0000 (12:19 +0100)
committerTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sat, 17 Feb 2024 11:19:37 +0000 (12:19 +0100)
stow/nvim/.config/nvim/init.lua

index c02802832b5f829ddc8c68d0395079fb313b65ef..7f5536d8917e375bfc6d36a1d01bbbdf90f11fd3 100644 (file)
@@ -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', '<leader>b', bt.toggle)
+
 -- The line beneath this is called `modeline`. See `:help modeline`
 -- vim: ts=2 sts=2 sw=2 et