Git Product home page Git Product logo

obs.nvim's Issues

relative path vault_home in setup

My setup function

require("obs").setup({
	vault_home = "~/Obsidian",
})

I add insert template keymap and when I try to insert template nvim says "Current buffer is not a note"

vim.keymap.set("n", "<leader>nT", function()
	obs.vault:run_if_note(function()
		obs.vault:find_and_insert_template()
	end)
end, { desc = "Inserts notes Template" })

if I change my config to absolute path it works fine

local Path = require("plenary.path")
require("obs").setup({
	vault_home = (Path:new(Path.path.home) / "Obsidian"):absolute(),
})

it also works fine if change is_current_buffer_in_vault

from:
---checks if this buffer in the vault, usefull in autocommands.
---@return boolean
function Vault:is_current_buffer_in_vault()
    local file_name = vim.api.nvim_buf_get_name(0)
    return core.string_has_prefix(file_name, self._home_path:absolute(), true)
end
to:
---checks if this buffer in the vault, usefull in autocommands.
---@return boolean
function Vault:is_current_buffer_in_vault()
    local file_name = vim.api.nvim_buf_get_name(0)
    return core.string_has_prefix(file_name, self._home_path:expand(), true)
end

Move note to directory dialog

Is your feature request related to a problem? Please describe.

As a heavy Obsdiain user I like their Move current file to another folder command. I'd like to have a similar dialog.

Describe the solution you'd like

I see possible solution might be implemented using telescope search through directories and custom selection handler.

Describe alternatives you've considered

I move files manually using neo-tree. Usually I use Obsidian to handle file management.

Additional context

Weekly notes

Is your feature request related to a problem? Please describe.

Obsidian supports weekly notes. The support is provided via third-party plugin: https://github.com/liamcain/obsidian-calendar-plugin.

Describe the solution you'd like

I'd like to have API similar to existing of daily notes. API might be a part of Journal abstraction.

Describe alternatives you've considered

Using telescope to search already created weekly notes is fine. But it's read-only way to interact with them.

Additional context

todo/list interactions

Is your feature request related to a problem? Please describe.

Obsidian allow me to interact with TODO-list item using commands:

  • toggle bullet list,
  • toggle checkbox status.

That'd be cool to have a similar feature here.

Describe the solution you'd like

The Vault abstraction might provide a method which will cycle through different list options:

  • bullet,
  • checkbox,
  • no list.

Describe alternatives you've considered

Doing it manually is fine, but not very convenient. I use lua-snip to ease the pain.

Additional context

Search through todo items

Is your feature request related to a problem? Please describe.

As a user I want tot have a way to search through all todos in the vault.

Describe the solution you'd like

We might be able to populate telescope search with items from files in the vault.

Describe alternatives you've considered

There are no viable alternative to do this outside of Obsidian.

Additional context

Copy current note link

Is your feature request related to a problem? Please describe.

I want to easily copy a link to a note i'm working on. This allows me to easily reference it.

Describe the solution you'd like

Copy [[current note name]] using y command.

Describe alternatives you've considered

There are no alternatives.

Additional context

Calendar ๐Ÿ“… View

Is your feature request related to a problem? Please describe.

As a user I want something similar to Obsidian Calendar Plugin.

Describe the solution you'd like

I want to be able to have calendar-like buffer where I can choose arbitrary date and navigate to corresponding daily note (or create one of the note doesn't exist yet).

Describe alternatives you've considered

Searching dates manually.

Additional context

Issue & PR template

I have to create templates for PRs and issues.

Issue templates:

  • question,
  • bug,
  • feature.

PR templates:

  • one template to rule them all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.