Skip to content
Discussion options

You must be logged in to vote

Yes.

this is correct event spec useage

    {
        'crates.nvim',
        for_cat = 'rust',
        event = "BufRead Cargo.toml",
        after = function ()
            require('crates').setup()
        end
    },

as would this

    {
        'crates.nvim',
        for_cat = 'rust',
        event = {
            { event = "BufRead", pattern = "Cargo.toml", }
        },
        after = function ()
            require('crates').setup()
        end
    },

To be honest, I thought it would fail at first glance, because when I do this in an autocommand on BufRead callback = function (e) print(vim.inspect(e)) end it says it provides an absolute path for the pattern field. I forgot that its a P…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rafaeljacov
Comment options

@BirdeeHub
Comment options

Answer selected by rafaeljacov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants