ci: fix
This commit is contained in:
parent
f871626e0a
commit
cd9f745ace
6 changed files with 100 additions and 52 deletions
|
|
@ -51,10 +51,68 @@ return {
|
||||||
ft('make'):lint('checkmake')
|
ft('make'):lint('checkmake')
|
||||||
ft('cpp'):lint('cpplint')
|
ft('cpp'):lint('cpplint')
|
||||||
ft('markdown'):fmt('cbfmt'):append('prettierd')
|
ft('markdown'):fmt('cbfmt'):append('prettierd')
|
||||||
ft('nix'):fmt({
|
local lint = require('guard.lint')
|
||||||
|
|
||||||
|
ft('nix')
|
||||||
|
:fmt({
|
||||||
cmd = 'nix',
|
cmd = 'nix',
|
||||||
args = { 'fmt', '--' },
|
args = { 'fmt', '--' },
|
||||||
fname = true,
|
fname = true,
|
||||||
})
|
})
|
||||||
|
:lint({
|
||||||
|
cmd = 'deadnix',
|
||||||
|
args = { '-o', 'json' },
|
||||||
|
fname = true,
|
||||||
|
parse = lint.from_json({
|
||||||
|
get_diagnostics = function(raw)
|
||||||
|
return vim.json.decode(raw).results
|
||||||
|
end,
|
||||||
|
attributes = {
|
||||||
|
lnum = 'line',
|
||||||
|
col = 'column',
|
||||||
|
lnum_end = 'line',
|
||||||
|
col_end = 'endColumn',
|
||||||
|
message = 'message',
|
||||||
|
},
|
||||||
|
source = 'deadnix',
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
:lint({
|
||||||
|
cmd = 'statix',
|
||||||
|
args = { 'check', '-o', 'json' },
|
||||||
|
fname = true,
|
||||||
|
parse = lint.from_json({
|
||||||
|
get_diagnostics = function(raw)
|
||||||
|
local data = vim.json.decode(raw)
|
||||||
|
local results = {}
|
||||||
|
for _, entry in ipairs(data.report or {}) do
|
||||||
|
for _, diag in ipairs(entry.diagnostics or {}) do
|
||||||
|
table.insert(results, {
|
||||||
|
from_line = diag.at.from.line,
|
||||||
|
from_col = diag.at.from.column,
|
||||||
|
to_line = diag.at.to.line,
|
||||||
|
to_col = diag.at.to.column,
|
||||||
|
message = entry.note,
|
||||||
|
severity = entry.severity,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return results
|
||||||
|
end,
|
||||||
|
attributes = {
|
||||||
|
lnum = 'from_line',
|
||||||
|
col = 'from_col',
|
||||||
|
lnum_end = 'to_line',
|
||||||
|
col_end = 'to_col',
|
||||||
|
message = 'message',
|
||||||
|
},
|
||||||
|
severities = {
|
||||||
|
Error = lint.severities.error,
|
||||||
|
Warn = lint.severities.warning,
|
||||||
|
Hint = lint.severities.info,
|
||||||
|
},
|
||||||
|
source = 'statix',
|
||||||
|
}),
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ in
|
||||||
mypy
|
mypy
|
||||||
selene
|
selene
|
||||||
shellcheck
|
shellcheck
|
||||||
|
deadnix
|
||||||
|
statix
|
||||||
|
|
||||||
# runtime/tools
|
# runtime/tools
|
||||||
nodejs
|
nodejs
|
||||||
|
|
|
||||||
|
|
@ -69,11 +69,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."hypr/hyprlock.conf".text =
|
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||||
let
|
|
||||||
c = config.colors;
|
|
||||||
in
|
|
||||||
''
|
|
||||||
general {
|
general {
|
||||||
hide_cursor = true
|
hide_cursor = true
|
||||||
grace = 0
|
grace = 0
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
c = config.colors;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
TERMINAL = "ghostty";
|
TERMINAL = "ghostty";
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
hostConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
c = config.colors;
|
|
||||||
|
|
||||||
mkWaybarTheme = palette: ''
|
mkWaybarTheme = palette: ''
|
||||||
* { color: ${palette.fg}; }
|
* { color: ${palette.fg}; }
|
||||||
window#waybar { background: ${palette.bg}; border-bottom: 2px solid ${palette.bgAlt}; }
|
window#waybar { background: ${palette.bg}; border-bottom: 2px solid ${palette.bgAlt}; }
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue