mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Added Obsidian
This commit is contained in:
+66
-3
@@ -31,10 +31,15 @@
|
|||||||
group = "Buffer";
|
group = "Buffer";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
__unkeyed-1 = "<leader>o";
|
__unkeyed-1 = "<leader>S";
|
||||||
group = "SOPS";
|
group = "SOPS";
|
||||||
icon = "";
|
icon = "";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>O";
|
||||||
|
group = "Obsidian";
|
||||||
|
icon = "";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
__unkeyed-1 = "<leader>d";
|
__unkeyed-1 = "<leader>d";
|
||||||
group = "Debug";
|
group = "Debug";
|
||||||
@@ -283,6 +288,14 @@
|
|||||||
options.desc = "Quick Menu";
|
options.desc = "Quick Menu";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Outline
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>o";
|
||||||
|
action = "<CMD>Outline<CR>";
|
||||||
|
options.desc = "Outline";
|
||||||
|
}
|
||||||
|
|
||||||
# FZF-Lua custom commands -- I want to limit to current directory
|
# FZF-Lua custom commands -- I want to limit to current directory
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
@@ -346,17 +359,67 @@
|
|||||||
# SOPS
|
# SOPS
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>od";
|
key = "<leader>Sd";
|
||||||
action = "<CMD>!sops -d -i %<CR><CR>";
|
action = "<CMD>!sops -d -i %<CR><CR>";
|
||||||
options.desc = "Decrypt SOPS File";
|
options.desc = "Decrypt SOPS File";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>oe";
|
key = "<leader>Se";
|
||||||
action = "<CMD>!sops -e -i %<CR><CR>";
|
action = "<CMD>!sops -e -i %<CR><CR>";
|
||||||
options.desc = "Encrypt SOPS File";
|
options.desc = "Encrypt SOPS File";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Obsidian
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>On";
|
||||||
|
action = "<CMD>ObsidianNew<CR>";
|
||||||
|
options.desc = "New Note";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Oo";
|
||||||
|
action = "<CMD>ObsidianQuickSwitch<CR>";
|
||||||
|
options.desc = "Open Note";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Ol";
|
||||||
|
action = "<CMD>ObsidianBacklinks<CR>";
|
||||||
|
options.desc = "Backlinks";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Ot";
|
||||||
|
action = "<CMD>ObsidianTags<CR>";
|
||||||
|
options.desc = "Tags";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Ow";
|
||||||
|
action = "<CMD>ObsidianWorkspace<CR>";
|
||||||
|
options.desc = "Change workspace";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Op";
|
||||||
|
action = "<CMD>ObsidianPasteImg<CR>";
|
||||||
|
options.desc = "Paste image";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Oc";
|
||||||
|
action = "<CMD>ObsidianToggleCheckbox<CR>";
|
||||||
|
options.desc = "Toggle checkbox";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>Of";
|
||||||
|
action = "<CMD>ObsidianSearch<CR>";
|
||||||
|
options.desc = "Find notes";
|
||||||
|
}
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
swapfile = false;
|
swapfile = false;
|
||||||
undofile = true; # Build-in persistent undo
|
undofile = true; # Build-in persistent undo
|
||||||
undolevels = 10000;
|
undolevels = 10000;
|
||||||
|
|
||||||
|
conceallevel = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-1
@@ -1,10 +1,22 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
outline-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "outline-nvim";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "hedyhli";
|
||||||
|
repo = "outline.nvim";
|
||||||
|
rev = "d5c29ee3ff3b7d1bdd454b37698316e67808c36e";
|
||||||
|
hash = "sha256-uWMHUkrGo8D3nUvYrDcXOWbXLWvFv9rWsBxLfR2ckcY=";
|
||||||
|
};
|
||||||
|
nvimSkipModule = "outline.providers.norg";
|
||||||
|
};
|
||||||
|
in {
|
||||||
extraPlugins = with pkgs; [
|
extraPlugins = with pkgs; [
|
||||||
vimPlugins.supermaven-nvim # AI code completion
|
vimPlugins.supermaven-nvim # AI code completion
|
||||||
vimPlugins.vim-dadbod # DB client
|
vimPlugins.vim-dadbod # DB client
|
||||||
vimPlugins.vim-dadbod-completion # DB completion
|
vimPlugins.vim-dadbod-completion # DB completion
|
||||||
vimPlugins.vim-dadbod-ui # DB UI
|
vimPlugins.vim-dadbod-ui # DB UI
|
||||||
vimPlugins.vim-tmux-navigator # tmux navigation
|
vimPlugins.vim-tmux-navigator # tmux navigation
|
||||||
|
outline-nvim
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
@@ -32,5 +44,7 @@
|
|||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = "#000000",
|
background_colour = "#000000",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("outline").setup {}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,64 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
obsidian.enable = true;
|
||||||
|
obsidian.settings = {
|
||||||
|
attachments.img_folder = "Attachments";
|
||||||
|
completion = {
|
||||||
|
min_chars = 2;
|
||||||
|
nvim_cmp = true;
|
||||||
|
};
|
||||||
|
daily_notes = {
|
||||||
|
folder = "notes/dailies";
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
alias_format = "%B %-d, %Y";
|
||||||
|
template = "templates/daily.md";
|
||||||
|
};
|
||||||
|
new_notes_location = "current_dir";
|
||||||
|
note_id_func = ''
|
||||||
|
function(title)
|
||||||
|
local date = os.date("%Y-%m-%d %H%M")
|
||||||
|
local suffix = ""
|
||||||
|
if title ~= nil then
|
||||||
|
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
|
||||||
|
else
|
||||||
|
for _ = 1, 4 do
|
||||||
|
suffix = suffix .. string.char(math.random(65, 90))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return date .. "-" .. suffix
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
workspaces = [
|
||||||
|
{
|
||||||
|
name = "personal";
|
||||||
|
path = "~/Source/gitea-app.internal.freddrake.com/fdrake/PKM-Personal";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
wiki_link_func = "use_alias_only";
|
||||||
|
disable_frontmatter = true;
|
||||||
|
templates = {
|
||||||
|
folder = "Templates";
|
||||||
|
date_format = "%Y-%m-%d";
|
||||||
|
time_format = "%H:%M";
|
||||||
|
substitutions = {};
|
||||||
|
};
|
||||||
|
follow_url_func = ''
|
||||||
|
function(url)
|
||||||
|
-- Open the URL in the default web browser.
|
||||||
|
vim.fn.jobstart({"open", url}) -- Mac OS
|
||||||
|
-- vim.fn.jobstart({"xdg-open", url}) -- linux
|
||||||
|
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
|
||||||
|
-- vim.ui.open(url) -- need Neovim 0.10.0+
|
||||||
|
end'';
|
||||||
|
follow_img_func = ''
|
||||||
|
function(img)
|
||||||
|
vim.fn.jobstart { "qlmanage", "-p", img } -- Mac OS quick look preview
|
||||||
|
-- vim.fn.jobstart({"xdg-open", url}) -- linux
|
||||||
|
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
|
||||||
|
end'';
|
||||||
|
};
|
||||||
|
|
||||||
neo-tree.enable = true;
|
neo-tree.enable = true;
|
||||||
noice.enable = true;
|
noice.enable = true;
|
||||||
notify.enable = true;
|
notify.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user