epwalsh / epwalsh/obsidian.nvim
disable_frontmatter not being respected in any file
- Dominant language
- Lua
- Stars
- 6.2k
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
### 🐛 Describe the bug
I have set disable_frontmatter to true, and frontmatter is still being written to the file on write. Config is copy pasted from here, with the only changes being that and enabling advanced uri. I've spot tested this with a few files, and it seems to happen consistently if I edit any file in my vault.
### Config
```
{
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
disable_frontmatter = true,
use_advanced_uri = true,
ft = "markdown",
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
-- event = {
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
-- -- refer to `:h file-pattern` for more examples
-- "BufReadPre path/to/my-vault/*.md",
-- "BufNewFile path/to/my-vault/*.md",
-- },
dependencies = {
-- Required.
"nvim-lua/plenary.nvim",
-- see below for full list of optional dependencies 👇
},
opts = {
workspaces = {
{
name = "vault",
path = "~/vault",
},
},
-- see below for full list of options 👇
},
},
```
### Environment
```
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"
```
```
Obsidian.nvim v3.9.0 (14e0427bef6c55da0d63f9a313fd9941be3a2479)
Status:
• buffer directory: nil
• working directory: /Users/mediapathic/Library/Mobile Documents/27N4MQEA55~pro~writer/Documents/vault
Workspaces:
✓ active workspace: Workspace(name='vault', path='/Users/mediapathic/Library/Mobile Documents/27N4MQEA55~pro~writer/Documents/vault', root='/Users/mediapathic/Library/Mobile Documents/27N4MQEA55~pro~writer/Documents/vault')
Dependencies:
✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
✓ nvim-cmp: f17d9b4394027ff4442b298398dfcaab97e40c4f
✓ telescope.nvim: 85922dde3767e01d42a08e750a773effbffaea3e
Integrations:
✓ picker: TelescopePicker()
✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
all sources:
• nvim_lsp
• path
• buffer
• luasnip
• lazydev
Tools:
✓ rg: ripgrep 14.1.0
Environment:
• operating system: Darwin
Config:
• notes_subdir: nil%
```
Contributor guide
Research direction
No source file, test, or entry point is named. Reproduce the issue with the supplied Neovim configuration and inspect the path that writes frontmatter when a Markdown file is saved; done means files are written without frontmatter when disable_frontmatter is true, while other frontmatter behavior remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100