Skip to content

Commit 2f36d39

Browse files
authored
Merge pull request #112 from illia-danko/fix/editor-args-naming
fix: snake case editor_args parameter
2 parents bf5b2ab + 95c3190 commit 2f36d39

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ For example, given this config (can be found in `~/.leetcode/leetcode.toml`, it
5454
[code]
5555
lang = "rust"
5656
editor = "emacs"
57+
# Optional parameter
58+
editor_args = ['-nw']
5759
```
5860

5961
#### 1. <kbd>pick</kbd>

src/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub struct Urls {
138138
#[derive(Clone, Debug, Deserialize, Serialize)]
139139
pub struct Code {
140140
pub editor: String,
141-
#[serde(rename(serialize = "editor-args", deserialize = "editor-args"))]
141+
#[serde(rename(serialize = "editor_args", deserialize = "editor_args"))]
142142
pub editor_args: Option<Vec<String>>,
143143
pub edit_code_marker: bool,
144144
pub start_marker: String,

src/cmds/edit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl Command for EditCommand {
140140
// ```toml
141141
// [code]
142142
// editor = "emacsclient"
143-
// editor-args = [ "-n", "-s", "doom" ]
143+
// editor_args = [ "-n", "-s", "doom" ]
144144
// ```
145145
//
146146
// ```rust

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy