{"id":28413,"library":"tree-sitter-lua","title":"tree-sitter-lua","description":"Lua grammar for tree-sitter, providing incremental parsing and syntax tree queries for Lua code. Current version 0.5.0 (2025), supports Python >=3.10. Regenerated with tree-sitter 0.26.6. Release cadence is irregular, roughly semiannual.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/tree-sitter-grammars/tree-sitter-lua","tags":["tree-sitter","lua","parsing"],"install":[{"cmd":"pip install tree-sitter-lua","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required to load and use the grammar.","package":"tree-sitter","optional":false}],"imports":[{"wrong":"from tree_sitter_lua import language_lua","symbol":"language","correct":"from tree_sitter_lua import language"}],"quickstart":{"code":"from tree_sitter import Language, Parser\nfrom tree_sitter_lua import language_lua\n\nLUA_LANGUAGE = Language(language_lua())\nparser = Parser()\nparser.set_language(LUA_LANGUAGE)\n\ntree = parser.parse(b\"print('hello world')\")\nprint(tree.root_node.sexp())","lang":"python","description":"Parses a Lua string and prints the S-expression of the syntax tree."},"warnings":[{"fix":"Upgrade tree-sitter: pip install --upgrade tree-sitter","message":"Version 0.4.0 regenerated the parser with ABI 15, breaking compatibility with tree-sitter <=0.24. Make sure your tree-sitter library is at least 0.25.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Use `from tree_sitter_lua import language_lua`","message":"The old import pattern `from tree_sitter_lua import language` (without underscore) is no longer supported after v0.1.0.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Run `pip install tree-sitter` before using tree-sitter-lua.","message":"The grammar version (0.5.0) does not match the tree-sitter library version. You must install tree-sitter separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.26.6':33 '0.5.0':23 '2025':24 '3.10':27 'cadenc':35 'code':20 'current':21 'grammar':6 'increment':12 'irregular':37 'lua':4,5,19,43 'pars':13,44 'provid':11 'python':26 'queri':17 'regener':28 'releas':34 'rough':38 'semiannu':39 'sitter':3,10,32,42 'support':25 'syntax':15 'tree':2,9,16,31,41 'tree-sitt':8,30,40 'tree-sitter-lua':1 'version':22","created_at":"2026-05-09T05:55:23.219004+00:00","updated_at":"2026-05-09T05:55:23.219004+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/tree-sitter-grammars/tree-sitter-lua","docs":null,"changelog":null,"pypi":"https://pypi.org/project/tree-sitter-lua/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}