Skip to content

pablos123/shellcheck.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

shellcheck.nvim

ShellCheck diagnostics inside Neovim.

Features

  • Asynchronous.
  • No LSP involved.
  • No ALE, Neomake or Syntastic needed.
  • Supports sh/bash/dash/ksh.
  • Runs only on BufEnter and BufWritePost events.
  • Runs only when filetype is sh.

Dependencies

  • shellcheck available in $PATH.
  • nvim >= 0.7.

Install

Use your favorite plugin manager!

lazy.nvim

{
    'pablos123/shellcheck.nvim',
    config = function () require 'shellcheck-nvim'.setup {} end
}
Configure
{
    'pablos123/shellcheck.nvim',
    config = function ()
        -- Pass extra arguments to the shellcheck command.
        require 'shellcheck-nvim'.setup {
            extras = { '-x', '--enable=all', },
        }
    end
}

Others

Set shellcheck diagnostics for current buffer.

:lua ShellCheck.run()

Clean shellcheck diagnostics for current buffer.

:lua ShellCheck.clean()

Force diagnostics for some wrapper. Remeber to set ft=sh too.

#!/bin/false
# shellcheck shell=bash