with markdown and obsidian

This commit is contained in:
Fernando Bueno 2024-07-02 02:05:13 -04:00
parent d78e602f0f
commit 5872e327eb
7 changed files with 81 additions and 5 deletions

View File

@ -114,3 +114,7 @@ keymap.set("n", "<leader>4", function() require("harpoon.ui").nav_file(4) end, o
-- undotree
keymap.set("n", "<leader>u", ":UndotreeToggle<CR>")
keymap.set("n", "<Tab>", ">>", opts)
keymap.set("n", "<S-Tab>", "<<", opts)
keymap.set("v", "<Tab>", ">gv", opts)
keymap.set("v", "<S-Tab>", "<gv", opts)

View File

@ -20,6 +20,5 @@ opt.tabstop = 2
opt.termguicolors = true
opt.wrap = false
opt.timeoutlen = 222
opt.conceallevel = 1
-- Set shellcmdflag
opt.shellcmdflag = "-c"

View File

@ -1,3 +1,5 @@
return {}
--[[
return {
"windwp/nvim-autopairs",
config = function()
@ -28,3 +30,4 @@ return {
end,
}
--]]

View File

@ -26,5 +26,6 @@ return {
'nvim-telescope/telescope-file-browser.nvim',
'RRethy/vim-illuminate',
'mbbill/undotree',
-- 'styled-components/vim-styled-components'
}

View File

@ -0,0 +1,11 @@
return {
'MeanderingProgrammer/markdown.nvim',
name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim
dependencies = {
'nvim-treesitter/nvim-treesitter', -- Mandatory
'nvim-tree/nvim-web-devicons', -- Optional but recommended
},
config = function()
require('render-markdown').setup({})
end,
}

View File

@ -0,0 +1,58 @@
return {
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
ft = "markdown",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("obsidian").setup({
workspaces = {
{
name = "antenando",
path = "~/gdrive/DriveSyncFiles/antenando-vault",
},
},
completion = {
nvim_cmp = true,
min_chars = 2,
},
new_notes_location = "notes_subdir",
note_id_func = function(title)
return title
end,
note_frontmatter_func = function(note)
local out = { id = note.id, aliases = note.aliases, tags = note.tags }
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
for k, v in pairs(note.metadata) do
out[k] = v
end
end
return out
end,
mappings = {},
templates = {
subdir = "Templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
tags = "",
substitutions = {
yesterday = function()
return os.date("%Y-%m-%d", os.time() - 86400)
end,
tomorrow = function()
return os.date("%Y-%m-%d", os.time() + 86400)
end,
},
},
ui = {
enable = true,
},
})
end,
}

View File

@ -6,8 +6,8 @@ return {
require('typescript-tools').setup {
settings = {
tsserver_plugins = {
-- '@styled/typescript-styled-plugin',
'typescript-styled-plugin',
'@styled/typescript-styled-plugin',
-- 'typescript-styled-plugin',
},
},
}