feat(nvim): add neorg
This does more than just the title. Bad commit? Yeah, probably. I'm not going to spend the time to chunk this correctly. 1. Add neorg 2. Remove Overseer as it had conflicting bindings I wanted to use and I never use Overseer 3. Yank a bunch of hop bindings that conflicted with new local leader key. I never used those hop bindings, so no loss there. 4. Add `image.nvim` that allows previewing images directly in Neovim. There's some issues with it for sure in Wezterm, but it works well enough.
This commit is contained in:
parent
9a59c826a6
commit
833a111725
@ -1,8 +1 @@
|
||||
vim.keymap.set("n", "<leader>fge", ":Neorg gtd edit<CR>", {
|
||||
buffer = true,
|
||||
})
|
||||
vim.keymap.set("n", "<leader>fgv", ":Neorg gtd views<CR>", {
|
||||
buffer = true,
|
||||
})
|
||||
|
||||
vim.opt_local.shiftwidth = 2
|
||||
|
@ -3,6 +3,7 @@ local M = {}
|
||||
M.setup = function()
|
||||
-- set mapleader to space
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ";"
|
||||
|
||||
-- Get rid of highlight after search
|
||||
vim.keymap.set("n", "<esc>", function()
|
||||
|
@ -10,11 +10,6 @@ return {
|
||||
desc = "Hop: Character",
|
||||
mode = { "" },
|
||||
},
|
||||
{ ";l", "<cmd>HopLineStart<CR>", desc = "Hop: Line Start" },
|
||||
{ ";s", "<cmd>HopPattern<CR>", desc = "Hop: Pattern" },
|
||||
{ ";;", "<cmd>HopWord<CR>", desc = "Hop: Word" },
|
||||
{ ";a", "<cmd>HopAnywhere<CR>", desc = "Hop: Anywhere" },
|
||||
{ ";v", "<cmd>HopVertical<CR>", desc = "Hop Vertical" },
|
||||
},
|
||||
cmd = {
|
||||
"HopLineStart",
|
||||
|
@ -31,7 +31,7 @@ return {
|
||||
"NeogitLogView",
|
||||
}
|
||||
|
||||
g.indent_blankline_buftype_exclude = { "terminal" }
|
||||
g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
|
||||
g.indent_blankline_show_trailing_blankline_indent = false
|
||||
g.indent_blankline_show_first_indent_level = true
|
||||
|
||||
|
87
dots/.config/nvim/lua/plugins/configs/neorg.lua
Normal file
87
dots/.config/nvim/lua/plugins/configs/neorg.lua
Normal file
@ -0,0 +1,87 @@
|
||||
return {
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
build = function()
|
||||
---@param out SystemCompleted
|
||||
vim.system({"luarocks", "--lua-version", "5.1", "--local", "install", "magick"}, {}, function (out)
|
||||
if out.code ~= 0 then
|
||||
error("Failed to install `magick` luarock for image.nvim!", vim.log.levels.ERROR)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
ft = {"markdown", "norg"},
|
||||
config = function()
|
||||
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
|
||||
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
|
||||
require("image").setup({
|
||||
window_overlap_clear_enabled = true,
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-neorg/neorg",
|
||||
build = ":Neorg sync-parsers", -- This is the important bit!
|
||||
cmd = { "Neorg" },
|
||||
ft = { "norg" },
|
||||
keys = {
|
||||
{ "<leader>o", desc = "> Neorg" },
|
||||
{ "<leader>oj", ":Neorg journal custom<CR>", desc = "Neorg: Journal" },
|
||||
{ "<leader>ot", ":Neorg toc<CR>", desc = "Neorg: Table of Contents" }
|
||||
},
|
||||
config = function()
|
||||
require("neorg").setup({
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp"
|
||||
}
|
||||
},
|
||||
["core.neorgcmd"] = {},
|
||||
["core.summary"] = {},
|
||||
["core.journal"] = {
|
||||
config = {
|
||||
stategy = "flat"
|
||||
},
|
||||
workspace = "default"
|
||||
},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
default_workspace = "default",
|
||||
workspaces = {
|
||||
default = "~/Notes"
|
||||
},
|
||||
index = "index.norg"
|
||||
}
|
||||
},
|
||||
["core.concealer"] = {
|
||||
config = {
|
||||
folds = false,
|
||||
icon_preset = "diamond",
|
||||
icons = {
|
||||
code_block = {
|
||||
conceal = true,
|
||||
content_only = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
["core.integrations.treesitter"] = {
|
||||
config = {
|
||||
configure_parsers = true,
|
||||
install_parsers = true
|
||||
}
|
||||
},
|
||||
["core.qol.todo_items"] = {
|
||||
config = {
|
||||
create_todo_items = true,
|
||||
create_todo_parents = true
|
||||
}
|
||||
},
|
||||
["core.ui"] = {},
|
||||
["core.ui.calendar"] = {}
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/overseer.nvim",
|
||||
cmd = {
|
||||
"OverseerRun",
|
||||
"OverseerInfo",
|
||||
"OverseerOpen",
|
||||
"OverseerBuild",
|
||||
"OverseerClose",
|
||||
"OverseerRunCmd",
|
||||
"OverseerToggle",
|
||||
"OverseerClearCache",
|
||||
"OverseerLoadBundle",
|
||||
"OverseerSaveBundle",
|
||||
"OverseerTaskAction",
|
||||
"OverseerQuickAction",
|
||||
"OverseerDeleteBundle",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>or", desc = "> Overseer" },
|
||||
{ "<leader>or", vim.cmd.OverseerRun, desc = "Overseer: Run" },
|
||||
{ "<leader>ot", vim.cmd.OverseerToggle, desc = "Overseer: Toggle" },
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user