https://github.com/anthonyaxenov/lite-xl-env-syntax
env-file syntax highlighting plugin for lite-xl editor
https://github.com/anthonyaxenov/lite-xl-env-syntax
dotenv env environment-variables lite-xl plugin syntax-highlighting
Last synced: 4 months ago
JSON representation
env-file syntax highlighting plugin for lite-xl editor
- Host: GitHub
- URL: https://github.com/anthonyaxenov/lite-xl-env-syntax
- Owner: anthonyaxenov
- License: mit
- Created: 2022-06-12T07:17:10.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-03T14:45:11.000Z (over 2 years ago)
- Last Synced: 2025-01-06T01:29:46.928Z (5 months ago)
- Topics: dotenv, env, environment-variables, lite-xl, plugin, syntax-highlighting
- Language: Shell
- Homepage: https://git.axenov.dev/anthony/lite-xl-env-syntax
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# env syntax support plugin for lite-xl
[Lite-XL](https://lite-xl.com/) is lightweight, fast and customizable open-source code editor.
This plugin adds syntax support for `*.env` files using *very simple* rules.
Unfortunately, in fact `env`-file syntax is more complicated than it seems, so current solution doesn't cover ALL possible syntax combinations.
My goal is to do so somehow in future but I think plugin is already good enought to use in most of basic cases.Currently available highlighting:
* comments;
* keys;
* `export`;
* values:
* literals: `null`, `true`, `false`, `\n`, `\r`, `\t`, `\f`, `\b`, `\\`, `\"`, `\'`;
* numerics;
* strings:
* one-lined (inside `'...'` or `"..."`)
* multiline (inside `"""..."""` or `'''...'''`);
* string interpolation `${myvar}`;TODO and known issues:
* in unquoted string values, word + `=` are showed as inlined key;
* escaped literals must not be used as keys;
* ...You can use `test.env` file to check how plugin works.
## How to install
To install a plugin:
* Drop `language_env.lua` file in:
* Linux: `~/.config/lite-xl/plugins/`
* MacOS: `~/.config/lite-xl/plugins/`
* Windows: `C:\Users\(username)\.config\lite-xl\plugins\`
* If lite-xl is already opened then save files just press `Ctrl`+`Shift`+`P` => `rst` => `Enter` to reboot editor's core and load plugin immidiately.## License
[The MIT License](LICENSE)