Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable_frontmatter not being respected in any file #771

Open
mediapathic opened this issue Nov 16, 2024 · 1 comment
Open

disable_frontmatter not being respected in any file #771

mediapathic opened this issue Nov 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mediapathic
Copy link

🐛 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%
@mediapathic mediapathic added the bug Something isn't working label Nov 16, 2024
@hendrikbursian
Copy link

You currently pass it as a lazy vim option - not as an option for the obsidian plugin. Put it under the lazy.vim opts key ;)

I just made the same mistake, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants