Skip to content

nvim-cmp does not trigger when using markdown link style #777

@kikur4ge

Description

@kikur4ge

🐛 Describe the bug

Starting with 052235c completion with nvim-cmp no longer works if link.style is set to "markdown". There is no error but completion is not triggered/there is no completion menu available. Completion does work if using blink.cmp or if link.style is set to "wiki".

If the changes to completion/refs.lua are reverted then completion does work with [ as the trigger.

:CmpStatus gives

# ready source names
- path
- luasnip
- obsidian
- obsidian_tags
- obsidian_new

Config

return {
    {
        "obsidian-nvim/obsidian.nvim",
        version = "*",
        dependencies = {
            "nvim-lua/plenary.nvim",
        },
        config = true,
        lazy = true,
        event = {
            "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
        },

        opts = {

            legacy_commands = false,
            workspaces = {
                {
                    name = "Notes",
                    path = vim.fn.expand("~") .. "/my_vault/",
                },
            },

            completion = {
                nvim_cmp = true,
            },

            link = {
                style = "markdown",
            },
        },
    },
}

Environment


==============================================================================
obsidian:                                                                   ✅

- ✅ OK neovim >= 0.11 (0.11.6)

[Version] ~
- ✅ OK obsidian.nvim v3.15.11 (052235c1e7b7c2655c3d743b3779f42e7975e2d0)

[Environment] ~
- ✅ OK operating system: Darwin

[Config] ~
- ✅ OK dir: /Users/<user>/my-vault/

[Pickers] ~
- ✅ OK telescope.nvim: 3333a52ff548ba0a68af6d8da1e54f9cd96e9179
- ✅ OK snacks.nvim: ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e

[Completion] ~
- ✅ OK nvim-cmp: da88697d7f45d16852c6b2769dc52387d1ddc45f

[Dependencies] ~
- ✅ OK rg: 15.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions