Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Docs for OverseerQuickAction->watch #314

Open
raffaem opened this issue Jun 9, 2024 · 1 comment
Open

bug: Docs for OverseerQuickAction->watch #314

raffaem opened this issue Jun 9, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@raffaem
Copy link

raffaem commented Jun 9, 2024

Neovim version (nvim -v)

0.10.0

Operating system/version

Arch Linux

Describe the bug

Where can I find the documentation for :OverseerQuickAction -> watch?

I found this function described in the tutorial, but other than that there seems to be no official documentation.

What does interrupt do exactly?

What are the possible mode?

How to make paths default to the current file, not the current directory?

And what task does it restart exactly? Just the last task? The tasks run since the last watch? All the tasks since the buffer was opened?

What is the severity of this bug?

minor (annoyance)

Steps To Reproduce

  1. Read the tutorial
  2. Look for official documentation

Expected Behavior

watch should be documented

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "stevearc/dressing.nvim", config = true },
  {
    "stevearc/overseer.nvim",
    config = function()
      require("overseer").setup({
        -- add your overseer config here
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

@raffaem raffaem added the bug Something isn't working label Jun 9, 2024
@raffaem raffaem changed the title Docs for watchbug: bug: Docs for OverseerQuickAction->watch Jun 9, 2024
@stevearc
Copy link
Owner

There's some information in :help overseer-actions, but it directs you to lua/overseer/task_list/actions.lua as the source of truth. From there, you can see that the action is adding the restart_on_save component.

params[1] = "restart_on_save"
task:set_component(params)

The docs for that component are either at :help restart_on_save or in components.md.

How to make paths default to the current file, not the current directory?

There is currently no way to customize built-in actions. You would need to define your own action that passes in the current file instead of the cwd on this line

paths = { vim.fn.getcwd() },

And what task does it restart exactly? Just the last task? The tasks run since the last watch? All the tasks since the buffer was opened?

It will restart the task that you ran the "watch" action on, because that is the task that will get the restart_on_save component added to it.

@stevearc stevearc added the question Further information is requested label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants