]> git.sthu.org Git - vimconf.git/commitdiff
plugins: Add calculator.nvim
authorStefan Huber <shuber@sthu.org>
Tue, 27 Aug 2024 20:29:42 +0000 (22:29 +0200)
committerStefan Huber <shuber@sthu.org>
Tue, 27 Aug 2024 20:29:42 +0000 (22:29 +0200)
plugins-full.vim.example

index 5fdf935f0ff1569673f1fbf24001eb0aafede854..a1e34c5928a4f15867f3690b68eee9c9a9a16483 100644 (file)
@@ -10,6 +10,8 @@ if has('nvim-0.5')
     Plug 'nvim-treesitter/nvim-treesitter-refactor', {'do': ':TSUpdate'}
 
     Plug 'robitx/gp.nvim'
+
+    Plug 'vzze/calculator.nvim'
 endif
 
 if has('nvim-0.8')
@@ -190,8 +192,13 @@ function PluginsConfigFull()
                     }
                 }
             })
+
+            vim.api.nvim_create_user_command("Calculate", "lua require(\"calculator\").calculate()",
+            { ["range"] = 1, ["nargs"] = 0 })
 EOF
 
+        vmap gC :Calculate<cr>
+
         set foldmethod=expr
         set foldexpr=nvim_treesitter#foldexpr()
     endif