Closed illia-danko closed 1 year ago
source code is here https://github.com/clearloop/leetcode-cli/blob/930064f6ae6fd6f48af602f9a524137a9a9d1908/src/cmds/edit.rs#L155
plz try
[code]
editor = "nvim"
editor_args = ["--clean"]
lang = "golang"
pick = "${fid}.${slug}"
submission = "${fid}.${slug}.${sid}.${ac}"
@clearloop I've just reinstalled leetcode-cli using cargo install leetcode-cli
.
The snippet above doesn't work for me. Moreover editor_args
disappears in the configuration file once I run the leetcode-cli command. So the issue is still there
Ok, finally got it:
[code]
editor = "nvim"
editor-args = ["--clean"] # NOTE: in the master branch use editor_args, instead of editor-args
lang = "golang"
pick = "${fid}.${slug}"
submission = "${fid}.${slug}.${sid}.${ac}"
after checking out the latest master, figured out that the argument is editor-args
not editor_args
. It seems a minor issue: other params have snake case syntax, not kebab case...
@clearloop If you like to have editor_args
over editor-args
checkout https://github.com/clearloop/leetcode-cli/pull/112
Use case: As a user I want to use my editor (nvim) without any plugins and configuration to have a clean and similar to white board code interview experience. Neovim has
--clean
argument for this purpose (see nvim --help).It seems that existing ~/.leetcode/leetcode.toml doesn't have this possibility to teach leetcode-cli to run editor with arguments.
if the code block section is modified to something like:
leetcode-cli command returns:
error: No such file or directory (os error 2), please try again