This is a free lua language service that I created based on wowaddonstudio.
It provides syntax highlighting, code completion, goto definition, HTTP based debugging for the NPL/Lua programming language.
*NOW open sourced*
Source code:
https://github.com/LiXizhi/NPL
Features:
- Lua 5.1 syntax highlighting: this is fast and do not freeze the computer even with large text files.
- Code outlining: menu path: view.other_windows.lua/npl outliner
- IntelliSense and code completion using XML files under ${SolutionDir}/Documentation. Users can add new XML files for their own application. See ${install path}/Documentation for examples. Filepath can be found in NPL output panel.
- Quick info: mouse over any functions to display quick info dynamically for all opened files and xml documentations
- Reformat code: indentation, spaces between identifiers, etc.
- Supporting syntax highting in mixed HTML/lua/npl files like php file. `<%`, `%>`, `<?=`, `?>`, etc
- Nativation bar on top for all variables and functions defined in the current file.
- Display syntax errors as you type.
- Defining your own colors of text, functions, keywords, etc for your preferred theme. see Menu::Options::Fonts and Colors::NPL.XXX values
- Goto function definitions for all opened files and those in xml configuration files.
- Code snippets: right click to bring up the context menu, then click "insert snippets...", a dialog will guide you to register preinstalled code snippets. After that, goto `menu::tools::code snippet manager`(Ctrl+K+B),choose npl_lua, and make some modifications, such as removing unused folders to force vs to refresh its code snippet cache, and restart visual studio.
- Setting breakpoints. One needs to install the NPLLuaDebuggerPackage.vsix to use it.
- Setting HTTP breakpoints. One needs to install NPLRuntime.
The reason that it is called NPL language service is that it is developed for use in our own language. see also:
Changes
2017.3.1 fixed code formatter for comment blocks.
2017.2.8 vs 2017 supported. code reformat supported. NPL syntax supported
2016.9.16 NPL set breakpoint here is made async.
2016.7.13 fixed function with underscore, added NPL Add Breakpoint Here
2016.7.1 support Documentation under each project directory. NPL.load F12 to goto file. Support open *.npl files.
2016.3.22 support quick info, outlining, error display, and mixed HTML/lua mode.
2015.7.10 support code completion (IntelliSense) per solution from XML files.
Fuzzy filter for functions in NPL/lua outliner tool window.
2015.3.1 fixed lexer for hex number display like 0x11ff, 0Xff
2014.2.5 Supporting Visual studio 2010/2012/2013
2011.11.26 page down fixed