feat: add gleam formatting and snippets

This commit is contained in:
Moritz Böhme 2024-03-02 13:54:08 +01:00
parent ad8ff7d016
commit 09caae2e4e
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
3 changed files with 131 additions and 2 deletions

View file

@ -11,10 +11,19 @@ local formatters_by_ft = {
sh = { "shfmt" },
toml = { "taplo" },
yaml = { "yamlfix" },
gleam = { "gleam" },
}
conform.setup({
formatters_by_ft = formatters_by_ft,
formatters = {
gleam = {
command = "gleam",
args = { "format", "--stdin" },
stdin = true,
cwd = require("conform.util").root_file({ "gleam.toml" }),
},
},
})
vim.api.nvim_create_user_command("Format", function(opts)