Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (51 sloc) 2.158 kb
" Vim plug-in
" Author: Peter Odding <>
" Last Change: May 25, 2011
" URL:
" Version: 0.4.9
" License: MIT
" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3169 1 :AutoInstall:
" Don't source the plug-in when its already been loaded or &compatible is set.
if &cp || exists('g:loaded_luainspect')
if !exists('g:lua_inspect_warnings')
" Change this to disable automatic warning messages.
let g:lua_inspect_warnings = 1
if !exists('g:lua_inspect_events')
" Change this to enable semantic highlighting on your preferred events.
let g:lua_inspect_events = 'CursorHold,CursorHoldI,BufWritePost'
if !exists('g:lua_inspect_path')
" Change this if you want to move the Lua modules somewhere else.
let g:lua_inspect_path = expand('<sfile>:p:h') . '/../misc/luainspect'
if !exists('g:lua_inspect_internal')
" Set this to false (0) to run LuaInspect as an external process instead of
" using the Lua interface for Vim. This makes it slower but might make it
" more accurate because the Lua interface for Vim didn't include io.* and
" os.* before the patch posted on 2010-07-28 which means LuaInspect would
" mark them as undefined globals. The patch I'm referring to is:
let g:lua_inspect_internal = has('lua')
" This command updates highlighting when automatic highlighting is disabled.
command! -bar -bang LuaInspect call xolox#luainspect#highlight_cmd(<q-bang> == '!')
" Automatically enable the plug-in in Lua buffers.
augroup PluginLuaInspect
autocmd! FileType lua call xolox#luainspect#auto_enable()
augroup END
" The &balloonexpr option requires a global function.
function! LuaInspectToolTip()
let result = xolox#luainspect#make_request('tooltip')
if exists('b:luainspect_syntax_error')
return b:luainspect_syntax_error
return type(result) == type('') ? result : ''
" Make sure the plug-in is only loaded once.
let g:loaded_luainspect = 1
" vim: ts=2 sw=2 et
Jump to Line
Something went wrong with that request. Please try again.