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

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

Open
spikegrobstein opened this issue May 30, 2023 · 0 comments
Open

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

spikegrobstein opened this issue May 30, 2023 · 0 comments

Comments

@spikegrobstein
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant