Skip to content

A plugin to bring Taskfile functionality to neovim.

Notifications You must be signed in to change notification settings

chefe/taskfile.nvim

Repository files navigation

taskfile.nvim

A plugin to bring Taskfile functionality to neovim.

Features

  • Run a task with a user command
  • Show a list of task and select one to run with a user command
  • Show a telescope picker with a list of task and select one to run

Installation

Lazy with telescope:

return {
  {
    'chefe/taskfile.nvim',
    dependencies = { 'nvim-telescope/telescope.nvim' },
    config = function()
      require('taskfile').setup()
    end,
    cmd = 'Task',
    keys = {
      {
        '<leader>ft',
        '<cmd>lua require("taskfile.telescope").run_task()<cr>',
        desc = 'Telescope - Run task',
      },
    },
  },
}

Lazy without telescope:

return {
  {
    'chefe/taskfile.nvim',
    config = function()
      require('taskfile').setup()
    end,
    cmd = 'Task',
  },
}

Usage

  • Run :Task to show a menu menu of all defined tasks.
  • Run :Task {task} to run the task {task} in a terminal buffer.
  • Run :lua require("taskfile.telescope").run_task() to open a telescope picker or use the keymap defined in the Lazy plugin definition.

Configuration

require('taskfile').setup({
  -- Specify a custom path to the `task` binary.
  -- Default: 'task' (if omitted)
  command = '/path/to/special/go-task-binary'
  -- Enable or diable the registration of the `:Task` command.
  -- Default: true (if omitted)
  register_command = false,
})

Credits

About

A plugin to bring Taskfile functionality to neovim.

Topics

Resources

Stars

Watchers

Forks