feat(nvim): add telkasten.nvim
parent
35b2144c68
commit
8d528f9814
19
flake.lock
19
flake.lock
|
@ -966,7 +966,8 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
"rofi-wayland": "rofi-wayland",
|
"rofi-wayland": "rofi-wayland",
|
||||||
"smartcolumn-nvim": "smartcolumn-nvim",
|
"smartcolumn-nvim": "smartcolumn-nvim",
|
||||||
"stable": "stable"
|
"stable": "stable",
|
||||||
|
"telekasten-nvim": "telekasten-nvim"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
@ -1041,6 +1042,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"telekasten-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689074017,
|
||||||
|
"narHash": "sha256-yBw0Ja9xBhHcEdzvKvg6LCDzmIgW9kg0XaXS7hcr958=",
|
||||||
|
"owner": "renerocksai",
|
||||||
|
"repo": "telekasten.nvim",
|
||||||
|
"rev": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "renerocksai",
|
||||||
|
"repo": "telekasten.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wlroots": {
|
"wlroots": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
@ -50,6 +50,9 @@
|
||||||
smartcolumn-nvim.flake = false;
|
smartcolumn-nvim.flake = false;
|
||||||
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
||||||
|
|
||||||
|
telekasten-nvim.flake = false;
|
||||||
|
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland
|
||||||
hypr-contrib.url = "github:hyprwm/contrib";
|
hypr-contrib.url = "github:hyprwm/contrib";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
|
@ -243,5 +243,38 @@ with builtins;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = "require('Comment').setup()";
|
conf = "require('Comment').setup()";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
plugin = telekasten-nvim;
|
||||||
|
dependencies = [
|
||||||
|
{ plugin = telescope-nvim; }
|
||||||
|
];
|
||||||
|
cmd = [ "Telekasten" ];
|
||||||
|
keys = [
|
||||||
|
{ key = "<leader>z"; cmd = "<cmd>Telekasten<cr>"; desc = "zettelkasten"; }
|
||||||
|
];
|
||||||
|
conf = ''
|
||||||
|
require("telekasten").setup({
|
||||||
|
home = vim.fn.expand("~/Nextcloud/Notes/zettelkasten"),
|
||||||
|
auto_set_filetype = false,
|
||||||
|
auto_set_syntax = false,
|
||||||
|
image_subdir = "assets",
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
||||||
|
pattern = "*/zettelkasten/*",
|
||||||
|
callback = function(event)
|
||||||
|
vim.api.nvim_buf_set_keymap(0, "n", "<CR>", "", {
|
||||||
|
callback = function()
|
||||||
|
local current_word = vim.fn.expand("<cWORD>")
|
||||||
|
if vim.fn.match(current_word, "[[") == 0 then
|
||||||
|
require("telekasten").follow_link()
|
||||||
|
else
|
||||||
|
require("telekasten").toggle_todo()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,5 +31,11 @@ with lib.my;
|
||||||
version = mkVersionInput inputs.cmp-async-path;
|
version = mkVersionInput inputs.cmp-async-path;
|
||||||
src = inputs.cmp-async-path;
|
src = inputs.cmp-async-path;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
telekasten-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "telekasten-nvim";
|
||||||
|
version = mkVersionInput inputs.telekasten-nvim;
|
||||||
|
src = inputs.telekasten-nvim;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue