practicalli / practicalli/nvim-astro

plugin: generate diagrams from PlantUML code

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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",
          },
        },
      },
    },
  },
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the Astrocore mapping configuration for the Clojure files and review the supplied lu example, then verify how PlantUML is invoked through the configured binary or Java jar. Done means the mapping generates the diagram and opens the resulting image without requiring a specific Neovim plugin.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, java, lua, neovim
Domain
cli, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.