mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 01:26:46 +00:00
fixed ruff formatter
This commit is contained in:
@@ -44,6 +44,33 @@ return {
|
|||||||
stdin = true,
|
stdin = true,
|
||||||
args = { 'format', '--stdin-file-path', '$FILENAME' },
|
args = { 'format', '--stdin-file-path', '$FILENAME' },
|
||||||
},
|
},
|
||||||
|
---@type conform.FileFormatterConfig
|
||||||
|
ruff = {
|
||||||
|
meta = {
|
||||||
|
url = 'https://docs.astral.sh/ruff/',
|
||||||
|
description = 'An extremely fast Python linter, written in Rust. Formatter subcommand.',
|
||||||
|
},
|
||||||
|
command = 'ruff',
|
||||||
|
args = {
|
||||||
|
'format',
|
||||||
|
'--force-exclude',
|
||||||
|
'--stdin-filename',
|
||||||
|
'$FILENAME',
|
||||||
|
'-',
|
||||||
|
},
|
||||||
|
range_args = function(self, ctx)
|
||||||
|
return {
|
||||||
|
'format',
|
||||||
|
'--force-exclude',
|
||||||
|
'--range',
|
||||||
|
string.format('%d:%d-%d:%d', ctx.range.start[1], ctx.range.start[2] + 1, ctx.range['end'][1], ctx.range['end'][2] + 1),
|
||||||
|
'--stdin-filename',
|
||||||
|
'$FILENAME',
|
||||||
|
'-',
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
stdin = true,
|
||||||
|
},
|
||||||
intelephense = {
|
intelephense = {
|
||||||
command = 'intelephense',
|
command = 'intelephense',
|
||||||
args = {},
|
args = {},
|
||||||
|
|||||||
Reference in New Issue
Block a user