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

Dumb question, what am I doing wrong? #85

Closed
ricbermo opened this issue Dec 15, 2021 · 2 comments
Closed

Dumb question, what am I doing wrong? #85

ricbermo opened this issue Dec 15, 2021 · 2 comments

Comments

@ricbermo
Copy link

Describe the bug
First that all, thanks for putting together this amazing plugin.

That being said, IDK if this is a bug report, most like it is not, but it seems that my config is not working somehow. I'm gonna ommit the other details, hopefully that doesn't offend you 😅 .

This is my config,

local g = vim.g

g.ultest_use_pty = 1
g.ultest_output_on_line = 0
g.ultest_fail_sign = ''

g['test#strategy'] = "kitty"
g['test#preserve_screen'] = 0
g['test#javascript#jest#options'] = "--color=always"

And this is how I'm using it

  use {
    'rcarriga/vim-ultest',
    requires = {'vim-test/vim-test'},
    run = ':UpdateRemotePlugins',
    config = function() require('config.testing') end,
    event = 'BufEnter',
  }

For some reason, I'm still seeing the output when the cursor is on top of the line and the fail icon is still the default one.

image

Please let me know if you want me to add more details. I'll be happy to.

@rcarriga
Copy link
Owner

The problem is this line

    config = function() require('config.testing') end,

Packer will run this after loading the plugin. This works for lua plugins which use a setup function but traditional vimscript plugins run their setup upon loading and so all of the values are read before your config has run. You need to set these values before loading. You can do this by using the setup option of packer rather than config.

@ricbermo
Copy link
Author

That was it. Thanks so much!!

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

2 participants