All Projects → FourierTransformer → lua-complete

FourierTransformer / lua-complete

Licence: MIT license
A Lua code completer

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to lua-complete

swoole-ide-helper-phar
Swoole IDE 自动补全,PHAR 包。
Stars: ✭ 14 (-33.33%)
Mutual labels:  autocomplete
react-autocomplete-tags
React Autocomplete Tags
Stars: ✭ 17 (-19.05%)
Mutual labels:  autocomplete
bootstrap-5-autocomplete
autocomplete/typeahead js plugin for bootstrap v5
Stars: ✭ 79 (+276.19%)
Mutual labels:  autocomplete
SDA
SDA is a rich cross-platform tool for reverse engineering that focused firstly on analysis of computer games. I'm trying to create a mix of the Ghidra, Cheat Engine and x64dbg. My tool will combine static and dynamic analysis of programs. Now SDA is being developed.
Stars: ✭ 98 (+366.67%)
Mutual labels:  analysis
orb
Orb is a dynamic network observability platform
Stars: ✭ 437 (+1980.95%)
Mutual labels:  analysis
layer
Analyzer: Checks whether there are dependencies that illegal cross-border the layer structure.
Stars: ✭ 43 (+104.76%)
Mutual labels:  analysis
react-search-autocomplete
A search box that filters the provided array of objects
Stars: ✭ 152 (+623.81%)
Mutual labels:  autocomplete
SWELF
Simple Windows Event Log Forwarder (SWELF). Its easy to use/simply works Log Forwarder and EVTX Parser. Almost in full release here at https://github.com/ceramicskate0/SWELF/releases/latest.
Stars: ✭ 23 (+9.52%)
Mutual labels:  analysis
CilTools
A set of tools to work with CIL in .NET applications
Stars: ✭ 19 (-9.52%)
Mutual labels:  analysis
shell.how
Explain shell commands using next-generation autocomplete Fig.
Stars: ✭ 237 (+1028.57%)
Mutual labels:  autocomplete
yara-exporter
Exporting MISP event attributes to yara rules usable with Thor apt scanner
Stars: ✭ 22 (+4.76%)
Mutual labels:  analysis
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+123.81%)
Mutual labels:  analysis
prop-types-definition
Patch for prop-types to get property type definition in runtime
Stars: ✭ 15 (-28.57%)
Mutual labels:  analysis
PowerSimulations.jl
Julia for optimization simulation and modeling of PowerSystems. Part of the Scalable Integrated Infrastructure Planning Initiative at the National Renewable Energy Lab.
Stars: ✭ 202 (+861.9%)
Mutual labels:  analysis
search-ui
JavaScript library to develop Search UIs for the web
Stars: ✭ 16 (-23.81%)
Mutual labels:  autocomplete
vue-thailand-address-autocomplete
🇹🇭 Autocomplete ที่อยู่ในประเทศไทย
Stars: ✭ 49 (+133.33%)
Mutual labels:  autocomplete
react-native-autocomplete-dropdown
Dropdown Item picker with search and autocomplete (typeahead) functionality for react native
Stars: ✭ 87 (+314.29%)
Mutual labels:  autocomplete
choc-autocomplete
🏇 Autocomplete Component Package for Chakra UI
Stars: ✭ 286 (+1261.9%)
Mutual labels:  autocomplete
geocoder
Geocoder is a Typescript library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations
Stars: ✭ 28 (+33.33%)
Mutual labels:  autocomplete
common-osint-model
Converting data from services like Censys and Shodan to a common data model
Stars: ✭ 35 (+66.67%)
Mutual labels:  analysis

Deprecated: lua-complete

Build Status Coverage Status lua-complete is no longer being worked on. There are numerous other lua code completion tools out there (with actual language-server support!)

Alternatives to take a look at:

Original README below

lua-complete is a code completion helper that uses analysis to determine function names, function parameters, and table keys. It should one day be able to help text editors and IDEs do completion of Lua code. It follows the client/server model used for auto-completing code and caches analysis for speed.

Setup

  1. Install lua-complete from the dev luarocks:
luarocks install --server=http://luarocks.org/dev lua-complete
  1. Install and configure one of the lua-complete plugins:

Command-line Options

Server options
lua-complete server [-p <port>]
 -p,  --port         port number to run the server on (default: 51371)

Client options
lua-complete client -c <cursor> [-f <file>] [-p <port>] [-i] [-x]
 -f,  --filename     path to file for autocompletion
 -i,  --stdin        read file from stdin. filename argument now used for cache filename
 -r,  --packagePath  path to load packages from (default: current dir)
 -c,  --cursor       cursor offset (in bytes) of variable to analyze
 -x,  --shutdown     shutdown the server
 -p,  --port         port number to connect to (default: 51371)

Basic Command-line Usage

Fire up the server:

lua-complete server

Send a file and cursor position (in bytes) to the server:

lua-complete client -f <filename> -c <cursor_position>

It currently returns the type of completion (either "table" or "function") and any values/types that it knows about.

Example:

table
cars: string
foo: string
bar: table

NOTE: The cursor has to be at the position of the ., :, [ or ( to do any completions.

Sample Library Usage

The library follows most of the same command-line options from above.

Server:

local server = require("lua-complete.server")
server.main(port)

Client:

local client = require("lua-complete.client")

-- the filename is only ever used for cache name purposes under the covers
output = client.sendRequest(filename, fileContents, cursorOffset, packagePath, port)

client.shutdown(port)

Hopes and Dreams

I'll try to keep this updated with what's currently working, what I plan to do in the future, and things that are kinda out there.

Working

lua-complete can currently help auto-complete:

  • Imported module functions, function parameters, and tables (including subtables!)
  • Lua standard library functions (except the packages module)
  • Completion of Lua's 'self' with colon operator (mostly, currently doesn't filter out "self" from function list) in imported modules
  • Table completions in current file (not-including sub-tables...)
  • Function parameters for Lua functions (in current file)
  • Add additional paths to search through (so it can handle project-level modules)

In the future

  • Better cache invalidation. Re-analyze any project-level modules that may have been updated since analysis.
  • Auto-complete subtables in current file.
  • Add completions for standard library (and possibly other popular libraries)
  • Add ability to load custom completions
  • Better UTF-8 support for variable names (server currently has a gmatch pattern that doesn't handle UTF-8 well.)

Longshot

The following would require more full file analysis as opposed to just module-level analysis (some testing would have to be done as to if there is a speed difference):

  • Determine if a Lua module function arg is optional or not
  • Return types in current file (requires more of a type system)
  • Scoping of variables (depends on how hard this ends up being)
  • Return types for imported modules (possibly out of scope)

Impossible

I'm fairly certain the following is impossible to do in pure Lua:

  • Determine a C function's arguments

Notes

This is still really experimental! Be careful using this as I'm currently changing how/what it outputs and things that may affect everyday use. I would be especially wary of interacting with the server without the client (trying to send it JSON directly), as I may change the serialize/deserialize format in the future. The same general warning goes for using any of the analyze module functions.

Your best bet is to use the command-line interface or import the server/client directly in lua - which would be useful if you're writing an editor in Lua.

Questions and Contributing

Feel free to open a Github issue with any questions/features/suggestions that you have! Also, check out CONTRIBUTING.md if you want to help!

Licenses

lua-complete is released under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].