Add jest_cmd option to allow configuring the command#1
Conversation
|
i ended up forking as i just wanted to copy to clipboard instead of opening a window inside nvim, but i also improved the matching: https://github.com/callumacrae/dotfiles/blob/master/vim/config/plugin-config/jest.lua it supports multi-line test definitions, e.g.: it(
'should do something and also has a really long name',
() => { /* ... *? }
)it supports function definitions being elsewhere: it('should test something', testSomething)
function testSomething() {
// can run :JestSingle from here
}The second one is quite specific to the project i'm working on and brittle, but feel free to take as much as you'd find useful :) |
|
My apologies for not looking at this sooner. I'll try to get to this within the next couple of days. I'll definitely take a look through what you have forked and we could try to pull it into the project. |
|
I think my inclination is to not store a configuration globally, but rather pass in overriding user configuration via a Possibly something like: require('jest.nvim').setup({
jest_cmd: 'yarn test --silent'
})Here is how treesitter accomplishes this: I can try to look into taking a swing at this in a bit. |
|
that's fair - i did it as a config option so that i could override it in project-level config files, but i guess people with that case could just use the option from a project-level config file in the setup call |
|
I just pushed up a change, so that rather than utilize If you have a chance, then let me know your thoughts on this. I'll try to capture your other suggestions in separate issues, then tackle them individually. |
|
Looks like it mostly solves the case I had! Doesn't this always run |
When If The reason I thought to put |
I've never written lua or contributed to a plugin before so please treat this accordingly!
This is a good plugin :)