Skip to content

pablos123/shellcheck.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 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, bash or ksh.

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 options to the shellcheck command.
        require 'shellcheck-nvim'.setup {
            shellcheck_options = { '-x', '--enable=all', },
        }
    end
}

Available functions

Set ShellCheck diagnostics for current buffer.

:lua ShellCheck.run()

Clean ShellCheck diagnostics for current buffer.

:lua ShellCheck.clean()

Others

Force diagnostics for some wrapper.

#!/bin/false
# shellcheck shell=<sh/ksh/dash/bash>

Remeber to set the filetype too.

:set ft=<sh/ksh/bash>

dash is not a valid vim/nvim filetype.

Releases

No releases published

Packages

No packages published

Languages