obsidian in nvim

This commit is contained in:
Andrei Stoica 2024-02-13 04:55:51 -05:00
parent e8875ab86b
commit 03ce8091f0
3 changed files with 33 additions and 9 deletions

View File

@ -28,4 +28,4 @@ vim.opt.tabstop = 2
vim.opt.undolevels = 1000 vim.opt.undolevels = 1000
vim.opt.backspace = "indent,eol,start" vim.opt.backspace = "indent,eol,start"
vim.opt.colorcolumn = "80" vim.opt.colorcolumn = "80"
vim.opt.conceallevel = 2

View File

@ -8,7 +8,8 @@ local plugins = {
context = 20, context = 20,
expand = { expand = {
"function", "function",
}, }, },
},
lazy = false, lazy = false,
}, },
{ {
@ -97,6 +98,25 @@ local plugins = {
event = "BufEnter *.md", event = "BufEnter *.md",
}, },
{
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
-- ft = {
-- "BufReadPre ~/Notes/**.md",
-- "BufNewFile ~/Notes/**.md",
-- },
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
workspaces = {
{ name = "personal", path = "~/Notes/personal" },
{ name = "work", path = "~/Notes/work" },
},
new_notes_location = "notes_subdir",
daily_notes = { folder = "notes/dailies" },
},
},
-- Disable nvchad plugins -- Disable nvchad plugins
{ {

16
.zshrc
View File

@ -2,7 +2,7 @@
export PATH=$HOME/bin:/usr/local/bin:/usr/lib65/openjdk-17/bin:$PATH export PATH=$HOME/bin:/usr/local/bin:/usr/lib65/openjdk-17/bin:$PATH
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH=/home/andrei/.oh-my-zsh export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random" # Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded. # it'll load a random theme each time that oh-my-zsh is loaded.
@ -73,7 +73,11 @@ source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then # if [[ -n $SSH_CONNECTION ]]; then
if [[ -e /usr/bin/nvim ]]; then
export EDITOR='nvim'
else
export EDITOR='vim' export EDITOR='vim'
fi
# else # else
# export EDITOR='mvim' # export EDITOR='mvim'
# fi # fi
@ -122,6 +126,8 @@ function work() {
} }
# Open notes folder in nvim then return
function notes() {cd $HOME/Notes; nvim; cd -;};
# JINA_CLI_BEGIN # JINA_CLI_BEGIN
@ -154,8 +160,6 @@ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# JINA_CLI_END # JINA_CLI_END
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion