{"id":51711730,"url":"https://github.com/pynappo/hyprlang-to-lua.nvim","last_synced_at":"2026-07-16T22:05:00.936Z","repository":{"id":355378322,"uuid":"1227153994","full_name":"pynappo/hyprlang-to-lua.nvim","owner":"pynappo","description":"A Neovim plugin that transpiles Hyprlang (from hyprland configuration files) to Lua.","archived":false,"fork":false,"pushed_at":"2026-05-21T06:50:40.000Z","size":161,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T13:40:29.874Z","etag":null,"topics":["hyprland","hyprlang","lua","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pynappo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T09:30:39.000Z","updated_at":"2026-05-21T06:50:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pynappo/hyprlang-to-lua.nvim","commit_stats":null,"previous_names":["pynappo/hyprlang-to-lua.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pynappo/hyprlang-to-lua.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pynappo%2Fhyprlang-to-lua.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pynappo%2Fhyprlang-to-lua.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pynappo%2Fhyprlang-to-lua.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pynappo%2Fhyprlang-to-lua.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pynappo","download_url":"https://codeload.github.com/pynappo/hyprlang-to-lua.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pynappo%2Fhyprlang-to-lua.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35559863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hyprland","hyprlang","lua","neovim-plugin"],"created_at":"2026-07-16T22:05:00.202Z","updated_at":"2026-07-16T22:05:00.928Z","avatar_url":"https://github.com/pynappo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"This plugin assists with Hyprland's 0.55 migration from Hyprlang to Lua configs, using Neovim's built-in Treesitter\nparsing. Made for fun (and to convert my config over).\n\nThe idea is to provide near-instant transpilation from Hyprlang to Lua on a best-effort basis to help users get 90% of\nthe way to a fully converted Lua configuration, where they can then use LLMs and/or manual editing to finish the rest.\n\n\u003cimg width=\"1280\" height=\"1002\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ea2b6d07-b645-40c3-b46c-5fe625acf4d8\" /\u003e\n\n\n# Installation\n\n## Requirements\n\n- `tree-sitter-hyprlang` parser + queries (e.g. with nvim-treesitter, run `:TSInstall hyprlang`).\n- Neovim 0.12+ is officially supported. This might work with 0.10 and 0.11 as well.\n\n## Example vim.pack install\n\n```lua\nvim.pack.add({\n  \"https://github.com/pynappo/hyprlang-to-lua.nvim\"\n})\n```\n\n# Usage\n\nIn a hyprlang buffer, selecting Hyprlang text and running `:HyprlangToLuaSplit` will open a new split containing the\nautogenerated Lua code for the selected Hyprlang text. To convert the whole buffer, you can select it with\n`:%HyprlangToLuaSplit`.\n\nThe intended workflow is that if the auto-generated code looks good, you can run `:saveas ~/.config/hypr/hyprland.conf`\n(or wherever you want to save it). Or you can cherry-pick segments and yank/put them as you see fit.\n\nAny comments by hyprlang-to-lua (warnings, enclosing comments denoting autogeneration) will have `hyprlang-to-lua` in\nthem for easy searching and deletion.\n\nIf you want headless operation (i.e. to pipe the result into a new file), you can run something like:\n\n```bash\nnvim --headless --cmd \"autocmd VimEnter * lua\nrequire('hyprlang-to-lua').convert_to_stdout_then_quit('$XDG_CONFIG_HOME/hypr/hyprland.conf')\"\n```\n\n## Capabilities\n\nIn general, the most common configuration segments should translate properly. Please report any issues as you find them.\n\nNotable details/limitations:\n\n- Conversion of Hyprlang variables in keybinds (e.g. `$mainMod`) is implemented. Options that are assigned a single\nvariable should convert as well. String interpolation (i.e. strings combined with variables) is only implemented for\nkeybinds at the time of writing.\n- Most common keywords are implemented (execs, window rules, monitors, animations and curves, etc.).\n- Most, if not all dispatchers should translate properly.\n- Source statements should work if the source file being pointed to is under the `hypr/` directory, will be commented\nout otherwise.\n- Rules with multiple matchers of the same type (e.g. two `match:class` rules in a window rule) will keep only one of\nthem. hyprlang-to-lua will leave comments about this, but it won't automatically generate the extra code for you if you\nwant to preserve the same behavior.\n- There's some amount of effort to keep the generated Lua looking reasonable (in terms of line length, table formatting,\nindentation, etc.)\n- The outermost levels of Lua tables have their key-value pairs by the order in which the keys were listed in the original\nHyprlang config, whenever possible. Inner tables do not have this same sorting (yet?), and are instead sorted\nalphabetically.\n\n## TODOs\n\n- Gestures have very minimal processing on the parameters for the dispatchers, will need to go over all the actions and\nimplement fixes on a per-action basis.\n- Expose indentation settings.\n- (Not sure:) Hyprland's auto-generated lua stubs suck - most things are loosely typed, and many tables are missing\nfields only found on the wiki. It would be tedious but it'd probably be useful to override the classes with\nsignificantly better types to help Neovim users, and it would be cool to upstream the work.\n\n## Non-goals\n- Formatting is never going to be as good as an actual formatter like [StyLua](https://github.com/JohnnyMorganz/StyLua).\n- Any lua optimizations significantly more complicated than the current optimization pass: just combining similar exec\ncommands (e.g. blocks of exec-once) into a single hl.on call.\n- (maybe up for debate) Supporting variable arithmetic - lack of actual usage and just annoying to implement.\n\n# Developing\n\nRequirements:\n\n- lua-language-server\n- Neovim\n- mise (for dev tasks)\n- Hyprland 0.55+ (or have the lua stubs available at /usr/share/hypr/stubs/).\n\n# AI disclosure\n\n- Used Gemini for writing some string manipulation code (particularly, complex lua pattern strings).\n- Pretty much everything else (including this README) is human-written.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpynappo%2Fhyprlang-to-lua.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpynappo%2Fhyprlang-to-lua.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpynappo%2Fhyprlang-to-lua.nvim/lists"}