Skip to content

SvSchen/clh.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clh.nvim

Execute code lenses from everywhere.

Code lenses are available at specific lines, such code lenses are run or debug an application or test. To avoid always jump back to the code lens position to execute a lens this plugin registered already executed lenses and makes those available from everywhere.

Note: Actually just tested with scala-lang code lenses.

Installation

lazy.nvim:

{
  'svschen/clh.nvim',
  -- Optional config
  opts = {
    history = {
      maxLength = 5
    },
    ui = {
      width = 0.9
    }
  } 
}

Quick start

Re/define a keymap to either:

  • register and run a code lens on a code lense
  • execute the ui to select already registered code lenses otherwise
vim.keymap.set(
  "n",
  "<leader>cl",
  function()
    return require("clh").registerAndRunCodeLens() or require("telescope").extensions.clh.selectCodeLens()
  end,
  { desc = "Register and run or select code lens" })

Options

require("clh").setup({
  -- code lens history config
  history = {
    -- set max registered code lenses
    maxLength = 10
  },
  -- select ui dialog config
  ui = {
    -- set the width
    width = 0.7,
    -- set the height
    height = 0.5
  }

})

Integrations

Available integrations:

  • Telescope, to select registered lenses with ui.

About

Execute code lenses from everywhere.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages