Add obsidian.nvim plugin, add minor changes related to home-dir cleanup
This commit is contained in:
15
src_files/.config/nvim/lua/auto_commands.lua
Normal file
15
src_files/.config/nvim/lua/auto_commands.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local autoCmdGroup = vim.api.nvim_create_augroup("autoCmdGroup", { clear = true })
|
||||
local autoCmd = vim.api.nvim_create_autocmd
|
||||
|
||||
autoCmd({"BufWritePre"}, {
|
||||
group = autoCmdGroup,
|
||||
pattern = "*",
|
||||
command = [[%s/\s\+$//e]],
|
||||
})
|
||||
|
||||
autoCmd({"BufReadPre"}, {
|
||||
group = autoCmdGroup,
|
||||
pattern = os.getenv("DIR_NOTES") .. "/**/*.md",
|
||||
command = [[lua vim.opt_local.conceallevel = 1]],
|
||||
})
|
||||
|
||||
16
src_files/.config/nvim/lua/plugins_lazy/obsidian.lua
Normal file
16
src_files/.config/nvim/lua/plugins_lazy/obsidian.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
{
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- '*' for latest release, not latest commit
|
||||
ft = "markdown",
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "notes",
|
||||
path = os.getenv("DIR_NOTES"),
|
||||
},
|
||||
},
|
||||
legacy_commands = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -21,6 +21,8 @@ vim.opt.textwidth = 0
|
||||
vim.opt.wrapmargin = 0
|
||||
vim.opt.fillchars = { eob = ' ' }
|
||||
|
||||
vim.opt.conceallevel = 0
|
||||
|
||||
vim.opt.spell = false
|
||||
vim.opt.spelllang = 'en_us'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user