-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nvim): Add missing formatters/linters to efm
Once I get them all working I'll contribute them upstream
- Loading branch information
1 parent
bbc63b7
commit 6d179c9
Showing
15 changed files
with
115 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- TODO this one isn't working | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('cbfmt') | ||
local command = string.format('%s --stdin-filepath ${INPUT} --best-effort', formatter) | ||
|
||
return { | ||
formatCommand = command, | ||
formatStdin = true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('fish_indent') | ||
return { | ||
formatCommand = formatter, | ||
formatStdin = true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('gofmt') | ||
return { | ||
formatCommand = formatter, | ||
formatStdin = true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- TODO file isn't reloaded after formatting | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('markdownlint') | ||
local command = string.format('%s --fix ${INPUT}', formatter) | ||
return { | ||
formatCommand = command, | ||
formatStdin = false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('nixfmt') | ||
return { | ||
formatCommand = formatter, | ||
formatStdin = true, | ||
rootMarkers = { | ||
'flake.nix', | ||
'shell.nix', | ||
'default.nix', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
local fs = require('efmls-configs.fs') | ||
local formatter = fs.executable('rustfmt') | ||
local command = string.format('%s --emit=stdout', formatter) | ||
return { | ||
formatCommand = command, | ||
formatStdin = true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- TODO this isn't working | ||
local fs = require('efmls-configs.fs') | ||
local linter = fs.executable('fish') | ||
local command = string.format('%s --no-execute ${INPUT}', linter) | ||
|
||
return { | ||
lintCommand = command, | ||
lintFormats = { '%f (line %l): %m' }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- TODO this one doesn't work | ||
local fs = require('efmls-configs.fs') | ||
local linter = fs.executable('statix') | ||
local command = string.format('%s check --stdin --format=errfmt', linter) | ||
return { | ||
lintCommand = command, | ||
lintStdin = true, | ||
-- lintIgnoreExitCode = true, | ||
lintFormats = { '<text>%l:%c:%t:<text>:%m' }, | ||
rootMarkers = { | ||
'flake.nix', | ||
'shell.nix', | ||
'default.nix', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters