{"id":15343682,"url":"https://github.com/spacewander/openresty-vim","last_synced_at":"2025-04-15T03:31:12.974Z","repository":{"id":45691574,"uuid":"80963890","full_name":"spacewander/openresty-vim","owner":"spacewander","description":"A vim plugin offers nginx/openresty syntax highlight and directives completion","archived":false,"fork":false,"pushed_at":"2023-01-28T02:30:59.000Z","size":180,"stargazers_count":23,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T15:11:24.556Z","etag":null,"topics":["luajit","nginx","openresty","syntax-highlighting","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacewander.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":"2017-02-05T02:40:48.000Z","updated_at":"2024-01-30T14:10:30.000Z","dependencies_parsed_at":"2023-02-15T14:01:44.602Z","dependency_job_id":null,"html_url":"https://github.com/spacewander/openresty-vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Fopenresty-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Fopenresty-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Fopenresty-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Fopenresty-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacewander","download_url":"https://codeload.github.com/spacewander/openresty-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249001400,"owners_count":21196361,"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":["luajit","nginx","openresty","syntax-highlighting","vim","vim-plugin"],"created_at":"2024-10-01T10:48:33.009Z","updated_at":"2025-04-15T03:31:12.953Z","avatar_url":"https://github.com/spacewander.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"## A Vim plugin offers Nginx/Openresty syntax highlight and directives completion\n\n![example](./example.png)\n\nThis little plugin offers:\n1. syntax highlight for Nginx configuration, with addition OpenResty enhancement.\n1. syntax highlight for LuaJIT source file, with adddition OpenResty API highlight.\n1. syntax-based directives completion.\n\n#### Support version\n\nThis plugin supports OpenResty v1.21.4.\n\n#### How to use\n\nFirst of all, install this plugin with your favorite plugin manager.\n\nThe syntax highlight is enabled once your file is detected as Nginx configuration.\nIf Vim doesn't recognize the file type, you could add this to your `.vimrc`:\n\n```\nautocmd BufRead,BufNewFile pattern_matched_your_file(s) set filetype=nginx\n```\n\nFor example, `autocmd BufRead,BufNewFile nginx_*.conf.tpl set filetype=nginx` or `autocmd BufRead,BufNewFile * if match(getline(1),\"nginx\") \u003e=0 | set filetype=nginx | endif`\n\nTo complete the directives, type part of the word and then type `Ctrl+x Ctrl+o` to trigger it.\nIf you are using [YouCompleteMe](https://github.com/Valloric/YouCompleteMe), set `let g:ycm_seed_identifiers_with_syntax = 1` in your `.vimrc`.\n\n#### Known issue\n\nThere is a limit to render Lua snippet inside `_by_lua_block` directives. You need to close the block with `}` in separate line, and `}` should have\nthe same indent with the `{`. It is a hack to distinguish from `}` of the inner Lua snippet.\nAnyway, if your configuration is in good format, the highlight should work smoothly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacewander%2Fopenresty-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacewander%2Fopenresty-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacewander%2Fopenresty-vim/lists"}