프로젝트
GitHub에서 보기
andvarfolomeev/obsidian
소개
:book: Base Obsidian functionality in your Neovim
생산성 및 자동화What you can do
- Creating new notes
- Creating/Opening daily notes
- Selecting and inserting templates to buffer with support placeholders like: {{title}}, {{date}}, {time}}
- Searching notes with Telescope integration
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalObsidian for Neovim (WIP)
I often use Obsidian to take daily notes and maintain my knowledge base. This plugin allows you to use the basic functionality to work with Obsidian vaults.
For full experience needs nvim-telescope/telescope.nvim plugin, nvim-cmp plugin. And it also needs CLI tools like ripgrep, fd and sd.
See more details in Features and help file.
Features
- Opening vault
- Creating new notes
- Creating/Opening daily notes
- Selecting and inserting templates to buffer with support placeholders like:
{{title}},{{date}},{time}} - Searching notes with Telescope integration
- Searching backlinks of the current note
- Going to file via wiki link
- Renaming current note with updating wiki links
- Autocomplete of wiki links with cmp integration
- Multi vault
Configuration example with lazy.nvim
You do not need to decorate functions in keys if you have only one vault in opts.vaults.
{
'ada0l/obsidian',
lazy = 'VeryLazy',
keys = {
{ '<leader>ov', '<cmd>lua require("obsidian").vault_prompt()<cr>', desc = 'Vault prompt' },
{ '<leader>oc', '<cmd>lua require("obsidian").cd_vault()<cr>', desc = 'Cd vault' },
{ '<leader>on', '<cmd>lua require("obsidian").new_note_prompt()<cr>', desc = 'New note' },
{ '<leader>ot', '<cmd>lua require("obsidian").open_today()<cr>', desc = 'Open today' },
{ '<leader>oT', '<cmd>lua require("obsidian").open_today_prompt()<cr>', desc = 'Open today (shift)' },
{ '<leader>oi', '<cmd>lua require("obsidian").template_picker()<cr>', desc = 'Template picker' },
{ '<leader>of', '<cmd>lua require("obsidian").note_picker()<cr>', desc = 'Note picker' },
{ '<leader>ob', '<cmd>lua require("obsidian").backlinks_picker()<cr>', desc = 'Backlinks picker' },
{ '<leader>or', '<cmd>lua require("obsidian").rename_prompt()<cr>', desc = 'Rename prompt' },
{
'gf',
function()
if require('obsidian').found_wikilink_under_cursor() ~= nil then
return '<cmd>lua require("obsidian").go_to()<CR>'
else
return 'gf'
end
end,
noremap = false,
expr = true,
},
},
---@type ObsidianOptions
opts = {
extra_fd_opts = '--exclude assets --exclude journals --exclude _debug_remotely_save',
vaults = {
{
dir = '~/Knowledge/',
daily = {
dir = 'journals',
format = '%Y-%m-%d',
},
note = {
dir = '.',
transformator = function(filename)
if filename ~= nil and filename ~= '' then
return filename
end
return string.format('%d', os.time())
end,
},
templates = {
dir = 'templates',
date = '%Y-%d-%m',
time = '%Y-%d-%m',
},
},
},
},
}
Cmp integration
{
'hrsh7th/nvim-cmp',
dependencies = {
'ada0l/obsidian',
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local cmp = require('cmp')
local obsidian = require('obsidian')
cmp.register_source('obsidian', obsidian.get_cmp_source().new())
table.insert(opts.sources, { name = 'obsidian' })
end,
},
Similar plugins
관련 프로젝트 살펴보기
불러오는 중…