{"id":13898945,"url":"https://github.com/WolfgangMehner/lua-support","last_synced_at":"2025-07-17T16:31:23.181Z","repository":{"id":16169608,"uuid":"18915845","full_name":"WolfgangMehner/lua-support","owner":"WolfgangMehner","description":"Edit Lua scripts in Vim/gVim/Neovim. Insert code snippets, run, compile, and check the code and look up help.","archived":false,"fork":false,"pushed_at":"2021-09-22T18:52:02.000Z","size":412,"stargazers_count":24,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-25T05:30:41.661Z","etag":null,"topics":["gvim","lua","neovim","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WolfgangMehner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-18T14:49:39.000Z","updated_at":"2023-06-20T07:51:44.000Z","dependencies_parsed_at":"2022-09-02T17:00:36.568Z","dependency_job_id":null,"html_url":"https://github.com/WolfgangMehner/lua-support","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/WolfgangMehner/lua-support","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolfgangMehner%2Flua-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolfgangMehner%2Flua-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolfgangMehner%2Flua-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolfgangMehner%2Flua-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WolfgangMehner","download_url":"https://codeload.github.com/WolfgangMehner/lua-support/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WolfgangMehner%2Flua-support/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265629946,"owners_count":23801494,"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":["gvim","lua","neovim","vim","vim-plugin"],"created_at":"2024-08-06T18:04:32.942Z","updated_at":"2025-07-17T16:31:22.795Z","avatar_url":"https://github.com/WolfgangMehner.png","language":"Vim script","readme":"Preface\n================================================================================\n\nThis repository is mainly for the use with plug-in managers.\n\nHave a look at the [Screenshot Page](https://wolfgangmehner.github.io/vim-plugins/luasupport.html).\n\nThe development happens in [WolfgangMehner/vim-plugins](https://github.com/WolfgangMehner/vim-plugins).\n\n\nPreview Version\n================================================================================\n\n___This is a preview version!___\n\nNotable new feature:\n\n- Run Lua in a terminal window directly inside the editor.\n- Fully enabled for Neovim.\n\nThe terminal window relies on the new `+terminal` feature, which becomes\navailable with a patch level of approx. `8.0.1000`.\n\n_Please read the release notes below._\n\n\n--------------------------------------------------------------------------------\n\nREADME for lua-support.vim (Version 1.1alpha) / November 22 2020\n================================================================================\n\n  *  INSTALLATION\n  *  RELEASE NOTES\n  *  FILES\n  *  ADDITIONAL TIPS\n  *  CREDITS\n\n\nLua-IDE for Vim/gVim/Neovim. It is written to considerably speed up writing code\nin a consistent style. This is done by inserting complete statements, idioms and\ncomments. These code fragments are provided in an extendible template library.\nThis plug-in helps with running and compiling Lua scripts, applying the code\nchecker, and provides quick access to the online documentation of the Lua\nfunctions.\nPlease read the documentation.\n\nThis plug-in can be used with Vim version 7.3+ and Neovim 0.2.1+.\n\nLua is: Copyright 1994-2016 Lua.org, PUC-Rio.\n\n\n--------------------------------------------------------------------------------\n\nINSTALLATION\n================================================================================\n\nA system-wide installation for all users can also be done. This will have\nfurther effects on how the plug-in works. For a step-by-step instruction, as\nwell as an explanation of the other consequences, please see the help file\n`doc/luasupport.txt` or look up the documentation via:\n\n      :help luasupport-system-wide\n\n\n(1) LINUX\n----------------------------------------------------------------------\n\nThe subdirectories in the zip archive `lua-support.zip` mirror the directory\nstructure which is needed below the local installation directory `$HOME/.vim/`\n(find the value of `$HOME` with `:echo $HOME` from inside Vim).\n\n(1.0) Save the template files in `$HOME/.vim/lua-support/templates/` if you\n   have changed any of them.\n\n(1.1) Copy the zip archive `lua-support.zip` to `$HOME/.vim` and run\n\n      unzip lua-support.zip\n\n   Afterwards, these files should exist:\n\n      $HOME/.vim/autoload/mmtemplates/...\n      $HOME/.vim/doc/...\n      $HOME/.vim/plugin/lua-support.vim\n\n(1.2) Loading of plug-in files must be enabled. If not use\n\n      :filetype plugin on\n\n   This is the minimal content of the file `$HOME/.vimrc`. Create one if there\n   is none or use the file in `$HOME/.vim/lua-support/rc` as a starting point.\n\n(1.3) Make the plug-in help accessible by typing the following command on the\n   Vim command line:\n\n      :helptags $HOME/.vim/doc/\n\n(1.4) Set at least some personal details. Use the map \\ntw inside a Lua buffer\n   or the menu entry:\n\n      Lua -\u003e Snippets -\u003e template setup wizard\n\n   It will help you set up the file `_runtimepath_/templates/personal.templates`.\n   The file is read by all plug-ins supporting this feature to get your personal\n   details. Here is the minimal personalization (my settings as an example):\n\n      SetMacro( 'AUTHOR',       'Wolfgang Mehner' )\n      SetMacro( 'AUTHORREF',    'WM' )\n      SetMacro( 'EMAIL',        'wolfgang-mehner@web.de' )\n      SetMacro( 'ORGANIZATION', '' )\n      SetMacro( 'COPYRIGHT',    'Copyright (c) |YEAR|, |AUTHOR|' )\n\n   Use the file `$HOME/.vim/templates/lua.templates` to customize or add to your\n   Lua template library. It can also be set up via the wizard.\n\n   This plug-in ships with templates for Lua's C-API. If you want to use them,\n   please consult the help file `:help luasupport-usage-capi`.\n\n   (Read more about the template system in the plug-in documentation.)\n\n(1.5) Consider additional settings in the file `$HOME/.vimrc`. The files\n   `customization.vimrc` and `customization.gvimrc` are replacements or\n   extensions for your `.vimrc` and `.gvimrc`. You may want to use parts of\n   them. The files are documented.\n\n   Some settings are specifically for Lua buffers and should be placed in the\n   filetype plug-in. You may copy the file `lua-support/rc/lua.vim` into the\n   directory `$HOME/.vim/ftplugin/`, or use the settings there as additions to\n   your own filetype plug-in.\n\n\n(2) WINDOWS\n----------------------------------------------------------------------\n\nThe subdirectories in the zip archive `lua-support.zip` mirror the directory\nstructure which is needed below the local installation directory `$HOME/vimfiles/`\n(find the value of `$HOME` with `:echo $HOME` from inside Vim).\n\n(2.0) Save the template files in `$HOME/vimfiles/lua-support/templates/` if you\n   have changed any of them.\n\n(2.1) Copy the zip archive `lua-support.zip` to `$HOME/vimfiles` and run\n\n      unzip lua-support.zip\n\n   Afterwards, these files should exist:\n\n      $HOME/vimfiles/autoload/mmtemplates/...\n      $HOME/vimfiles/doc/...\n      $HOME/vimfiles/plugin/lua-support.vim\n\n(2.2) Loading of plug-in files must be enabled. If not use\n\n      :filetype plugin on\n\n   This is the minimal content of the file `$HOME/_vimrc`. Create one if there\n   is none or use the file in `$HOME/vimfiles/lua-support/rc` as a starting point.\n\n(2.3) Make the plug-in help accessible by typing the following command on the\n   Vim command line:\n\n      :helptags $HOME\\vimfiles\\doc\\\n\n(2.4) Set at least some personal details. Use the map \\ntw inside a Lua buffer\n   or the menu entry:\n\n      Lua -\u003e Snippets -\u003e template setup wizard\n\n   It will help you set up the file `_runtimepath_/templates/personal.templates`.\n   The file is read by all plug-ins supporting this feature to get your personal\n   details. Here is the minimal personalization (my settings as an example):\n\n      SetMacro( 'AUTHOR',       'Wolfgang Mehner' )\n      SetMacro( 'AUTHORREF',    'WM' )\n      SetMacro( 'EMAIL',        'wolfgang-mehner@web.de' )\n      SetMacro( 'ORGANIZATION', '' )\n      SetMacro( 'COPYRIGHT',    'Copyright (c) |YEAR|, |AUTHOR|' )\n\n   Use the file `$HOME/vimfiles/templates/lua.templates` to customize or add to\n   your Lua template library. It can also be set up via the wizard.\n\n   This plug-in ships with templates for Lua's C-API. If you want to use them,\n   please consult the help file `:help luasupport-usage-capi`.\n\n   (Read more about the template system in the plug-in documentation.)\n\n(2.5) Consider additional settings in the file `$HOME/_vimrc`. The files\n   `customization.vimrc` and `customization.gvimrc` are replacements or\n   extensions for your `_vimrc` and `_gvimrc`. You may want to use parts of\n   them. The files are documented.\n\n   Some settings are specifically for Lua buffers and should be placed in the\n   filetype plug-in. You may copy the file `lua-support/rc/lua.vim` into the\n   directory `$HOME/vimfiles/ftplugin/`, or use the settings there as additions\n   to your own filetype plug-in.\n\n(2.6) Make sure the shell is set up correctly. The options `shell`,\n   `shellcmdflag`, `shellquote`, and `shellxquote` must be set consistently.\n   Compare `:help luasupport-troubleshooting`.\n\n\n(3) ADDITIONAL REMARKS\n----------------------------------------------------------------------\n\nThere are a lot of features and options which can be used and influenced:\n\n  *  use of the extendible template library\n  *  automated generation of comments for functions\n  *  use of the Lua interpreter, compiler and code checker\n  *  quick access to the online documentation\n  *  removing the Lua menu\n\nActions differ for different modes. Please read the documentation:\n\n      :help luasupport\n\nAny problems? See the TROUBLESHOOTING section at the end of the help file\n`doc/luasupport.txt`.\n\n\n--------------------------------------------------------------------------------\n\nRELEASE NOTES\n================================================================================\n\nRELEASE NOTES FOR VERSION 1.1alpha\n----------------------------------------------------------------------\n- Adapt for running under Neovim more smoothly.\n- Add output method 'terminal' for running scripts in a terminal window\n  (requires +terminal).\n- Rename output methods 'vim-io' to 'cmd-line', and 'vim-qf' to 'quickfix',\n  for more consistency (old settings will still work).\n- The templates which are inserted into new files as file skeletons can be\n  specified in the templates library, via the property:\n    `Lua::FileSkeleton::Script`\n- Add configuration variables `g:Lua_Ctrl_j` and `g:Lua_Ctrl_d` to control the\n  creation of the `CTRL+J` and `CTRL+D` maps.\n- Update Lua's reference manual to 5.3.6.\n- Move the filetype plug-in for lua to `lua-support/rc`.\n- Minor changes and bugfixes.\n\nNote: The filetype plug-in has been moved, and is thus not loaded automatically\nanymore. Copy it from `lua-support/rc/` to `ftplugin`, or add the commands there\nto your own filetype plug-in.\n\n\nRELEASE NOTES FOR OLDER VERSIONS\n----------------------------------------------------------------------\n-\u003e see file `lua-support/doc/ChangeLog`\n\n\n--------------------------------------------------------------------------------\n\nFILES\n================================================================================\n\n    README.md\n                        This file.\n\n    autoload/mmtemplates/*\n                        The template system.\n    autoload/mmtoolbox/*\n                        The toolbox (make, ...).\n\n    doc/luasupport.txt\n                        The help file for Lua support.\n    doc/templatesupport.txt\n                        The help file for the template system.\n    doc/toolbox*.txt\n                        The help files for the toolbox.\n\n    plugin/lua-support.vim\n                        The Lua plug-in for Vim/gVim/Neovim.\n\n    lua-support/templates/Templates\n                        Lua main template file.\n    lua-support/templates/*.templates\n                        Several dependent template files.\n\n___The following files and extensions are for convenience only.___\n___lua-support.vim will work without them.___\n___The settings are explained in the files themselves.___\n\n    ftdetect/template.vim\n    ftplugin/template.vim\n    syntax/template.vim\n                        Additional files for working with templates.\n\n    lua-support/codesnippets/*\n                        Some Lua code snippets as a starting point.\n\n    lua-support/doc/ChangeLog\n                        Complete change log.\n\n    lua-support/rc/additions.gvimrc\n                        Additional settings for use in .gvimrc:\n                          hot keys, mouse settings, fonts, ...\n    lua-support/rc/additions.vimrc\n                        Example settings for use in .vimrc:\n                          setup of the plug-in\n\n    lua-support/rc/customization.gvimrc\n                        Suggestion for the configuration file .gvimrc:\n                          hot keys, mouse settings, fonts, ...\n    lua-support/rc/customization.vimrc\n                        Suggestion for the configuration file .vimrc:\n                          hot keys, tabstop, use of dictionaries,\n                          the setup of the plug-in, ...\n\n    lua-support/rc/lua.vim\n                        Example filetype plug-in for Lua:\n                          defines additional maps\n\n    lua-support/rc/*.templates\n                        Sample template files for customization. Used by the\n                        template setup wizard.\n\n\n--------------------------------------------------------------------------------\n\nADDITIONAL TIPS\n================================================================================\n\n(1) You may want to use a central hidden directory for all your backup files:\n\n   1.1 Add the following line to .vimrc:\n\n      set backupdir=$HOME/.vim.backupdir\n\n   1.2 Create  $HOME/.vim.backupdir  .\n\n   1.3 Add the following line to your shell initialization file  ~/.profile :\n\n      find $HOME/.vim.backupdir/  -name \"*\" -type f -mtime +60 -exec rm -f {} \\;\n\n   When you are logging in all files in the backup directory older then 60\n   days (-mtime +60) will be removed (60 days is a suggestion, of course).\n   Be sure to backup in shorter terms !\n\n(2) gVim. Toggle 'insert mode' \u003c--\u003e 'normal mode' with the right mouse button\n   (see mapping in file customization.gvimrc).\n\n(3) gVim. Use tear off menus.\n\n(4) Try 'Focus under mouse' as window behavior (No mouse click when the mouse\n   pointer is back from the menu entry).\n\n(5) Use Emulate3Buttons \"on\" (X11) even for a 3-button mouse. Pressing left and\n   right button simultaneously without moving your fingers is faster than\n   moving a finger to the middle button (which is often a wheel).\n\n\n--------------------------------------------------------------------------------\n\nCREDITS\n================================================================================\n\n__We thank:__\n\n* Fritz Mehner (vim.org user name: mehner) for a number of things:\n  - his plug-ins (bash-support, c-support, perl-support, ...) provided the\n    inspiration and model for this plug-in and the utilized template support\n  - parts of the documentation and other material (including the 'ADDITIONAL TIPS'\n    above) are taken from his plug-ins as well\n\n* Luis Carvalho (Kozure):\n  - the idea for suppling Lua's reference manual in Vim's help format is taken\n    from his plug-in \"luarefvim\", which contains previous versions of the\n    reference manual\n    ( https://www.vim.org/scripts/script.php?script_id=1291 )\n\n\nFor a complete list of people who made contributions to this plug-in,\nplease be so kind as to take a look at the credits:\n\n      :help luasupport-credits\n","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWolfgangMehner%2Flua-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWolfgangMehner%2Flua-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWolfgangMehner%2Flua-support/lists"}