{"id":19009953,"url":"https://github.com/editorconfig/editorconfig-core-lua","last_synced_at":"2026-04-24T05:30:20.744Z","repository":{"id":50089224,"uuid":"68541402","full_name":"editorconfig/editorconfig-core-lua","owner":"editorconfig","description":"EditorConfig Core bindings for Lua","archived":false,"fork":false,"pushed_at":"2021-06-04T17:18:57.000Z","size":56,"stargazers_count":17,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-01T21:21:55.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/editorconfig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-18T19:05:39.000Z","updated_at":"2024-12-06T14:58:20.000Z","dependencies_parsed_at":"2022-09-17T23:00:47.646Z","dependency_job_id":null,"html_url":"https://github.com/editorconfig/editorconfig-core-lua","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editorconfig%2Feditorconfig-core-lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/editorconfig","download_url":"https://codeload.github.com/editorconfig/editorconfig-core-lua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240037347,"owners_count":19737918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:09:22.488Z","updated_at":"2026-04-24T05:30:18.029Z","avatar_url":"https://github.com/editorconfig.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EditorConfig Lua Core\n\nEditorConfig Lua Core provides the same functionality as the\n[EditorConfig C Core][1] library.\n\n## EditorConfig Project\n\nEditorConfig makes it easy to maintain the correct coding style when switching\nbetween different text editors and between different projects. The EditorConfig\nproject maintains a file format and plugins for various text editors which\nallow this file format to be read and used by those editors. For information\non the file format and supported text editors, see the [EditorConfig][2]\nwebsite.\n\n## Installation\n\n#### Build using CMake\n\n```\nmkdir build\ncd build\ncmake ..\nmake\nsudo make install\n```\n\nOr just copy the `editorconfig.so` binary module to somewhere in\nyour `LUA_CPATH`.\n\n#### Install using LuaRocks\n\nYou can also install the latest release using [LuaRocks][3]:\n\n```\nluarocks [--local] install editorconfig-core\n```\n\n## Usage\n\nThe `parse` module function returns a name/value property table. Typical usage\nby plugins would be:\n\n```lua\nec = require(\"editorconfig\")\n\nfor name, value in pairs(ec.parse(\"/full/path/to/file\")) do\n    configure_property[name](value)\nend\n```\n\nSometimes it is useful to have the same stable order for each `parse`\ninvocation that the EditorConfig C Core library provides. For that the property\nnames are available as an array in a second return value:\n\n```lua\nprop, names = ec.parse(\"/full/path/to/file\")\nprint(#names .. \" properties:\")\nfor idx, name in ipairs(names) do\n  print(string.format(\"%s: %s=%s\", idx, name, prop[name]))\nend\n```\n\nNote also the use of the length operator to retrieve the EditorConfig\nproperty count for a given file.\n\n#### Note on API stability\n\nVersion 0.3.0 introduced major backward incompatibilities.\n\n* The `open`function was removed.\n* Every EditorConfig value has the Lua type `string`.\n* Lua module renamed to `editorconfig`. \n\nPlease update accordingly.\n\n[1]: https://github.com/editorconfig/editorconfig-core-c\n[2]: https://editorconfig.org\n[3]: https://luarocks.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditorconfig%2Feditorconfig-core-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feditorconfig%2Feditorconfig-core-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditorconfig%2Feditorconfig-core-lua/lists"}