Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pic.nvim

Neovim plugin for the Pic graphics language. Provides filetype detection, syntax highlighting, indentation, and a built-in LSP server.

Features

  • Filetype detection for *.pic files
  • Syntax highlighting (primitives, attributes, labels, macros, strings, comments, etc.)
  • Auto-indentation for [] and {} blocks
  • LSP server (written in Lua, no external dependencies) with:
    • Completion for all Pic keywords, primitives, attributes, functions, style variables, labels, and macros
    • Hover documentation
    • Diagnostics (unmatched braces/brackets, .PS/.PE pairing)
    • Document symbols (labels and macro definitions)

Requirements

  • Neovim >= 0.11 (uses vim.lsp.config / vim.lsp.enable)
  • lua or luajit on PATH (for the LSP server)

Installation

lazy.nvim

{
  "jdearmas/pic.nvim",
  ft = "pic",
  opts = {},
}

packer.nvim

use {
  "jdearmas/pic.nvim",
  ft = "pic",
  config = function()
    require("pic").setup()
  end,
}

vim-plug

Plug 'jdearmas/pic.nvim'

Then in your init.lua:

require("pic").setup()

Manual

Clone the repo into your Neovim packages directory:

git clone https://github.com/jdearmas/pic.nvim.git \
  ~/.local/share/nvim/site/pack/plugins/start/pic.nvim

Then add to your init.lua:

require("pic").setup()

Setup

Call setup() to enable the LSP server. Filetype detection, syntax highlighting, and indentation work without it.

require("pic").setup()

Options

require("pic").setup({
  -- Override the LSP command (default: auto-detects lua/luajit on PATH)
  cmd = { "/path/to/lua", "/path/to/pic-lsp.lua" },
})

License

MIT

About

A Neovim plugin for the PIC — A Graphics Language for Typesetting

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages