Initial Commit

This commit is contained in:
Ben Foster committed 2024-11-15 02:18:40 -07:00
commit b268e041e9
34 files changed
+1502

No files matched your search

+64
View File
@@ -0,0 +1,64 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
c = { "clang-format" },
cpp = { "clang-format" },
-- go = { "gofumpt", "goimports-reviser", "golines" },
-- haskell = { "fourmolu", "stylish-haskell" },
python = { "isort", "black" },
},
formatters = {
-- C & C++
["clang-format"] = {
prepend_args = {
"-style={ \
IndentWidth: 4, \
TabWidth: 4, \
UseTab: Never, \
AccessModifierOffset: 0, \
IndentAccessModifiers: true, \
PackConstructorInitializers: Never}",
},
},
-- -- Golang
-- ["goimports-reviser"] = {
-- prepend_args = { "-rm-unused" },
-- },
-- golines = {
-- prepend_args = { "--max-len=80" },
-- },
-- -- Lua
-- stylua = {
-- prepend_args = {
-- "--column-width", "80",
-- "--line-endings", "Unix",
-- "--indent-type", "Spaces",
-- "--indent-width", "4",
-- "--quote-style", "AutoPreferDouble",
-- },
-- },
-- Python
black = {
prepend_args = {
"--fast",
"--line-length",
"80",
},
},
isort = {
prepend_args = {
"--profile",
"black",
},
},
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_fallback = true,
},
}
require("conform").setup(options)