We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff3819c commit 7228c8bCopy full SHA for 7228c8b
lua/null-ls/builtins/formatting/gleam_format.lua
@@ -0,0 +1,24 @@
1
+local h = require("null-ls.helpers")
2
+local methods = require("null-ls.methods")
3
+local u = require("null-ls.utils")
4
+
5
+local FORMATTING = methods.internal.FORMATTING
6
7
+return h.make_builtin({
8
+ name = "gleam_format",
9
+ meta = {
10
+ url = "https://github.com/gleam-lang/gleam/",
11
+ description = [[Default formater for the Gleam programming language]],
12
+ },
13
+ method = { FORMATTING },
14
+ filetypes = { "gleam" },
15
+ generator_opts = {
16
+ command = "gleam",
17
+ args = { "format", "--stdin" },
18
+ to_stdin = true,
19
+ cwd = h.cache.by_bufnr(function(params)
20
+ return u.root_pattern("gleam.toml")(params.bufname)
21
+ end),
22
23
+ factory = h.formatter_factory,
24
+})
0 commit comments