Skip to content

dox4/taohua.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taohua.nvim

A Neovim plugin written in Rust (via nvim-oxi) for parsing TOML files.

Name

taohua means "peach blossom" in Chinese, aka 「桃花」.

大林寺桃花

唐・白居易

人间四月芳菲尽,
山寺桃花始盛开。
长恨春归无觅处,
不知转入此中来。

Install and Usage

Use with lazy.nvim:

{
  "dox4/taohua.nvim",
  build = "make",
  -- use cargo build --release on Windows without make
  -- build = "cargo build --release",
}

Then require the module in Lua:

local taohua = require("taohua")
local ret = taohua.parse_toml("/path/to/file.toml")

if ret.ok then
  print(vim.inspect(ret.value))
else
  print(ret.error)
end

API

parse_toml(path) returns one of these shapes:

  • success: { ok = true, value = <parsed_table> }
  • failure: { ok = false, error = <message> }

Development

Build plugin artifact:

make build-plugin

or just:

make

Run tests:

make test

The test target builds first, then runs headless Neovim integration tests.

About

A Neovim plugin written in Rust (via nvim-oxi) for parsing TOML files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors