Skip to content
This repository was archived by the owner on Mar 21, 2026. It is now read-only.

l-lin/private-ruby.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

private-ruby.nvim

Shows private Ruby methods with indicators in Neovim.

showcase

Installation

{
  'l-lin/private-ruby.nvim',
  ft = 'ruby',
  opts = {
    -- Those are the default values:
    indicator = {
      text = '',                -- Indicator text (max 2 chars for gutter)
      hl = 'DiagnosticHint',    -- Highlight group
      position = 'virtual_text', -- 'virtual_text' or 'gutter'
    },
    detect = {
      kind = 'auto',          -- Detection mode (see below)
    },
  },
}

Detection Modes

The detect.kind option controls how private methods are detected:

Mode Behavior Use When
auto Try Tree-sitter first, fallback to regex if unavailable Default - works everywhere
treesitter Use only Tree-sitter, no fallback (returns empty if unavailable) You want accurate detection and have Tree-sitter installed
regex Use only regex-based detection, no fallback Tree-sitter is unavailable or you prefer regex

Commands

  • :PrivateRubyRefresh - Manually refresh indicators
  • :PrivateRubyClear - Manually clear indicators

Limitations

This version uses regex-based detection. Known limitations:

  • Does not handle private :method_name symbol syntax
  • Does not handle private_class_method
  • May miscount end keywords in complex code (heredocs, inline blocks)
  • Metaprogramming-defined methods are not detected

Development

mise run test   # Run tests with mini.test
mise run smoke  # Smoke test: load plugin

License

MIT

About

Shows private Ruby methods with indicators in Neovim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages