A checkpatch plugin for Neovim. Nothing more. Nothing less.
{
"qrutyy/checkpatch.nvim",
-- or: dir = "/absolute/path/to/checkpatch.nvim" for a local checkout
ft = { "c" },
cmd = { "Checkpatch" },
opts = {
-- you can override default keymaps here
-- mappings = { run = { keys = "<leader>cp" }, next = { keys = "," }, prev = { keys = "<" } }
},
config = function(_, opts)
require("plugins.checkpatch").setup(opts)
end,
}use {
"qrutyy/checkpatch.nvim",
config = function()
require("plugins.checkpatch").setup({
-- mappings = { run = { keys = "<leader>cp" } }
})
end,
}Plug 'qrutyy/checkpatch.nvim'
" In your init.vim/init.lua after plug#end():
lua << EOF
require('plugins.checkpatch').setup({
-- mappings = { run = { keys = '<leader>cp' } }
})
EOF- NVIM v0.11.1
curl(mandatory) download checkpatch
Simple ah
:Checkpatch [options]Example:
:Checkpatch set log strict codespell no-tree diffDefault keymaps (can be overridden in setup):
- cp: Run :Checkpatch
,: Next checkpatch remarkshift+,: Previous checkpatch remark
set- to set & remember the options configurationlog- save stdout to file in (~/.local/share/nvim/checkpatch-logs/)no-tree- run outside of kernel source treecodespell- use codespellstrict- strict modequiet- guess what (always on save)diff- check only the diff on the current branchon-save- sets last cfg (in case nosetoption isn't used) as on-save. Note that this mode is highly recommended to be used withdiffoption to prevent lags bc of checkpatch work.on-save-off- disables on-save mode.
If you execute it with no options (same with hotkey) - it will use the prev cached config.