Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read config from .editorconfig for formatter. #1773

Open
twoco opened this issue Dec 20, 2022 · 4 comments
Open

Read config from .editorconfig for formatter. #1773

twoco opened this issue Dec 20, 2022 · 4 comments
Labels
feat/formatter Related to code formatter

Comments

@twoco
Copy link

twoco commented Dec 20, 2022

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Formatting

Expected Behaviour

Use config from .editorconfig.

Actual Behaviour

Does not respect .editorconfig.

Reproduction steps

In root: .editorconfig:

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
quote_type = single

https://editorconfig.org/

Additional Notes

No response

Log File

No response

@sumneko sumneko added the feat/formatter Related to code formatter label Jan 3, 2023
@sumneko
Copy link
Collaborator

sumneko commented Jan 3, 2023

@CppCXY

@CppCXY
Copy link
Collaborator

CppCXY commented Jan 3, 2023

quote_type is not defined by editorconfig specification. my formatter use quote_style = single,

indentation cannot be defined in the editorconfig file, see CppCXY/EmmyLuaCodeStyle#22

@Iron-E
Copy link

Iron-E commented Apr 6, 2023

I'm having the same issue, using Neovim 0.9. I copied the template editorconfig from the EmmyLuaCodeStyle repo and changed the settings (e.g. quote_style = double), but running vim.lsp.buf.format uses the default formatting rather than what was defined in my editorconfig.

@CppCXY
Copy link
Collaborator

CppCXY commented Apr 6, 2023

I'm having the same issue, using Neovim 0.9. I copied the template editorconfig from the EmmyLuaCodeStyle repo and changed the settings (e.g. quote_style = double), but running vim.lsp.buf.format uses the default formatting rather than what was defined in my editorconfig.

new issue please, and report to https://github.com/CppCXY/EmmyLuaCodeStyle/issues.
please try create a new project to see if the result is the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/formatter Related to code formatter
Projects
None yet
Development

No branches or pull requests

4 participants