# How to Configure the Tips (超级提示) Feature in Rime Wanxiang

> Learn how to configure the Rime Wanxiang Tips (超级提示) feature by enabling the super_tips switch and customizing commit keys for efficient text input.

- Repository: [amzxyz/rime_wanxiang](https://github.com/amzxyz/rime_wanxiang)
- Tags: how-to-guide
- Published: 2026-02-24

---

**The Tips (超级提示) feature is enabled via the `super_tips` switch in [`wanxiang.schema.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang.schema.yaml), maintains a LevelDB database compiled from [`tips_show.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/tips_show.txt) and [`tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/tips_user.txt), and supports custom commit keys and category filtering through schema-level configuration.**

The rime_wanxiang input method schema implements the **Tips (超级提示)** feature as a Lua-based processor that displays context-sensitive hints in the segment prompt area. This system reads from a local LevelDB database built from plain-text tip tables, allowing you to customize everything from the trigger key to the specific categories of tips displayed. Learning how to configure the Tips feature lets you control exactly when and how contextual suggestions appear during composition.

## Enabling the Tips Processor

The feature requires two declarations in your schema configuration to function. First, register the processor in the `engine/processors` section of [`wanxiang.schema.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang.schema.yaml) (line 57):

```yaml
- lua_processor@*super_tips                 # 超级提示模块

```

Second, define the toggle switch that controls visibility. In [`wanxiang.schema.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang.schema.yaml) (lines 42‑44), the switch appears as:

```yaml
- name: super_tips
  states: [ 提示关, 提示开 ]
  reset: 1

```

Setting `reset: 1` enables the feature by default (提示开), while `0` disables it (提示关).

## Customizing Tip Behavior

### Commit Key Configuration

When the processor displays a tip, you commit it using a dedicated key defined by `key_binder/tips_key`. The default configuration in [`lua/super_tips.lua`](https://github.com/amzxyz/rime_wanxiang/blob/main/lua/super_tips.lua) (line 6) uses the **slash** key:

```yaml
key_binder:
  tips_key: "slash"  # 上屏按键配置

```

You can remap this to any valid key identifier, such as `"space"` or `"Return"`.

### Filtering Tip Categories

To exclude entire categories of tips—such as emoji or Chinese-English translations—use the `tips/disabled_types` configuration (referenced in [`super_tips.lua`](https://github.com/amzxyz/rime_wanxiang/blob/main/super_tips.lua) line 7):

```yaml
tips:
  disabled_types:
    - emoji
    - chinese_english

```

The processor checks this list during initialization (function `tips.init`, lines 86‑114) and omits matching entries from the database.

## Understanding the Data Architecture

The Tips feature relies on a **LevelDB** database that the processor rebuilds automatically when source files change. The system monitors two plain-text sources:

- **[`lua/data/tips_show.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/lua/data/tips_show.txt)**: The built-in tip table shipped with rime_wanxiang.
- **[`lua/data/tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/lua/data/tips_user.txt)**: Optional user-provided overrides (create this file if it does not exist).

During startup, the `generate_files_signature` function creates a fingerprint of both files. If the signature or the `disabled_types` configuration differs from the stored database version, the processor triggers `tips.init_db_from_file` (lines 119‑151) to rebuild the LevelDB index.

Each line in these text files must follow the format **value<TAB>key**, where the value is the displayed text and the key is the trigger string:

```

😊	笑脸
🚗	汽车
quick brown fox	example

```

When the context changes, `update_tips_prompt` (lines 177‑200) queries the database via `tips.get_tip` and renders the result in the segment prompt as `〔tip content〕`.

## Practical Configuration Examples

### Toggle the Feature On or Off

```yaml

# wanxiang.custom.yaml

switches:
  - name: super_tips
    states: [ 提示关, 提示开 ]
    reset: 1  # Set to 0 to disable by default

```

### Change the Commit Key to Space

```yaml
key_binder:
  tips_key: "space"

```

### Disable Emoji Tips

```yaml
tips:
  disabled_types:
    - emoji

```

### Add Custom User Tips

Create or edit [`lua/data/tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/lua/data/tips_user.txt) in your Rime user data directory:

```

🎯	target
🚀	rocket

```

After saving, restart the input method or toggle the `super_tips` switch to force a database rebuild.

## Core Implementation Files

| File | Role | Key Details |
|------|------|-------------|
| [`wanxiang/lua/super_tips.lua`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang/lua/super_tips.lua) | Main processor logic | Implements `update_tips_prompt`, `generate_files_signature`, and commit key handling (lines 28‑52) |
| [`wanxiang/wanxiang.schema.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang/wanxiang.schema.yaml) | Schema registration | Declares the `super_tips` switch and processor loading (lines 42‑44, 57) |
| [`wanxiang/lua/data/tips_show.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang/lua/data/tips_show.txt) | Built-in tip database | Read-only source file for default tips |
| [`wanxiang/lua/data/tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang/lua/data/tips_user.txt) | User overrides | Editable file for custom tip entries |
| [`wanxiang/default.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang/default.yaml) | Default engine setup | Ensures `super_tips` is included in `engine/processors` |

## Summary

- Enable the feature by setting the `super_tips` switch to `reset: 1` in [`wanxiang.schema.yaml`](https://github.com/amzxyz/rime_wanxiang/blob/main/wanxiang.schema.yaml).
- Change the tip commit key via `key_binder/tips_key` (default is `"slash"`).
- Filter unwanted categories using `tips/disabled_types` to exclude emoji or other tip sets.
- Add personal tips by creating [`lua/data/tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/lua/data/tips_user.txt) with **value<TAB>key** entries.
- The processor automatically rebuilds the LevelDB database when it detects changes to source files or configuration.

## Frequently Asked Questions

### How do I temporarily disable the Tips feature without editing configuration files?

Toggle the `super_tips` switch using your input method's mode switch key (typically `Control+Shift+2` or the key bound to `next_sibling` in your schema). This cycles between "提示关" (off) and "提示开" (on) states without modifying the underlying YAML files.

### What is the correct format for entries in [`tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/tips_user.txt)?

Each line must contain the display value, a literal TAB character, and the trigger key. For example, `🚀	rocket` associates the rocket emoji with the string "rocket". The processor indexes both columns in the LevelDB database and matches them against your current input or selected candidate.

### Why don't my custom tips appear immediately after editing [`tips_user.txt`](https://github.com/amzxyz/rime_wanxiang/blob/main/tips_user.txt)?

The processor compares a **fingerprint** of the source files during initialization. If the file modification time and content hash match the stored signature, the database is not rebuilt. To force a reload, either restart the Rime input method completely or toggle the `super_tips` switch off and on again to trigger a fresh initialization cycle.

### Can I use the Return key instead of slash to commit a tip?

Yes. Set `key_binder/tips_key: "Return"` in your schema configuration. However, ensure this does not conflict with existing key bindings for committing the current composition. The [`super_tips.lua`](https://github.com/amzxyz/rime_wanxiang/blob/main/super_tips.lua) processor (lines 28‑52) captures the configured key and commits only the right-hand side of the tip (after a colon or full-width colon) when that specific key is pressed.