mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-19 00:07:47 +02:00
nvim: change pythons style to be more campact
This commit is contained in:
parent
7931d193b6
commit
4bfc54bcc1
@ -5,14 +5,17 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
python = { "isort", "black" },
|
python = { "isort", "yapf" },
|
||||||
markdown = { "mdformat" },
|
markdown = { "mdformat" },
|
||||||
tex = { "latexindent" },
|
tex = { "latexindent" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("conform").formatters.latexindent = {
|
require("conform").formatters.latexindent = {
|
||||||
prepend_args = { "-y=defaultIndent: ' '" },
|
args = require("conform.util").extend_args(
|
||||||
|
require("conform.formatters.latexindent").args,
|
||||||
|
{ "-y=defaultIndent: ' '" }
|
||||||
|
),
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -15,8 +15,8 @@ return {
|
|||||||
-- markdown
|
-- markdown
|
||||||
require("null-ls").builtins.formatting.mdformat,
|
require("null-ls").builtins.formatting.mdformat,
|
||||||
-- python
|
-- python
|
||||||
require("null-ls").builtins.formatting.black,
|
|
||||||
require("null-ls").builtins.formatting.isort,
|
require("null-ls").builtins.formatting.isort,
|
||||||
|
require("null-ls").builtins.formatting.yapf,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -26,11 +26,15 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"black",
|
-- latex
|
||||||
"isort",
|
|
||||||
"latexindent",
|
"latexindent",
|
||||||
"mdformat",
|
-- lua
|
||||||
"stylua",
|
"stylua",
|
||||||
|
-- markdown
|
||||||
|
"mdformat",
|
||||||
|
-- python
|
||||||
|
"isort",
|
||||||
|
"yapf",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
.config/yapf/style
Normal file
6
.config/yapf/style
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[style]
|
||||||
|
based_on_style = google
|
||||||
|
column_limit = 99
|
||||||
|
indent_width = 2
|
||||||
|
spaces_before_comment = 2
|
||||||
|
continuation_indent_width = 2
|
Loading…
x
Reference in New Issue
Block a user