# Settings

You can change how *Lx* behaves by editing a settings file.

For most personal changes, use **User Settings**. *Lx* gives this file the final say.

## Settings files

*Lx* reads the files in this order:

1. **Alpha defaults:**

	`user/settings/alpha.lua`
	contains the starting choices supplied with an *Lx* Alpha build. Updates may replace it, so you normally leave this file alone.

2. **Global settings:**

	`user/settings/global.lua`
	contains your settings for everyone using this *Lx* installation. It takes priority over the supplied Alpha defaults.

3. **Computer settings:**

	`user/settings/@<computer>.lua`
	applies to everyone using this copy of *Lx* on that computer. It suits choices tied to its screen, speed, or local folders.

4. **User settings:**

	`user/settings/<user>@<computer>.lua`
	applies only to you on that computer. It is usually the best place for your preferences and shortcuts.

*Lx* creates the real filename from your user and computer names. The filename is always lowercase.

Each later file can replace a value from an earlier file.

For example, the global file may set the frame rate to 60. Your user file can set it to 144. You get 144 because your file is read last.

## Edit a settings file

Open the command palette and run one of these commands:

- `core:edit-user-settings` opens your settings on this computer
- `core:edit-computer-settings` opens settings shared by everyone on this computer
- `core:edit-global-settings` opens settings shared by everyone using this *Lx* installation

Any of these files may be absent. *Lx* simply skips that layer. The global, user, and computer settings commands open a new blank file with the right name when needed.

## Make a simple change

Here is a complete user settings file that changes the indentation size:

```lua
local config = require("core.config")

config.indent_size = 4
```

The first line gives the file access to *Lx* settings. The last line makes one indentation step four spaces wide.

You can copy a setting from `alpha.lua` into one of your own settings files, then change only the value you care about.

## Save and apply changes

Save the file normally. *Lx* reloads all three settings files in order.

You do not need to restart *Lx*.

If a line is incomplete or misspelled, *Lx* reports the problem. Correct the line and save again.

## Advanced: choose the files yourself

The file `user/init.lua` controls which settings files *Lx* reads and their order.

Most people never need to change it. Leave it alone unless you want a different settings arrangement.
