Open msva opened 1 year ago
the code-style check is based on the formatting target of emmylua-codestyle, If you're not using lua-ls formatting, you'd better turn it off.
or add space_before_function_call_single_arg = none
to .editorconfig
I tried followinf setup, but that didn't help for any of mentioned cases :shrug:
format = {
enable = true,
defaultConfig = {
space_before_attribute = false,
space_before_function_call_single_arg = false,
},
},
Although, I didn't try to add that parameters to .editorconfig
. Will check it.
And will it work if I'll put another emmylua formattinng directives to .editorconfig
?
add it to editorconfig, when a editorconfig file exists, only its configuration is valid
Hi there!
Is there any way to set up (disable) exact checks for
codestyle-check
?.stylua.toml
and.editorconfig
syntax doesn't have much parameters, and doesn't cover such usecases like "spaces before single argument".For example, when I type
local a = require"foo".moo
, and I don't want that codestyle checker triggered on missing space (or anything) here, and I want this "globally" (to don't place comments---@diagnostic
comments here and there and everywhere everytime).Or, say, I have function, that takes a table as argument, and place
table
global in metadate, to allow OOP-like calls on tables.So, as syntactig sugar I have variable
T
set to this function. So, I'm initializing tables withlocal mytable = T{}
.And I don't want that codestyle-checker blame on missing space here too.
And so on...
So, it would be nice, if there was a possibility to configure (enable/disable) exact checks per-project and globally (default settings, that per-project ones would override).
And I digged all around lua_ls and emmylua docs and didn't find a way to do that.
Can you advice me, please?