Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 42 additions & 33 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,74 @@
# EmmyLuaCodeStyle

If possible, you can help me improve the English document
_Fast, configurable, and feature-rich Lua formatting and checking language server._
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

donot language server

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't understand what you mean. Could you be more specific?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project mainly exists in the form of a library and command-line tool; the language server part can be ignored. Both luals and emmylua-ls are introduced as libraries.


## Editor Support
## Introduction

vscode:
[vscode-EmmyLuaCodeStyle](https://marketplace.visualstudio.com/items?itemName=CppCXY.emmylua-codestyle)
[vscode-Lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
**EmmyLuaCodeStyle** is a flexible and configurable source code checker, formatter and language server for the [Lua programming language](https://wikipedia.org/wiki/Lua). It supports simple extended syntax and offers a variety of formatting styles. Fast even for large codebases, it ensures a consistent, readable, and standardised Lua custom code style across projects.

intellij:
[intellij-EmmyLuaCodeStyle](https://plugins.jetbrains.com/plugin/21973-emmyluacodestyle)
EmmyLuaCodeStyle supports Lua 5.1, Lua 5.2, Lua 5.3, Lua 5.4, and LuaJIT.

neovim:
[Lua Language Server](https://github.com/LuaLS/lua-language-server)
The language server is based on the Language Server Protocol (LSP) and compatible with IDEs that support LSP. This includes Visual Studio Code, IntelliJ IDEA, Neovim and other popular IDEs.

## Project Introduction
The project also provides an standalone command line interface called CodeFormat, which can be used for batch code checking and formatting.

The project `is not a specification for the Lua code format`, this project is an example of Lua code analysis\formatting\code diagnosis algorithm library and language service based on C++
> The aim of this project is not to create a coding convention for Lua.

The main pursuit of this project is reasonable formatting and diagnosis of various code styles
## 🧠 Editor integration

In addition to providing language service examples, the project also provides an independent command line tool CodeFormat, which can be used for batch code formatting and code style checking.
- [Lua for VSCode](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) or [EmmyLuaCodeStyle for VSCode](https://marketplace.visualstudio.com/items?itemName=CppCXY.emmylua-codestyle)
- [SumnekoLua for IntelliJ](https://plugins.jetbrains.com/plugin/22315-sumnekolua) or [EmmyLuaCodeStyle in JetBrains IntelliJ](https://plugins.jetbrains.com/plugin/21973-emmyluacodestyle)
- [LuaLS for Neovim](https://github.com/LuaLS/lua-language-server)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Feature
Plugins are available for popular editors to provide on-save formatting and real-time code style enforcement.

* Document formatting
* Range formatting
* Code format check
* Code spell check
* Can be used as a lua library/cli tool/C++ parsing lua library/language server
## ✨ Features

## RoadMap
* plugin[0%]
- **80+ configuration options**: Customise indentation, alignment, spacing, and line wrapping using `.editconfig` syntax.
- **Extended syntax support**: Handles EmmyLua annotations and Lua extensions seamlessly.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this feature

- **Multiple formatting styles**: Choose from built-in styles or define your own.
- **Robust Lua parser**: Accurately interprets code structure before applying formatting rules, suitable for large projects and batch formatting.
- **Multiple interfaces:** Language Server Protocol, command line interface, Lua or C++-based parser libraries
- Also includes spell-checking and document formatting

## Document
## 🚀 Use cases

- Enforcing a unified code style across repositories.
- Automatically formatting configuration and script files.
- Maintaining consistency in multi-contributor Lua codebases.
- Supporting solo developers with specific personal style preferences.

## 📚 Documentation

* [Introduction to formatting behavior](docs/format_action_EN.md)
* [How to configure formatting](docs/format_config_EN.md)
* [How to configure naming style checking](docs/name_style_EN.md)

## Contribute
Any pr or issue are welcome
## 🧑‍💻 Contribute

Pull requests and issue reporting is appreciated. If possible, you can help improve the English documentation.

## 🔨 Build

## Build
If you want to compile the project yourself, make sure that your compiler can support [C++20](https://en.cppreference.com/w/cpp/20.html):

If you want to compile the project yourself, make sure that your compiler can basically support C++20:
* VS2019 16.10 and above
* gcc 10 and above
* clang 10 and above

```
In the project's root directory, run the following shell commands:

```bash
mkdir build && cd build
cmake ..
cmake --build .

cmake --build .
```

## Developed By
## Contributors

[**@CppCXY**](https://github.com/CppCXY)

**Contributors**
**Other contributors**

[**@obszczymucha**](https://github.com/obszczymucha)

Expand All @@ -69,6 +77,7 @@ cmake --build .
[**@AndreaWalchshoferSCCH**](https://github.com/AndreaWalchshoferSCCH)

[**@一醉青衫**](https://github.com/qq792453582)
## License

[MIT](LICENSE)
## 📄 License

Licensed under the [MIT License](LICENSE).