|
@@ -1,21 +1,22 @@ |
|
|
-- ec = require("editorconfig_core") |
|
|
-- ec = require("editorconfig_core") |
|
|
|
|
|
|
|
|
|
|
|
local function GetProperties(fullpath) |
|
|
|
|
|
local file = io.popen("echo fullpath: " .. fullpath, "r") |
|
|
|
|
|
local output = file:read("*all") |
|
|
|
|
|
file:close() |
|
|
|
|
|
return output |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
function onViewOpen(view) |
|
|
function onViewOpen(view) |
|
|
-- Is this portable? (work on windows?) |
|
|
-- Is this portable? (work on windows?) |
|
|
local pwd = os.getenv("PWD") |
|
|
local pwd = os.getenv("PWD") |
|
|
local filename = view.Buf.Path |
|
|
local filename = view.Buf.Path |
|
|
-- prop, names = ec.parse(filepath) |
|
|
-- prop, names = ec.parse(filepath) |
|
|
local fullpath = JoinPaths(pwd, filename) |
|
|
local fullpath = JoinPaths(pwd, filename) |
|
|
local out = getProperties(fullpath) |
|
|
|
|
|
|
|
|
local out = GetProperties(fullpath) |
|
|
messenger:Message("view.Buf.Path: " .. out) |
|
|
messenger:Message("view.Buf.Path: " .. out) |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
local function getProperties(fullpath) |
|
|
|
|
|
local file = io.popen("echo fullpath: " .. fullpath, "r") |
|
|
|
|
|
local output = file:read("*all") |
|
|
|
|
|
file:close() |
|
|
|
|
|
return output |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onSave(view) |
|
|
function onSave(view) |
|
|