[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Salanoid/gitlogdiff.nvim/main/lua/gitlogdiff/docs.lua [Back]  [Original]

local Docs = require("lazy.docs")

local M = {}

function M.suggested()
  return {
    "Salanoid/gitlogdiff.nvim",
    main = "gitlogdiff",
    dependencies = {
      "sindrets/diffview.nvim",
    },
    cmd = "GitLogDiff",
    opts = { max_count = 300 },
  }
end

function M.update()
  local name = "gitlogdiff"

  -- Update README.md
  Docs.save({
    suggested = {
      content = [[{
  "Salanoid/gitlogdiff.nvim",
  main = "gitlogdiff",
  dependencies = {
    "sindrets/diffview.nvim",
  },
  cmd = "GitLogDiff",
  opts = { max_count = 300 },
}]],
      lang = "lua",
    },
  })

  -- Generate Vimdocs
  local readme = vim.fn.readfile("README.md")
  local lines = {}

  table.insert(lines, "*" .. name .. ".txt*  Recent Git commits and diffs")
  table.insert(lines, "")
  table.insert(lines, "==============================================================================")
  table.insert(lines, "INTRODUCTION                                         *" .. name .. "-intro*")
  table.insert(lines, "")

  local in_code_block = false
  for _, line in ipairs(readme) do
    if line:find("^" or "

Web Proxy Viewer  |  New URL  |  Original Page