1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-19 08:17:47 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
7931d193b6 nvim: added stylua with custom config 2024-03-05 19:46:26 +01:00
abed395a87 nvim: added latexindent with 2 space indent 2024-03-05 14:44:15 +01:00
5 changed files with 64 additions and 38 deletions

View File

@ -1,4 +1,5 @@
Bonitur Bonitur
Königinnensubstanz Königinnensubstanz
Magazinbeute Magazinbeute
Magazinbeuten
Pollenhose Pollenhose

View File

@ -1,12 +1,19 @@
return { return {
-- improved refactoring -- improved refactoring
{ {
'stevearc/conform.nvim', "stevearc/conform.nvim",
opts = { config = function()
require("conform").setup({
formatters_by_ft = { formatters_by_ft = {
python = { "isort", "black" }, python = { "isort", "black" },
markdown = { "mdformat" }, markdown = { "mdformat" },
tex = { "latexindent" },
lua = { "stylua" },
},
})
require("conform").formatters.latexindent = {
prepend_args = { "-y=defaultIndent: ' '" },
} }
} end,
} },
} }

View File

@ -8,11 +8,15 @@ return {
config = function() config = function()
require("null-ls").setup({ require("null-ls").setup({
sources = { sources = {
-- python -- latex
require("null-ls").builtins.formatting.isort, require("null-ls").builtins.formatting.latexindent,
require("null-ls").builtins.formatting.black, -- lua
require("null-ls").builtins.formatting.stylua,
-- markdown -- markdown
require("null-ls").builtins.formatting.mdformat, require("null-ls").builtins.formatting.mdformat,
-- python
require("null-ls").builtins.formatting.black,
require("null-ls").builtins.formatting.isort,
} }
}) })
end end
@ -22,7 +26,11 @@ return {
opts = { opts = {
automatic_installation = true, automatic_installation = true,
ensure_installed = { ensure_installed = {
"isort", "black", "mdformat" "black",
"isort",
"latexindent",
"mdformat",
"stylua",
} }
} }
} }

View File

@ -0,0 +1,10 @@
column_width = 100
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "Always"
collapse_simple_statement = "Never"
[sort_requires]
enabled = true