Skip to content

plugin: generate diagrams from PlantUML code #59

Description

@practicalli-johnny

Generate a UML diagram from PlantUML code within a Clojure file.

NOTE: no specific Neovim plugin is required, as PlantUML can be called from a Neovim key mapping

Create a <leader>lu key mapping to launch PlantUML (using OS exec path or specifying location of plantuml binary)

-- ------------------------------------------
-- Generate UML diagrams from PlantUML code
--
-- Requires PlantUML jar or binary
-- Shows image using OS image viewer
-- ------------------------------------------

if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE

---@type LazySpec
return {
  -- PlantUMl via external tool - key mapping
  {
    "AstroNvim/astrocore",
    opts = {
      mappings = {
        n = {

          -- shell to plantuml binary
          -- ["<Leader>lu"] = { ':silent exec "!plantuml % && open %:s,clj,png,"<CR>', desc = "UML diagram" },

          -- shell to java and plantuml jar (update path as required)
          ["<Leader>lu"] = {
            ':silent exec "!/usr/bin/java -jar ~/.local/share/plantuml/current.jar % && open %:s,clj,png,"<CR>',
            desc = "UML diagram",
          },
        },
      },
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions