Closed manavkush closed 9 months ago
I discovered this plugin yesterday and I'm amazed at the level of customization and documentation.
Thanks!
-> testcases | -> Testcase files (input & output)
Have you considered using single file instead of a folder?
Anyway the config you're looking for is the following:
testcases_directory = 'testcases',
compile_directory = 'bin',
running_directory = 'bin',
compile_command = {
c = { exec = 'gcc', args = { '$(FABSPATH)', '-o', '$(FNOEXT)' } },
cpp = { exec = 'g++', args = { '$(FABSPATH)', '-o', '$(FNOEXT)' } },
},
Please mind that compile_command
requires two argument for each language, exec and args, otherwise unexpected errors like this could happen.
Yes, the compile command needed args which I didn't provide. Thank you!!!
Hi all, I discovered this plugin yesterday and I'm amazed at the level of customization and documentation.
So I tried setting the plugin in my neovim config. Using the default configuration, it worked as expected. But I wanted a cleaner directory structure with the executable files in a seperate folder as well as the testcases.
So the basic folder structure that I desired was:
For this I specified the following:
But the
CompetiTest run
gave an error.Error executing luv callback: vim/_editor.lua:0: E5560: nvim_err_writeln must not be called in a lua loop callback stack traceback: [C]: in function 'nvim_err_writeln' vim/_editor.lua: in function 'notify' ...are/nvim/lazy/competitest.nvim/lua/competitest/utils.lua:8: in function 'notify' ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:205: in function 'execute_testcase' ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:128: in function 'run_first_testcases' ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:138: in function 'callback' ...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:201: in function <...re/nvim/lazy/competitest.nvim/lua/competitest/runner.lua:167>
I also tried another way.
which resulted in compilation error:
Could anyone give any details on how to use the mentioned options or any of the corresponding commands(like compile_command) ?
Thanks