Skip to content

Commit d54d4f3

Browse files
committed
stylua -> EmmyLuaCodeStyle: config and doc
1 parent 59a8a6a commit d54d4f3

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

.editorconfig

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ root = true
44
insert_final_newline = true
55
end_of_line = lf
66

7+
[nvim-tree-lua.txt]
8+
max_line_length = 78
9+
710
[*.lua]
811
indent_style = space
12+
max_line_length = 140
913
indent_size = 2
1014

11-
[nvim-tree-lua.txt]
12-
max_line_length = 78
15+
# EmmyLuaCodeStyle specific, see
16+
# https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/lua.template.editorconfig
17+
continuation_indent = 2
18+
quote_style = double
19+
call_arg_parentheses = always
20+
space_before_closure_open_parenthesis = false

.stylua.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Following are used during CI and strongly recommended during local development.
1010

1111
Lint: [luacheck](https://github.com/lunarmodules/luacheck/)
1212

13-
Style: [StyLua](https://github.com/JohnnyMorganz/StyLua)
13+
Style: [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle) (`CodeCheck`)
1414

1515
Language server: [luals](https://luals.github.io)
1616

@@ -34,14 +34,14 @@ make lint
3434

3535
## style
3636

37-
1. Runs stylua using `.stylua.toml` settings
37+
1. Runs CodeCheck using `.editorconfig` settings
3838
1. Runs `scripts/doc-comments.sh` to validate annotated documentation
3939

4040
```sh
4141
make style
4242
```
4343

44-
You can automatically fix stylua issues via:
44+
You can automatically fix `CodeCheck` issues via:
4545

4646
```sh
4747
make style-fix

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ all: lint style check
55
#
66
lint: luacheck
77

8-
style: stylua style-doc
8+
style: style-check style-doc
99

1010
check: luals
1111

@@ -15,8 +15,8 @@ check: luals
1515
luacheck:
1616
luacheck -q lua
1717

18-
stylua:
19-
stylua lua --check
18+
style-check:
19+
CodeFormat check --config .editorconfig --diagnosis-as-error --workspace lua
2020

2121
style-doc:
2222
scripts/doc-comments.sh
@@ -28,7 +28,7 @@ luals:
2828
# fixes
2929
#
3030
style-fix:
31-
stylua lua
31+
CodeFormat format --config .editorconfig --workspace lua
3232

3333
#
3434
# utility
@@ -43,5 +43,5 @@ help-check: help-update
4343
git diff --exit-code doc/nvim-tree-lua.txt
4444

4545

46-
.PHONY: all lint style check luacheck stylua style-doc luals style-fix help-update help-check
46+
.PHONY: all lint style check luacheck style-check style-doc luals style-fix help-update help-check
4747

0 commit comments

Comments
 (0)