No description
  • Lua 41.1%
  • Vim Script 30.4%
  • Tree-sitter Query 28.5%
Find a file
2026-03-15 22:14:41 -04:00
doc chore: first semi-working commit 2026-03-15 17:31:26 -04:00
ftdetect chore: first semi-working commit 2026-03-15 17:31:26 -04:00
ftplugin chore: first semi-working commit 2026-03-15 17:31:26 -04:00
indent chore: first semi-working commit 2026-03-15 17:31:26 -04:00
lua/nclang fix: disable lsp semantic token highlighting 2026-03-15 22:14:41 -04:00
plugin chore: first semi-working commit 2026-03-15 17:31:26 -04:00
queries/nc feat: interfaces 2026-03-15 21:01:34 -04:00
syntax fix: interface/impl highlighting 2026-03-15 21:54:19 -04:00
README.md fix: interface/impl highlighting 2026-03-15 21:54:19 -04:00

nclang.nvim

Neovim plugin for the NC programming language.

Install

lazy.nvim

return {
  url = "https://codeberg.org/nclang/nclang.nvim.git",
  ft = "nc",
  opts = {},
}

packer

use {
  url = "https://codeberg.org/nclang/nclang.nvim.git",
  ft = "nc",
  config = function()
    require("nclang").setup()
  end,
}

Tree-sitter

After setup, install the parser with the built-in command:

:NCInstallParser

This clones tree-sitter-nc, compiles the parser, and drops the .so into neovim's parser directory. Restart nvim (or :e) to activate tree-sitter highlights. Requires git and a C compiler (cc/gcc/clang).

To update the parser later:

:NCUpdateParser

The queries/nc/ directory ships highlights, folds, indents, and locals queries matched to the grammar. They activate automatically once the parser is installed.

Without tree-sitter, the Vim regex syntax file (syntax/nc.vim) provides highlighting as a fallback.

Configuration

require("nclang").setup({
  -- Auto-format on save (requires formatter binary)
  format_on_save = false,
  -- Path to formatter (e.g. "ncfmt")
  formatter = nil,
  -- Register keyword omnifunc
  snippets = true,
})