You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
580 B

  1. -- ec = require("editorconfig_core")
  2. function onViewOpen(view)
  3. -- Is this portable? (work on windows?)
  4. local pwd = os.getenv("PWD")
  5. local filename = view.Buf.Path
  6. -- prop, names = ec.parse(filepath)
  7. local fullpath = JoinPaths(pwd, filename)
  8. local out = getProperties(fullpath)
  9. messenger:Message("view.Buf.Path: " .. out)
  10. end
  11. local function getProperties(fullpath)
  12. local file = io.popen("echo fullpath: " .. fullpath, "r")
  13. local output = file:read("*all")
  14. file:close()
  15. return output
  16. end
  17. function onSave(view)
  18. messenger:Message("Saved!")
  19. end