Initial commit
Vis plugin for configuring syntax checkers on a per-filetype basis.
vis-check
exposes a new check
command which will run an arbitrary shell script based on the type of file being edited. The check scripts can be configured by setting the filetype and command in the plugin's checkers
table (see below). By default the plugin uses tmux
to open a window split with the output of the command, but this can be configured by setting the plugin's wrapper
option.
local check = require('plugins/vis-check')
check.checkers['go'] = 'goimports -e $vis_filepath'
check.checkers['python'] = 'flake8 $vis_filepath'
-- optionally configure the plugin's wrapper command
-- check.wrapper = '...'
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
vis:map(vis.modes.NORMAL, leader..'c', ':check<Enter>')
end)
MIT License
This plugin was inspired by and modified from code at https://src.adamsgaard.dk/dotfiles/, which is licensed under the ISC License:
Copyright (c) 2012-2021 Anders Damsgaard <anders@adamsgaard.dk>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.