No description
- Lua 41.1%
- Vim Script 30.4%
- Tree-sitter Query 28.5%
| doc | ||
| ftdetect | ||
| ftplugin | ||
| indent | ||
| lua/nclang | ||
| plugin | ||
| queries/nc | ||
| syntax | ||
| README.md | ||
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,
})