-- load the colorscheme here
vim.g.moonflyTransparent = true
-- vim.cmd([[colorscheme moonfly]])

vim.opt["tabstop"] = 4
vim.opt["shiftwidth"] = 4

vim.wo.relativenumber = true

require("oil").setup()
-- If you want to see more details:
--require("oil").set_columns({ "icon", "permission", "size" })

require("conform").setup({
	formatters_by_ft = {
		lua = { "stylua" },
		rust = { "rustfmt", lsp_format = "fallback" },
		javascript = { "prettier", stop_after_first = true },
		dart = { "dart format", lsp_format = "fallback" },
		go = { "gofmt" },
	},
})

vim.api.nvim_create_autocmd("BufWritePre", {
	pattern = "*",
	callback = function(args)
		require("conform").format({ bufnr = args.buf })
	end,
})

require("flutter-tools").setup({
	dev_log = {
		enabled = true,
		filter = nil, -- optional callback to filter the log
		notify_errors = false, -- notify the user if the is an error whilst running
		open_cmd = "tabedit",
	},
})
