Skip to content

Integration

Arne Van Looveren edited this page Aug 25, 2025 · 1 revision

Neovim

  1. Install the Language Server
git clone https://github.com/arne-vl/taskr-ls && cd taskr-ls
go build -o taskr_ls
go install

Ensure taskr_ls is executable and available in your PATH:

which taskr_ls
  1. Add the taskrfile filetype to your Neovim config
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
    pattern = "*",
    callback = function(args)
        local fname = vim.fn.fnamemodify(args.file, ":t")
        if fname:lower() == "taskrfile" then
            vim.bo.filetype = "taskrfile"
        end
    end,
})
  1. Add the following snippet to your Neovim config to autostart the lsp when a taskrfile is opened.
vim.api.nvim_create_autocmd("FileType", {
    pattern = "taskrfile",
    callback = function(args)
        local bufnr = args.buf
        vim.lsp.start({
            name = "taskr_ls",
            cmd = { "taskr_ls" },
            root_dir = vim.fn.getcwd(),
            bufnr = bufnr,
        })
    end,
})
  1. Verify Open a taskrfile and check if taskr_ls is an active client by using :LSPInfo.
Clone this wiki locally