From af22eb4be67585cf2e6d97de4aab51d42d5435b1 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 14 Jul 2025 17:54:50 +0200 Subject: [PATCH] docs: mention file type configuration in README.md and help.md closes #192 --- README.md | 27 ++++++++++++++++++--------- help.md | 28 +++++++++++++++------------- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 03ba453..cf7be9b 100644 --- a/README.md +++ b/README.md @@ -94,14 +94,6 @@ You may install it on another system by simply copying the binary. scp zig-out/bin/flow root@otherhost:/usr/local/bin ``` -Configuration is mostly dynamically maintained with various commands in the UI. -It is stored under the standard user configuration path. Usually `~/.config/flow` -on Linux. %APPDATA%\Roaming\flow on Windows. Somewhere magical on MacOS - -Logs, traces and per-project most recently used file lists are stored in the -standard user application state directory. Usually `~/.local/state/flow` on -Linux and %APPDATA%\Roaming\flow on Windows. - Files to load may be specifed on the command line: ```shell @@ -133,9 +125,26 @@ Show supported language names with `--list-languages`. See `flow --help` for the full list of command line options. +# Configuration + +Configuration is mostly dynamically maintained with various commands in the UI. +It is stored under the standard user configuration path. Usually `~/.config/flow` +on Linux. %APPDATA%\Roaming\flow on Windows. Somewhere magical on MacOS. + +There are commands to open the various configuration files, so you don't have to +manually find them. Look for commands starting with `Edit` in the command palette. + +File types may be configured with the `Edit file type configuration` command. You +can also create a new file type by adding a new `.conf` file to the `file_type` +directory. Have a look at an existing file type to see what options are available. + +Logs, traces and per-project most recently used file lists are stored in the +standard user application state directory. Usually `~/.local/state/flow` on +Linux and %APPDATA%\Roaming\flow on Windows. + # Key bindings and commands -Press `F2` to switch the current keybinding mode. (flow, vim, emacs, etc.) +Press `F4` to switch the current keybinding mode. (flow, vim, emacs, etc.) Press `ctrl+shift+p` or `alt+x` to show the command palette. Press `ctrl+F2` to see a full list of all current keybindings and commands. diff --git a/help.md b/help.md index 676b5b3..5db2e7b 100644 --- a/help.md +++ b/help.md @@ -157,19 +157,17 @@ Configuration is stored in the standard location The default configuration will be written the first time Flow Control is started and looks similar to this: ``` -{ - "frame_rate": 60, - "theme": "default", - "input_mode": "flow", - "gutter_line_numbers": true, - "gutter_line_numbers_relative": false, - "enable_terminal_cursor": false, - "highlight_current_line": true, - "highlight_current_line_gutter": true, - "show_whitespace": false, - "animation_min_lag": 0, - "animation_max_lag": 150 -} +frame_rate 60 +theme "default" +input_mode "flow" +gutter_line_numbers true +gutter_line_numbers_relative false +enable_terminal_cursor false +highlight_current_line true +highlight_current_line_gutter true +show_whitespace false +animation_min_lag 0 +animation_max_lag 150 ``` Most of these options are fairly self explanitory. @@ -183,3 +181,7 @@ of frames rendered. `animation_max_lag` controls the maximum amount of time allowed for rendering scrolling animations. Set to 0 to disable scrolling animation altogether. + +File types may be configured with the `Edit file type configuration` command. You +can also create a new file type by adding a new `.conf` file to the `file_type` +directory. Have a look at an existing file type to see what options are available.