Skip to content

Commit 4a99d11

Browse files
committed
feat(lint): resolve linters discovery-first
Resolve linter_deps through the shared resolver against nvim-lint's registry, batched per filetype off the lint events, with an idle-gated 120s parity sweep (generation-guarded) for never-opened filetypes and a fallback timer so an already-idle session isn't stranded. The plugin-loading buffer gets its initial lint. Late configures re-lint only the new linter; a broken-linter verdict is memoized so its load-time side effects run once. ftdetect/github.lua detects GitHub workflow files as yaml.github (consumed by the actionlint/shuck run: linters here, and claimed by the LSP servers).
1 parent 820ece1 commit 4a99d11

2 files changed

Lines changed: 397 additions & 33 deletions

File tree

ftdetect/github.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- GitHub Actions workflow files get the dotted filetype so their dedicated
2+
-- tooling keys on it: nvim-lint's `yaml.github` linters (actionlint + shuck)
3+
-- and the LSP filetype claims in servers/yamlls.lua / servers/gh_actions_ls.lua.
4+
-- Deliberately unanchored, same shape as ftdetect/gitlab.lua: an explicit `$`
5+
-- (any variant) empirically stops vim.filetype.match from ever matching the
6+
-- pattern on this nvim, so suffixed copies (ci.yml.bak) re-type too — accepted
7+
-- parity with the gitlab precedent.
8+
vim.filetype.add({
9+
pattern = {
10+
[".*/%.github/workflows/.*%.ya?ml"] = "yaml.github",
11+
},
12+
})

0 commit comments

Comments
 (0)