mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nix): nix and back again
I tried Nix, but it had too many downsides so I removed it. 1. Didn't like that all files are immutable and simple config changes need a complete rebuild. 2. Setting up a new Mac didn't work as smoothly as promised. Not worth the effort. 3. It sucked a lot to always have to type in the password twice on each darwin-rebuild 4. It solves problems I never had.
This commit is contained in:
71
.config/nvim/lua/plugins/obsidian.lua
Normal file
71
.config/nvim/lua/plugins/obsidian.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
-- Obsidian
|
||||
-- https://github.com/epwalsh/obsidian.nvim
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*",
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
-- required
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- optional
|
||||
"hrsh7th/nvim-cmp",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"ibhagwan/fzf-lua",
|
||||
"junegunn/fzf",
|
||||
"junegunn/fzf.vim",
|
||||
"godlygeek/tabular",
|
||||
"preservim/vim-markdown",
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "zettelkasten",
|
||||
path = "~/Code/GitHub/obsidian/zettelkasten",
|
||||
overrides = {
|
||||
notes_subdir = "pages",
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "highlights",
|
||||
path = "~/Code/GitHub/obsidian/highlights",
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
nvim_cmp = true,
|
||||
min_chars = 2,
|
||||
use_path_only = false,
|
||||
},
|
||||
mappings = {
|
||||
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
|
||||
["gf"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.gf_passthrough()
|
||||
end,
|
||||
opts = { noremap = false, expr = true, buffer = true },
|
||||
},
|
||||
-- Toggle check-boxes.
|
||||
["<leader>ch"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.toggle_checkbox()
|
||||
end,
|
||||
opts = { buffer = true },
|
||||
},
|
||||
},
|
||||
disable_frontmatter = true,
|
||||
note_id_func = function(title)
|
||||
local suffix = ""
|
||||
if title ~= nil and title ~= "" then
|
||||
suffix = title
|
||||
else
|
||||
suffix = tostring(os.date("%Y%m%d%H%M"))
|
||||
end
|
||||
return suffix
|
||||
end,
|
||||
templates = {
|
||||
subdir = "templates",
|
||||
date_format = "%Y-%m-%d",
|
||||
time_format = "%H:%M",
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user