mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 20:47:45 +01: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()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
python = { "isort", "black" },
|
||||
python = { "isort", "yapf" },
|
||||
markdown = { "mdformat" },
|
||||
tex = { "latexindent" },
|
||||
lua = { "stylua" },
|
||||
},
|
||||
})
|
||||
require("conform").formatters.latexindent = {
|
||||
prepend_args = { "-y=defaultIndent: ' '" },
|
||||
args = require("conform.util").extend_args(
|
||||
require("conform.formatters.latexindent").args,
|
||||
{ "-y=defaultIndent: ' '" }
|
||||
),
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
@ -15,8 +15,8 @@ return {
|
||||
-- markdown
|
||||
require("null-ls").builtins.formatting.mdformat,
|
||||
-- python
|
||||
require("null-ls").builtins.formatting.black,
|
||||
require("null-ls").builtins.formatting.isort,
|
||||
require("null-ls").builtins.formatting.yapf,
|
||||
}
|
||||
})
|
||||
end
|
||||
@ -26,11 +26,15 @@ return {
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
ensure_installed = {
|
||||
"black",
|
||||
"isort",
|
||||
-- latex
|
||||
"latexindent",
|
||||
"mdformat",
|
||||
-- lua
|
||||
"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