Closed XXiaoA closed 6 months ago
merge three command about testcases into one command (like
testcases
simply).
I agree, soon or later I'll do that.
change the color of popup window's boarder (except Testcases window) by the test result, so as to recognise the result at glance. For example, red for wrong test and green for correct one.
This looks like a niche use-case, it's most likely out of scope.
Anyway you can get such an effect by defining a custom highlight group, setting floating_border_highlight
accordingly, and using a CursorMoved
autocommand to fetch line content from testcases buffer and update the custom highlight group.
add something like
hook
oruser event
. For instance, i can createbuild
directory before running code to put the binary file into build directory then.
You can already to that:
compile_directory = "build",
compile_command = {
c = { exec = "gcc", args = { "-Wall", "$(FABSPATH)", "-o", "$(FNOEXT)" } },
cpp = { exec = "g++", args = { "-Wall", "$(FABSPATH)", "-o", "$(FNOEXT)" } },
},
running_directory = ".",
run_command = {
c = { exec = "build/$(FNOEXT)" },
cpp = { exec = "build/$(FNOEXT)" },
},
This looks like a niche use-case
Indeed, after thinking twice, it is not necessary.
You can already to that
Thanks, it works. But I think maybe user event
is still a useful function. With it, we can format the code before running, sent notification after finishing the tests etc. ( though i dont need them) It will make the plugin more customizable. What's your opinion? I am not pretty sure if it should be added to.
we can format the code before running
By default save_current_file
is set to true, so you can format the code before running by enabling format on save (see none-ls wiki).
But I think maybe
user event
is still a useful function
It could be, but I can't see any useful use-case for it right now. If anyone comes up with good ideas involving the usage of this feature then we'll consider implementing it, maybe as an autocommand.
Thanks, it is clear!
Fist of all, I really appreciate this awesome plugin, which do me a big favour. After using it for a while, I have the following ideas to make it better:
testcases
simply). And we can add, edit, remove testcases with our keybinding.hook
oruser event
. For instance, i can createbuild
directory before running code to put the binary file into build directory then.