epwalsh / obsidian.nvim

Obsidian ๐Ÿค Neovim
Apache License 2.0
3.3k stars 150 forks source link

Hex codes inside code block are recognized as tags #609

Closed BinaryFly closed 1 month ago

BinaryFly commented 1 month ago

๐Ÿ› Describe the bug

I have a note that was sort of a pastebin for my windows terminal configuration, in this configuration there are some hexadecimal color codes. When I run ObsidianTags the color codes are also listed as tags. I don't think this is the desired behaviour, also because the official obsidian client doesn't list these hexadecimal color codes as tags when I want to add a new one to a note. I propose that text inside a codeblock or inline code doesn't qualify as a tag.

Here the part of the codeblock that causes this behaviour:

    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#4F525D",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#073642",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#555753",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }

Config

my lazy.nvim plugin load section.

-- hides stuff as concealchar, or as listchar.
-- set to 2 to hide listchar completely
-- set to 3 to hide both completely

-- autocmd for setting the conceallevel to 2 when entering the obsidian workspace
local obsidian_augroup = vim.api.nvim_create_augroup("obsidian", { clear = true })
vim.api.nvim_create_autocmd({ "BufReadPre", "BufEnter", "BufWinEnter" }, {
    pattern = { "*.md" },
    group = obsidian_augroup,
    callback = function() vim.opt.conceallevel=2 end,
    desc = "Set conceallevel to 2 when entering a markdown file"
})

-- autocmd for setting the conceallevel to 0 when leaving the obsidian workspace
vim.api.nvim_create_autocmd({ "BufReadPost", "BufLeave", "BufWinLeave" }, {
    pattern = { "*.md" },
    group = obsidian_augroup,
    callback = function() vim.opt.conceallevel=0 end,
    desc = "Reset conceallevel when exiting markdown file"
})

return {
    workspaces = {
        {
            name = "Obsidian Vault",
            path = vim.g.obsidian_vault_path,
        }
    },

    daily_notes = {
        folder = "Dailies",
    },

    completion = { -- Set to false to disable completion.
        nvim_cmp = true,
        -- Trigger completion at 2 chars.
        min_chars = 2,
    },

    mappings = {
        ["gf"] = {
            action = function()
                return require("obsidian").util.gf_passthrough()
            end,
            opts = { noremap = false, expr = true, buffer = true },
        },
        -- Toggle check-boxes.
        ["<leader>ch"] = {
            action = function()
                return require("obsidian").util.toggle_checkbox()
            end,
            opts = { buffer = true },
        },
    },

    new_notes_location = "current_dir",

    -- Optional, customize how note IDs are generated given an optional title.
    ---@param title string|?
    ---@return string
    note_id_func = function(title)
        -- put the title first and then the unique id to make it easier to search with telescope on filenames
        local prefix = ""
        if title ~= nil then
            -- If title is given, transform it into valid file name.
            prefix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
        else
            -- If title is nil, just add 4 random uppercase letters to the suffix.
            for _ = 1, 4 do
                prefix = prefix .. string.char(math.random(65, 90))
            end
        end
        return tostring(prefix .. "-" .. os.time())
    end,

    ---@param url string
    follow_url_func = function(url)
        vim.fn.jobstart({ vim.g.browser, url }) -- linux
    end,

    attachments = {
        img_folder = "assets/imgs", -- This is the default
        ---@param client obsidian.Client
        ---@param path obsidian.Path the absolute path to the image file
        ---@return string
        img_text_func = function(client, path)
            local relative_to_buffer_path = client:vault_relative_path(path) or path
            return string.format("![%s](%s)", path.name, relative_to_buffer_path)
        end,
    },
}

Environment

nvim version

NVIM v0.10.0-dev-2685+g02d00cf3e
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info

obsidian info

Obsidian.nvim v3.7.12 (db41b1f20459293436fab510bec58c82a73bd1f7)
Status:
  รข?ยข buffer directory: nil
  รข?ยข working directory: -
Dependencies:
  รขo" plenary.nvim: a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683
  รขo" nvim-cmp: 5260e5e8ecadaf13e6b82cf867a909f54e15fd07
  รขo" telescope.nvim: d90956833d7c27e73c621a61f20b29fdb7122709
Integrations:
  รขo" picker: TelescopePicker()
  รขo" completion: enabled (nvim-cmp) รขo- refs, รขo- tags, รขo- new
    all sources:
      รข?ยข path
      รข?ยข nvim_lsp
      รข?ยข luasnip
      รข?ยข buffer
Tools:
  รขo" rg: ripgrep 14.1.0 (rev e50df40a19)
Environment:
  รข?ยข operating system: Windows
Config:
  รข?ยข notes_subdir: nil
epwalsh commented 1 month ago

Hey @BinaryFly we do try to skip codeblocks, but it seems for some reason your codeblock is not skipped. I've tried reproducing with the codeblock above but it works as expected for me (none of those codes are picked up as tags). Can you post the raw markdown for the note where this happens?

BinaryFly commented 1 month ago

Yes of course, here is the complete note, the code block starts with ```json

Windows Terminal

This is a dump for my current windows terminal json config, its a sort of repo for quick sync between my windows computers.

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "moveTab",
                "direction": "forward"
            },
            "keys": "alt+shift+period"
        },
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": 
            {
                "action": "moveFocus",
                "direction": "up"
            },
            "keys": "alt+k"
        },
        {
            "command": "paste"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        },
        {
            "command": 
            {
                "action": "scrollDown"
            }
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": 
            {
                "action": "nextTab"
            },
            "keys": "ctrl+alt+l"
        },
        {
            "command": 
            {
                "action": "prevTab"
            },
            "keys": "ctrl+alt+h"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "right"
            },
            "keys": "alt+shift+5"
        },
        {
            "command": 
            {
                "action": "moveFocus",
                "direction": "down"
            },
            "keys": "alt+j"
        },
        {
            "command": 
            {
                "action": "scrollUp"
            }
        },
        {
            "command": 
            {
                "action": "moveTab",
                "direction": "backward"
            },
            "keys": "alt+shift+comma"
        },
        {
            "command": 
            {
                "action": "moveFocus",
                "direction": "left"
            },
            "keys": "alt+h"
        },
        {
            "command": "scrollDownPage",
            "keys": "ctrl+alt+d"
        },
        {
            "command": 
            {
                "action": "moveFocus",
                "direction": "right"
            },
            "keys": "alt+l"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "down"
            },
            "keys": "alt+shift+'"
        },
        {
            "command": "unbound",
            "keys": "ctrl+v"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+1"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+2"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+3"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+4"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+5"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+6"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+7"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+8"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+9"
        },
        {
            "command": "unbound",
            "keys": "alt+right"
        },
        {
            "command": "unbound",
            "keys": "alt+left"
        },
        {
            "command": "unbound",
            "keys": "alt+down"
        },
        {
            "command": "unbound",
            "keys": "alt+up"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+pgdn"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+pgup"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+up"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+down"
        },
        {
            "command": "unbound",
            "keys": "ctrl+u"
        },
        {
            "command": "unbound",
            "keys": "ctrl+d"
        },
        {
            "command": "unbound",
            "keys": "ctrl+k"
        },
        {
            "command": "unbound",
            "keys": "ctrl+j"
        },
        {
            "command": "unbound",
            "keys": "ctrl+shift+tab"
        },
        {
            "command": "unbound",
            "keys": "ctrl+tab"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+1"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+2"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+3"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+4"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+5"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+6"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+7"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+8"
        },
        {
            "command": "unbound",
            "keys": "ctrl+alt+9"
        },
        {
            "command": "scrollUpPage",
            "keys": "ctrl+alt+u"
        },
        {
            "command": "openTabRenamer",
            "keys": "alt+r"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": 
        {
            "colorScheme": "One Half Dark",
            "font": 
            {
                "face": "LiterationMono Nerd Font"
            },
            "opacity": 80
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{75ef72f5-bf4d-5144-afbc-0a880013e907}",
                "hidden": false,
                "name": "Developer Command Prompt for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{d791cc7b-e390-5ef3-8de4-4665286d68b2}",
                "hidden": false,
                "name": "Developer PowerShell for VS 2022",
                "source": "Windows.Terminal.VisualStudio"
            },
            {
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "hidden": false,
                "name": "PowerShell",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "guid": "{16208362-94fc-5b1f-a491-5b2624d5ab56}",
                "hidden": true,
                "name": "Visual Studio Debug Console",
                "source": "VSDebugConsole"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#4F525D",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#073642",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#555753",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ],
    "themes": []
}
epwalsh commented 1 month ago

Ah, found the issue... Currently we detect codeblocks by reading the file, which can be very inefficient of course for big files, so we set a cap on the number of lines to read. That cap was set to 500, and your file is just over that limit, so obsidian.nvim didn't scan the whole file.

So I've opened #614 which makes this configurable and also increases the default to 1000.