nvim-neotest / neotest-python

MIT License
132 stars 40 forks source link

feat(query): include test decorators in the test definition #34

Closed OddBloke closed 1 year ago

OddBloke commented 1 year ago

This means that neotest.run.run when the cursor is on a test's decorators will run the decorated test (instead of running the previous test in the file, the current behaviour).

Fixes: #31

rcarriga commented 1 year ago

Looks good! The only thing I don't like is that now signs, virtual text etc are displayed on the line of the first decorator which is just a bit odd :sweat_smile: However that's an issue for neotest core. I think a nice way to handle it would be to allow a name key in the range table which consumers can use to know where the name is defined and if not provided just default to the first line of the definition