/nvim-code-smell

Neovim Plugin for Code Smell detection

Primary LanguageLua

NVIM-CODE-SMELL - Tooling for better code quality

This is my first plugin for neovim. It is a wrapper for existing code smell tools like reek for ruby. It takes the output from these tools, adapting and displays it inside neovim.

Installation

lazy

return {
  "philwi/nvim-code-smell",
  config = function()
    require("nvim-code-smell").setup()
  end
}

Configuration

{
  smell_finders = {
    "reek"
  },
  outputs = {
    "buffer",
    "quickfix"
  },
  keymaps = {
    run_diagnostic = "<leader>q", -- run configured smell_finders
    disable = "<leader>Q", -- disable all diagnostic outputs
  }
}

Sample Configuration

return {
  "philwi/nvim-code-smell",
  config = function()
    require("nvim-code-smell").setup({
      outputs = {
        "buffer",
      }
    })
  end
}

Usage

  • RunDiagnostic to run the code smell check for the current file