xolox / vim-lua-inspect Goto Github PK
View Code? Open in Web Editor NEWSemantic highlighting for Lua in Vim
Home Page: http://peterodding.com/code/vim/lua-inspect/
Semantic highlighting for Lua in Vim
Home Page: http://peterodding.com/code/vim/lua-inspect/
I've got vim-misc and vim-lua-inspect installed via NeoBundle, but I'm getting an error;
Error detected while processing function xolox#luainspect#highlight_cmd..xolox#luainspect#make_request..<SNR>74_parse_text:
line 16:
error loading module 'luainspect4vim' from file '/home/milk/.vim/bundle/vim-lua-inspect/plugin/../misc/luainspect/luainspect4vim.lua':
Press ENTER or type command to continue
Error detected while processing function xolox#luainspect#highlight_cmd..xolox#luainspect#make_request..<SNR>74_parse_text:
line 16:
^I...lua-inspect/plugin/../misc/luainspect/luainspect4vim.lua:155: <name> expected near 'goto'
Here's a screenshot with the error whilst on luainspect4vim.lua:155;
http://i.imgur.com/9uw6QD2.png
Any thoughts would be appreciated, thanks!
I have some Lua scripts with relative paths in it:
require "Scripts/Foo/Bar"
class 'BarClass' (FooClass)
...
Usually I cd
into the top most directory, e.g. ~/Developer/Foo
which contains Scripts
as subdirectory, where also Foo/Bar
is located. However, when luainspect parses my file, it states, that FooClass
is unknown. When I use luainspect from the command line directly it works.
let s:groups = {}
let s:groups['GlobalDefined'] = ['guifg=#600000', 'guifg=#ffc080']
let s:groups['GlobalUndefined'] = 'ErrorMsg'
let s:groups['LocalUnused'] = ['guifg=#ffffff guibg=#000080', 'guifg=#ffffff guibg=#000080']
let s:groups['LocalMutated'] = ['gui=italic guifg=#000080', 'gui=italic guifg=#c0c0ff']
let s:groups['UpValue'] = ['guifg=#0000ff', 'guifg=#e8e8ff']
let s:groups['Param'] = ['guifg=#000040', 'guifg=#8080ff']
let s:groups['Local'] = ['guifg=#000040', 'guifg=#c0c0ff']
let s:groups['FieldDefined'] = ['guifg=#600000', 'guifg=#ffc080']
let s:groups['FieldUndefined'] = ['guifg=#c00000', 'guifg=#ff0000']
let s:groups['SelectedVariable'] = 'CursorLine'
let s:groups['SyntaxError'] = 'SpellBad'
let s:groups['WrongArgCount'] = 'SpellLocal'
We should add some global var(?) to let me customize the color without modifying the source code
By default, It runs luainspect after :w
Add a configure, add runs luainspect! after :w
Hi,
I am new with lua and wanted some highlighting in vim. So I got the luainspect and the misc packege and installed them like the Infofiles told me. When I open any .lua file, I get this on a regular basis:
Error detected while processing function
xolox#luainspect#highlight_cmd..xolox#luainspect#make_request..22_parse_text:`
line 12:
E605: Exception not caught: luainspect.vim 0.5.2: Failed to execute LuaInspect as external process! Use ':verbose LuaInspect' to see the command line of the external process.
Press ENTER or type command to continue
Error detected while processing function xolox#luainspect#highlight_cmd:
line 9:
E171: Missing :endif
The highlighting works as it highlights Strings/Digits, Keywords and known commands. As I know nothing about vim plugins I am lost in how to solve this.
I get this output upon attempting to write a lua file:
Error detected while processing function xolox#luainspect#highlight_cmd..xolox#luai
nspect#make_request..<SNR>55_parse_text:
line 11:
E121: Undefined variable: b:luainspect_output
E116: Invalid arguments for function join(b:luainspect_output, "\n")))
E116: Invalid arguments for function strtrans(join(b:luainspect_output, "\n")))
E116: Invalid arguments for function printf(msg, g:xolox#luainspect#version, strtra
ns(join(b:luainspect_output, "\n")))
E15: Invalid expression: printf(msg, g:xolox#luainspect#version, strtrans(join(b:lu
ainspect_output, "\n")))
Error detected while processing function xolox#luainspect#highlight_cmd:
line 9:
E171: Missing :endif
This is after purging my .vim and switching to the default Vundle .vimrc (+ lua-inspect line):
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
Bundle 'xolox/vim-lua-inspect'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
" ...
filetype plugin indent on " required!
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
INSTALL.md seems to suggest this should work. I can only assume I'm doing something horribly wrong but am insufficiently familiar with vim internals to determine what?
I installed using Vundle. Full list of installed plugins (though I don't see any reason for them to be interfering, but just in case):
tmhedberg/SimpylFold, vim-scripts/indentpython.vim, Valloric/YouCompleteMe, scrooloose/syntastic, xolox/vim-misc, xolox/vim-lua-ftplugin, xolox/vim-lua-inspect.
Switching the last two to their vim-scripts equivalent did not help.
Full error dump (after requesting verbose) is:
vim-misc 1.17.6: Executing external command using system() function: sh -c '(lua -e "package.p
ath = package.path .. '\'';/media/data/home/qwertystop/.vim/bundle/vim-lua-inspect/misc/luains
pect/?.lua'\''; package.path = package.path .. '\'';/media/data/home/qwertystop/.vim/bundle/vi
m-lua-inspect/misc/luainspect/metalualib/?.lua'\''; package.path = package.path .. '\'';/media
/data/home/qwertystop/.vim/bundle/vim-lua-inspect/misc/luainspect/luainspect/?.lua'\''; requir
e '\''luainspect4vim'\'' (io.read '\''*a'\'')" 2>&1) 1>'\''/tmp/vAzTxM2/5'\'' 2>'\''/tmp/vAzTx
M2/6'\'''
Error detected while processing function xolox#luainspect#highlight_cmd[9]..xolox#luainspect#m
ake_request[18]..<SNR>42_parse_text:
line 12:
E605: Exception not caught: luainspect.vim 0.5.2: Failed to execute LuaInspect as external pro
cess! Use ':verbose LuaInspect' to see the command line of the external process.
Error detected while processing function xolox#luainspect#highlight_cmd:
line 9:
E171: Missing :endif
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.