diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | edconf.lua (renamed from editorconfig.lua) | 11 |
2 files changed, 4 insertions, 9 deletions
@@ -13,4 +13,4 @@ You'll need the Lua wrapper for editorconfig-core installed. This can be done th git clone https://github.com/vktec/vis-editorconfig "$HOME/.config/vis/editorconfig" ``` -Then add `require "editorconfig/editorconfig"` to your `visrc.lua`. +Then add `require "editorconfig/edconf"` to your `visrc.lua`. diff --git a/editorconfig.lua b/edconf.lua index 67389b7..2bab52f 100644 --- a/editorconfig.lua +++ b/edconf.lua @@ -1,5 +1,5 @@ require "vis" -ec = require "editorconfig_core" +ec = require "editorconfig" -- Simple wrapper function vis_set(option, value) @@ -16,7 +16,7 @@ end OPTIONS = { indent_style = function (value) - vis_set("expandtab", (value == ec.T.INDENT_STYLE_SPACE)) + vis_set("expandtab", (value == "space")) end, indent_size = function (value) @@ -37,12 +37,7 @@ OPTIONS = { -- max_line_length } --- Uses editorconfig-core-lua's as yet unreleased iterator API ---function ec_iter(p) do --- return ec.open(p) ---end - --- Compatible with editorconfig-core-lua v0.1.1 +-- Compatible with editorconfig-core-lua v0.3.0 function ec_iter(p) i = 0 props, keys = ec.parse(p) |