feat: drop venn-nvim

This commit is contained in:
NotAShelf 2023-04-18 20:28:31 +03:00
parent 7bf6594755
commit c749a7fe59
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
8 changed files with 0 additions and 84 deletions

View file

@ -151,7 +151,6 @@ inputs: let
vim.utility = { vim.utility = {
colorizer.enable = true; colorizer.enable = true;
icon-picker.enable = true; icon-picker.enable = true;
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
diffview-nvim.enable = true; diffview-nvim.enable = true;
motion = { motion = {
hop.enable = true; hop.enable = true;

View file

@ -1355,7 +1355,6 @@
"toggleterm-nvim": "toggleterm-nvim", "toggleterm-nvim": "toggleterm-nvim",
"tokyonight": "tokyonight", "tokyonight": "tokyonight",
"trouble": "trouble", "trouble": "trouble",
"venn-nvim": "venn-nvim",
"vim-markdown": "vim-markdown", "vim-markdown": "vim-markdown",
"vim-repeat": "vim-repeat", "vim-repeat": "vim-repeat",
"vim-startify": "vim-startify", "vim-startify": "vim-startify",
@ -1652,22 +1651,6 @@
"type": "github" "type": "github"
} }
}, },
"venn-nvim": {
"flake": false,
"locked": {
"lastModified": 1669127905,
"narHash": "sha256-Ks5qUaI0MrhVC2AhVsReVwC/2WArXqIQ36CcCSCyzAk=",
"owner": "jbyuki",
"repo": "venn.nvim",
"rev": "c114563960b8fb1197695d42798d1f3e7190b798",
"type": "github"
},
"original": {
"owner": "jbyuki",
"repo": "venn.nvim",
"type": "github"
}
},
"vim-markdown": { "vim-markdown": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -383,11 +383,6 @@
flake = false; flake = false;
}; };
venn-nvim = {
url = "github:jbyuki/venn.nvim";
flake = false;
};
icon-picker-nvim = { icon-picker-nvim = {
url = "github:ziontee113/icon-picker.nvim"; url = "github:ziontee113/icon-picker.nvim";
flake = false; flake = false;

View file

@ -51,7 +51,6 @@ with lib; let
"cinnamon-nvim" "cinnamon-nvim"
"cheatsheet-nvim" "cheatsheet-nvim"
"colorizer" "colorizer"
"venn-nvim"
"cellular-automaton" "cellular-automaton"
"presence-nvim" "presence-nvim"
"icon-picker-nvim" "icon-picker-nvim"

View file

@ -7,7 +7,6 @@ _: {
./colorizer ./colorizer
./icon-picker ./icon-picker
./telescope ./telescope
./venn
./diffview ./diffview
]; ];
} }

View file

@ -1,42 +0,0 @@
{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.utility.venn-nvim;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"venn-nvim"
];
# TODO: https://github.com/jbyuki/venn.nvim#using-toggle-command
# add keybindings for drawing diagrams
vim.luaConfigRC.venn-nvim = nvim.dag.entryAnywhere ''
local venn = require('venn')
-- venn.nvim: enable or disable keymappings
function _G.Toggle_venn()
local venn_enabled = vim.inspect(vim.b.venn_enabled)
if venn_enabled == "nil" then
vim.b.venn_enabled = true
vim.cmd[[setlocal ve=all]]
-- draw a line on HJKL keystokes
vim.api.nvim_buf_set_keymap(0, "n", "J", "<C-v>j:VBox<CR>", {noremap = true})
vim.api.nvim_buf_set_keymap(0, "n", "K", "<C-v>k:VBox<CR>", {noremap = true})
vim.api.nvim_buf_set_keymap(0, "n", "L", "<C-v>l:VBox<CR>", {noremap = true})
vim.api.nvim_buf_set_keymap(0, "n", "H", "<C-v>h:VBox<CR>", {noremap = true})
-- draw a box by pressing "f" with visual selection
vim.api.nvim_buf_set_keymap(0, "v", "f", ":VBox<CR>", {noremap = true})
else
vim.cmd[[setlocal ve=]]
vim.cmd[[mapclear <buffer>]]
vim.b.venn_enabled = nil
end
end
-- toggle keymappings for venn using <leader>v
vim.api.nvim_set_keymap('n', '<leader>v', ":lua Toggle_venn()<CR>", { noremap = true})
'';
};
}

View file

@ -1,6 +0,0 @@
_: {
imports = [
./config.nix
./venn.nix
];
}

View file

@ -1,11 +0,0 @@
{
config,
lib,
...
}:
with lib;
with builtins; {
options.vim.utility.venn-nvim = {
enable = mkEnableOption "Enable venn.nvim: draw ASCII diagrams in Neovim";
};
}