Five more plugins from lite-xl-plugins @ 31eef29, all default VSCode behaviors: - selectionhighlight: highlights other occurrences of the selected word - bracketmatch: highlights the bracket matching the one under the cursor - colorpreview: inline swatches for #hex/rgb()/hsl() color literals - navigate: Go Back / Go Forward cursor history (alt+left/right) - editorconfig: applies .editorconfig files; vendored as the whole upstream directory (parser + test harness, lite-xl test editorconfig); builds on the bundled trimwhitespace plugin All depend on core only (editorconfig additionally on trimwhitespace, already shipped). Verified against the built package: all plugins load, navigate registers its commands, and an .editorconfig with indent_size = 2 is applied to an opened file. Pinned to lite-xl-plugins @ 31eef29 (see debian/extra/README.source).
EditorConfig
This plugin implements the EditorConfig spec purely on lua by leveraging lua patterns and the regex engine on lite-xl. Installing additional dependencies is not required.
The EditorConfig spec was implemented as best understood, if you find any bugs please report them on this repository issue tracker.
Implemented Features
Global options:
- root - prevents upward searching of .editorconfig files
Applied to documents indent info:
- indent_style
- indent_size
- tab_width
Applied on document save:
- end_of_line - if set to
crit is ignored - trim_trailing_whitespace
- insert_final_newline boolean
Not implemented
Extras
- Supports multiple project directories
- Implements hot reloading, so modifying an .editorconfig file from within the editor will re-apply all rules to currently opened files.
Testing
This plugin includes a test suite to check how well the .editorconfig parser is working.
The editorconfig-core-test glob, parser and properties cmake tests where ported and we are getting a 100% pass rate.
If you are interested in running the test suite, from the terminal execute the following:
lite-xl test editorconfig
To inspect the generated sections and regex rules:
lite-xl test editorconfig --parsers