diff options
author | seifferth <43514227+seifferth@users.noreply.github.com> | 2021-05-11 19:15:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 19:15:59 +0200 |
commit | be8ebb90b4c8ecf021f168e995b073a1f624e4cc (patch) | |
tree | 234888f99701805a3dc3b1587a066475f9646234 | |
parent | 45e07b8acdf4ba874dd7828ddff298acae2d15c2 (diff) | |
parent | 94bdf52d646ad0b5dc88baa029fc834f553d5b0e (diff) | |
download | vis-editorconfig-be8ebb90b4c8ecf021f168e995b073a1f624e4cc.tar.gz |
Merge pull request #4 from seifferth/update_editorconfig
Update to editorconfig-core-lua v0.3.0
-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) |