Skip to content

Commit

Permalink
Update config (#599)
Browse files Browse the repository at this point in the history
* Update default config

* Add check_default_config test

* Fix doc

* Bold italic
  • Loading branch information
Riey authored Nov 25, 2022
1 parent 2d19432 commit 85f1517
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"random": "cpp",
"optional": "cpp"
},
"yaml.customTags": [
"!Mode scalar",
"!Toggle sequence",
"!Switch scalar",
],
"C_Cpp.errorSquiggles": "Disabled",
"cmake.sourceDirectory": "${workspaceFolder}/src",
"rust-analyzer.procMacro.enable": true,
Expand Down
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Improve

* Update default config file

## 3.0.0

### Breaking
Expand All @@ -15,6 +17,7 @@
* Builtin sebeolsik `3-90` and `3-91` changed with all jungseong to uncomposable except for ``, ``,``, `ㅜ(9)`, `ㅗ(/)` [#542](https://github.com/Riey/kime/issues/542)
* Respect NUMLOCK state [#591](https://github.com/Riey/kime/issues/591)
* Remove support GTK2
* ***Config file format has changed*** see [wiki](https://github.com/Riey/kime/wiki/3.0.0-Migration-guide) for more information

### Improve

Expand Down
63 changes: 27 additions & 36 deletions res/default_config.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,56 @@
---
daemon:
modules:
- Xim
- Wayland
- Indicator
- Xim
- Wayland
- Indicator
indicator:
icon_color: Black
log:
global_level: DEBUG
engine:
translation_layer: null
default_category: Latin
global_category_state: false
global_hotkeys:
M-C-Backslash:
behavior:
Mode: Math
behavior: !Mode Math
result: ConsumeIfProcessed
Super-Space:
behavior:
Toggle:
- Hangul
- Latin
behavior: !Toggle
- Hangul
- Latin
result: Consume
M-C-E:
behavior:
Mode: Emoji
behavior: !Mode Emoji
result: ConsumeIfProcessed
Esc:
behavior:
Switch: Latin
behavior: !Switch Latin
result: Bypass
Muhenkan:
behavior:
Toggle:
- Hangul
- Latin
behavior: !Toggle
- Hangul
- Latin
result: Consume
AltR:
behavior:
Toggle:
- Hangul
- Latin
behavior: !Toggle
- Hangul
- Latin
result: Consume
Hangul:
behavior:
Toggle:
- Hangul
- Latin
behavior: !Toggle
- Hangul
- Latin
result: Consume
category_hotkeys:
Hangul:
ControlR:
behavior:
Mode: Hanja
behavior: !Mode Hanja
result: Consume
HangulHanja:
behavior:
Mode: Hanja
behavior: !Mode Hanja
result: Consume
F9:
behavior:
Mode: Hanja
behavior: !Mode Hanja
result: ConsumeIfProcessed
mode_hotkeys:
Math:
Expand All @@ -84,9 +74,10 @@ engine:
Tab:
behavior: Commit
result: ConsumeIfProcessed
candidate_font: D2Coding
xim_preedit_font:
- D2Coding
- 15.0
- D2Coding
- 15.0
latin:
layout: Qwerty
preferred_direct: true
Expand All @@ -96,6 +87,6 @@ engine:
preedit_johab: Needed
addons:
all:
- ComposeChoseongSsang
- ComposeChoseongSsang
dubeolsik:
- TreatJongseongAsChoseong
- TreatJongseongAsChoseong
7 changes: 7 additions & 0 deletions src/engine/core/tests/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#[test]
fn check_default_config() {
assert_eq!(
serde_yaml::to_string(&kime_engine_core::RawConfig::default()).unwrap(),
include_str!("../../../../res/default_config.yaml")
);
}

0 comments on commit 85f1517

Please sign in to comment.