feat(config): add some more config options (#64)

## Add
Make these things configurable
- Expand aliases
- Suggest hidden files (#59)
- Toggle menu and mode 

```
[ui]
hidden-files = true # or false

[core]
expand-alias = true # or false

[keybindings]
toggle-mode = "ctrl+r"
toggle-menu = "ctrl+space"
```

- Auto reload config on changes: now just changes config and save the
file, IRIS will auto detect and reload in silent
- Added all these in config on init and docs

## Fix
I tested on holding backspace and the ghost text keep glitching so I
fixed it, this is just a small fix
This commit is contained in:
VERSE
2026-07-29 20:43:46 +07:00
committed by GitHub
parent 69fb77910d
commit d6cfb9c909
9 changed files with 271 additions and 81 deletions
+5 -3
View File
@@ -6,6 +6,8 @@ import (
"path/filepath"
"sort"
"strings"
"github.com/versenilvis/iris/internal/config"
)
// for tracking current working dir
@@ -34,7 +36,7 @@ func GetCWD() string {
// dir = "src/", filePrefix = "mai"
// search for which matches "mai" case, and show it (whici is both main.go and main.py)
// but if you type "go run src/mai" -> it will only shows suggestion about src/main.go
// NOTE: it will skip hidden file start with dot prefix
// NOTE: it will skip hidden file start with dot prefix unless configured otherwise
func FileGenerator(filters ...string) GeneratorFunc {
dirOnly := false
filterSet := make(map[string]bool)
@@ -82,8 +84,8 @@ func FileGenerator(filters ...string) GeneratorFunc {
for _, entry := range entries {
name := entry.Name()
// skip hidden files
if strings.HasPrefix(name, ".") {
// skip hidden files if not configured to show them
if !config.Get().UI.ShowHiddenFiles && strings.HasPrefix(entry.Name(), ".") {
continue
}