toml parser api forked from SpaceVim's toml api
Using nvim-plug:
require('plug').add({
{
'wsdjeg/toml.nvim',
},
})Using luarocks
luarocks install toml.nvim
local toml = require('toml')
local obj = toml.parse_file('.stylua.toml')
vim.print(obj)
-- the output should be:
-- {
-- call_parentheses = "Always",
-- column_width = 100,
-- indent_type = "Spaces",
-- indent_width = 2,
-- line_endings = "Unix",
-- quote_style = "AutoPreferSingle"
-- }
-- or