Skip to content

feature-request: ability to auto-require modules #96

@spikegrobstein

Description

@spikegrobstein

I'm working on a project where there are test files using the busted luarock. The platform that's running the test files doesn't require that the busted functions are declared beforehand, so neovim thinks that the functions are not defined.

For example, a test file may look like:

describe("initialization", function()
  lazy_setup(function()
    -- do some lazy setup
  end)

  before_each(function()
    -- some initialization code
  end)

  it("works as expected", function()
    assert.equal(1, 1)
  end)
end)

at no point in the file is local busted = require("busted") or any definitions of the describe, before_each or lazy_setup functions assigned.

Is there a way to enable this in coc-lua that I'm missing? and if not, could this be an option? maybe as a built-in third-party configuration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions