Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 1.06 KB

README.md

File metadata and controls

61 lines (49 loc) · 1.06 KB

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