aboutsummaryrefslogtreecommitdiff
path: root/plugins/editorconfig/README.md
diff options
context:
space:
mode:
authorJefferson González <jgmdev@gmail.com>2022-12-24 23:06:24 -0400
committerGitHub <noreply@github.com>2022-12-24 23:06:24 -0400
commit363c3eb859ddbe1efad5949ad087c8e7db6cee41 (patch)
treedf6ae14c1b360d710ce0d4b5c11950e91a2d0517 /plugins/editorconfig/README.md
parent7bb53600a33c2f630f2a0850a543c356a856f172 (diff)
downloadlite-xl-plugins-363c3eb859ddbe1efad5949ad087c8e7db6cee41.tar.gz
lite-xl-plugins-363c3eb859ddbe1efad5949ad087c8e7db6cee41.zip
added editorconfig plugin (#163)
* properly ignore comments on declarations * strip newlines when insert_final_newline set to false * force match up to the end * support unset property * make property values case insensitive * handle indent_size when set to tab * handle escaped comment chars * also lowercase property names * support utf-8 as on spec * apply rules to unsaved unamed/named docs * annotation fix * added test suite and fixes for 100% pass rate * do not force match from start, breaks 2 tests * allow starting wild cards to match everything * disabled print buffering * make last line visible if insert_final_newline true * use log_quiet for debug * adapted to changes on lite-xl/lite-xl#1232 * properly return from add/remove_project_directory overrides * Use new trimwhitespace functionality if possible
Diffstat (limited to 'plugins/editorconfig/README.md')
-rw-r--r--plugins/editorconfig/README.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/plugins/editorconfig/README.md b/plugins/editorconfig/README.md
new file mode 100644
index 0000000..c3abd51
--- /dev/null
+++ b/plugins/editorconfig/README.md
@@ -0,0 +1,61 @@
+# EditorConfig
+
+This plugin implements the [EditorConfig](https://editorconfig.org/) 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](https://github.com/lite-xl/lite-xl-plugins/issues).
+
+## 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 `cr` it is ignored
+* trim_trailing_whitespace
+* insert_final_newline boolean
+
+## Not implemented
+
+* charset - this feature would need the encoding
+ [PR](https://github.com/lite-xl/lite-xl/pull/1161) or
+ [plugin](https://github.com/jgmdev/lite-xl-encoding)
+
+## 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](https://github.com/editorconfig/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:
+
+```sh
+lite-xl test editorconfig
+```
+
+To inspect the generated sections and regex rules:
+
+```sh
+lite-xl test editorconfig --parsers
+```