Neovim Gren support
Simply add using your favourite package manager and call setup()
local gren = require "MaeBrooks/nvim-gren"
gren.setup()
{
"Maebrooks/nvim-gren",
dependencies = { "nvim-treesitter/nvim-treesitter" },
}
Simply add this to automatically format your current gren file after each write
vim.cmd.autocmd "BufWritePost *.gren :GrenFormat"
gren.setup()
takes a single optional argument of opts
{
-- Automatically ensures that the `gren` tree sitter parser is installed using
-- require("nvim-treesitter.install").ensure_installed("gren")
-- defaults to true
use_treesitter = true,
}
Field | Description |
---|---|
setup(opts?) |
Takes a single argument of opts |
format_file() |
writes and formats the current file using gren format |
make_file(file?) |
runs gren make <file=%> - IS NOT SILENT |
make_file_silent(file?) |
runs gren make <file=%> - IS SILENT |
Command | Action |
---|---|
:GrenFormat |
format_file() - writes and formats the current file using gren format |
:GrenMake |
make_file(file) - runs gren make <file=%> where file is the first optional argument |