You are able to configure jumpwire depending on your project. Here are some defaults. To use jumpwire you have to call the setup function. And below here are some common used configurations. Be aware that you cannot use overlapping file types at the same time.
Put a configuration in the language table inside your init.vim.
lua require('jumpwire').setup({ language = {
\ ['ts'] = {
\ test = { type = 'fileExtension', data = 'test.ts'},
\ style = { type = 'fileExtension', data = 'css'},
\ },
\ }})
Or into a lua file.
require('jumpwire').setup({ language = {
['ts'] = {
test = { type = 'fileExtension', data = 'test.ts'},
style = { type = 'fileExtension', data = 'css'},
},
}})
Replace the existing entry inside the language table ( ['ts'] .... ) where you call the setup function
['spec.ts'] = {
implementation = { type = 'fileExtension', data = 'ts'},
markup = { type = 'fileExtension', data = 'html'},
style = { type = 'fileExtension', data = 'css'}
},
['ts'] = {
test = { type = 'fileExtension', data = 'spec.ts'},
markup = { type = 'fileExtension', data = 'html'},
style = { type = 'fileExtension', data = 'css'},
},
['html'] = {
implementation = { type = 'fileExtension', data = 'ts'},
test = { type = 'fileExtension', data = 'spec.ts'},
style = { type = 'fileExtension', data = 'css'}
},
['css'] = {
implementation = { type = 'fileExtension', data = 'ts'},
test = { type = 'fileExtension', data = 'spec.ts'},
markup = { type = 'fileExtension', data = 'html'},
},
['java'] = {
implementation = { type = 'jvm', data = 'implementation'},
test = { type = 'jvm', data = 'test'},
},
['kt'] = {
implementation = { type = 'jvm', data = 'implementation'},
test = { type = 'jvm', data = 'test'},
},
['test.ts'] = {
implementation = { type = 'fileExtension', data = 'ts'},
style = { type = 'fileExtension', data = 'css'}
},
['ts'] = {
test = { type = 'fileExtension', data = 'test.ts'},
style = { type = 'fileExtension', data = 'css'},
},
['css'] = {
implementation = { type = 'fileExtension', data = 'ts'},
test = { type = 'fileExtension', data = 'test.ts'},
},
['test.ts'] = {
implementation = { type = 'fileExtension', data = 'ts'},
markup = { type = 'fileExtension', data = 'vue'},
style = { type = 'fileExtension', data = 'vue'}
},
['ts'] = {
test = { type = 'fileExtension', data = 'test.ts'},
markup = { type = 'fileExtension', data = 'vue'},
style = { type = 'fileExtension', data = 'vue'},
},
['vue'] = {
implementation = { type = 'lineContains', data = '<script'},
test = { type = 'fileExtension', data = 'test.ts'},
markup = { type = 'lineContains', data = '<template'},
style = { type = 'lineContains', data = '<style'}
},
['test.ts'] = {
implementation = { type = 'fileExtension', data = 'ts'},
markup = { type = 'fileExtension', data = 'svelte'},
style = { type = 'fileExtension', data = 'svelte'}
},
['ts'] = {
test = { type = 'fileExtension', data = 'test.ts'},
markup = { type = 'fileExtension', data = 'svelte'},
style = { type = 'fileExtension', data = 'svelte'},
},
['svelte'] = {
implementation = { type = 'lineContains', data = '<script'},
test = { type = 'fileExtension', data = 'test.ts'},
markup = { type = 'lineContains', data = '<div'},
style = { type = 'lineContains', data = '<style'}
},