Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add signatures of LuaSocket functions

  • Loading branch information...
commit 972cac78a3ba624f9804349c7ee428cc603dcd6e 1 parent 331a8c4
Peter Odding authored June 15, 2011
51  autoload/xolox/lua_data.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim auto-load script
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: June 14, 2011
  3
+" Last Change: June 15, 2011
4 4
 " URL: http://peterodding.com/code/vim/lua-ftplugin
5 5
 
6 6
 " This script contains static user completion data based
@@ -192,6 +192,9 @@ let g:xolox#lua_data#library = [
192 192
       \ { 'word': 'table.sort()', 'kind': 'f' } ]
193 193
 
194 194
 " Function signatures. {{{1
  195
+" Sources:
  196
+"  - http://www.lua.org/manual/5.1/manual.html#5
  197
+"  - http://w3.impa.br/~diego/software/luasocket/reference.html
195 198
 
196 199
 let g:xolox#lua_data#signatures = {
197 200
       \ 'assert': 'assert(v [, message])',
@@ -318,7 +321,51 @@ let g:xolox#lua_data#signatures = {
318 321
       \ 'debug.setlocal': 'debug.setlocal([thread,] level, local, value)',
319 322
       \ 'debug.setmetatable': 'debug.setmetatable(object, table)',
320 323
       \ 'debug.setupvalue': 'debug.setupvalue(func, up, value)',
321  
-      \ 'debug.traceback': 'debug.traceback([thread,] [message] [, level])' }
  324
+      \ 'debug.traceback': 'debug.traceback([thread,] [message] [, level])',
  325
+      \
  326
+      \ 'ftp.get': 'ftp.get(url)',
  327
+      \ 'ftp.put': 'ftp.put(url, content)',
  328
+      \ 'http.request': 'http.request(url [, body])',
  329
+      \ 'ltn12.filter.chain': 'ltn12.filter.chain(filter1, filter2 [, ... filterN])',
  330
+      \ 'ltn12.filter.cycle': 'ltn12.filter.cycle(low [, ctx, extra])',
  331
+      \ 'ltn12.pump.all': 'ltn12.pump.all(source, sink)',
  332
+      \ 'ltn12.pump.step': 'ltn12.pump.step(source, sink)',
  333
+      \ 'ltn12.sink.chain': 'ltn12.sink.chain(filter, sink)',
  334
+      \ 'ltn12.sink.error': 'ltn12.sink.error(message)',
  335
+      \ 'ltn12.sink.file': 'ltn12.sink.file(handle, message)',
  336
+      \ 'ltn12.sink.simplify': 'ltn12.sink.simplify(sink)',
  337
+      \ 'ltn12.sink.table': 'ltn12.sink.table([table])',
  338
+      \ 'ltn12.source.cat': 'ltn12.source.cat(source1 [, source2, ..., sourceN])',
  339
+      \ 'ltn12.source.chain': 'ltn12.source.chain(source, filter)',
  340
+      \ 'ltn12.source.empty': 'ltn12.source.empty()',
  341
+      \ 'ltn12.source.error': 'ltn12.source.error(message)',
  342
+      \ 'ltn12.source.file': 'ltn12.source.file(handle, message)',
  343
+      \ 'ltn12.source.simplify': 'ltn12.source.simplify(source)',
  344
+      \ 'ltn12.source.string': 'ltn12.source.string(string)',
  345
+      \ 'mime.decode': "mime.decode('base64' or 'quoted-printable')",
  346
+      \ 'mime.encode': "mime.encode('base64' or 'quoted-printable' [, mode])",
  347
+      \ 'mime.normalize': 'mime.normalize([marker])',
  348
+      \ 'mime.wrap': "mime.wrap('base64' or 'quoted-printable' or 'text' [, length])",
  349
+      \ 'smtp.message': 'smtp.message(mesgt)',
  350
+      \ 'socket.bind': 'socket.bind(address, port [, backlog])',
  351
+      \ 'socket.connect': 'socket.connect(address, port [, locaddr, locport])',
  352
+      \ 'socket.dns.tohostname': 'socket.dns.tohostname(address)',
  353
+      \ 'socket.dns.toip': 'socket.dns.toip(address)',
  354
+      \ 'socket.newtry': 'socket.newtry(finalizer)',
  355
+      \ 'socket.protect': 'socket.protect(func)',
  356
+      \ 'socket.select': 'socket.select(recvt, sendt [, timeout])',
  357
+      \ 'socket.sink': 'socket.sink(mode, socket)',
  358
+      \ 'socket.skip': 'socket.skip(d [, ret1, ret2 ... retN])',
  359
+      \ 'socket.sleep': 'socket.sleep(time)',
  360
+      \ 'socket.source': 'socket.source(mode, socket [, length])',
  361
+      \ 'socket.try': 'socket.try(ret1 [, ret2 ... retN])',
  362
+      \ 'url.absolute': 'url.absolute(base, relative)',
  363
+      \ 'url.build': 'url.build(parsed_url)',
  364
+      \ 'url.build_path': 'url.build_path(segments, unsafe)',
  365
+      \ 'url.escape': 'url.escape(content)',
  366
+      \ 'url.parse': 'url.parse(url, default)',
  367
+      \ 'url.parse_path': 'url.parse_path(path)',
  368
+      \ 'url.unescape': 'url.unescape(content)' }
322 369
 
323 370
 " }}}
324 371
 
2  ftplugin/lua.vim
@@ -3,7 +3,7 @@
3 3
 " Author: Peter Odding <peter@peterodding.com>
4 4
 " Last Change: June 15, 2011
5 5
 " URL: http://peterodding.com/code/vim/lua-ftplugin
6  
-" Version: 0.6.7
  6
+" Version: 0.6.8
7 7
 
8 8
 " Support for automatic update using the GLVS plug-in.
9 9
 " GetLatestVimScripts: 3625 1 :AutoInstall: lua.zip

0 notes on commit 972cac7

Please sign in to comment.
Something went wrong with that request. Please try again.