Skip to content

Commit

Permalink
fix: generic linter (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshihou514 authored Jan 12, 2024
1 parent 19c2a28 commit 192fd1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/guard/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ local group = require('guard.events').group

local function do_lint(buf)
buf = buf or api.nvim_get_current_buf()
if not ft_handler[vim.bo[buf].filetype] then
local buf_config = ft_handler[vim.bo[buf].filetype] or ft_handler['*']
if not buf_config then
return
end
local linters = ft_handler[vim.bo[buf].filetype].linter
local linters = buf_config.linter
local fname = vim.fn.fnameescape(api.nvim_buf_get_name(buf))
local prev_lines = get_prev_lines(buf, 0, -1)
vd.reset(ns, buf)
Expand Down

0 comments on commit 192fd1d

Please sign in to comment.