Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support dark colorschemes following scite.lua
  • Loading branch information
xolox committed Aug 12, 2010
1 parent 72a058e commit c6a8ecf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions TODO.md
@@ -1,7 +1,7 @@
# The to-do list

* Copy highlighting colors for dark backgrounds from luainspect/scite.lua.
* OMNI completion for in scope variables (including display of library function signatures).
* Fix improvised hack by using new `luainspect.signatures.value_signatures` table.
* Document g:lua_inspect_path option.
* Check whether "core/SciTE: jump to definition now supports functions in different files." is interesting.
* Use the new 'init.get_variable_details' function to replace most of actions.tooltip()?
* BUG: With a Lua script in one split window and a different file type in another split window, where the active window contains the non-Lua file, if you hover over the Lua window syntax error highlighting is applied to the non-Lua buffer! Hint: getbufline() / assert(v:beval_bufnr==bufnr('%'))
28 changes: 15 additions & 13 deletions luainspect.vim
Expand Up @@ -2,7 +2,7 @@
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 12, 2010
" URL: http://peterodding.com/code/vim/lua-inspect/
" Version: 0.3.6
" Version: 0.3.7
" License: MIT

" Support for automatic update using the GLVS plug-in.
Expand Down Expand Up @@ -41,15 +41,15 @@ endif

" The highlight groups and default styles/links defined by this plug-in.
let s:groups = {}
let s:groups['GlobalDefined'] = 'guifg=#600000'
let s:groups['GlobalDefined'] = ['guifg=#600000', 'guifg=#ffc080']
let s:groups['GlobalUndefined'] = 'ErrorMsg'
let s:groups['LocalUnused'] = 'guifg=#ffffff guibg=#0000ff'
let s:groups['LocalMutated'] = 'gui=italic guifg=#000080'
let s:groups['UpValue'] = 'guifg=#0000ff'
let s:groups['Param'] = 'guifg=#000040'
let s:groups['Local'] = 'guifg=#000080'
let s:groups['FieldDefined'] = 'guifg=#600000'
let s:groups['FieldUndefined'] = 'guifg=#c00000'
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'
Expand Down Expand Up @@ -207,18 +207,20 @@ endfunction
function! s:define_default_styles() " {{{2
" Always define the default highlighting styles
" (copied from /luainspect/scite.lua for consistency).
" TODO Consider the &background?
for [group, style] in items(s:groups)
let defgroup = style
for [group, styles] in items(s:groups)
let group = 'luaInspect' . group
if match(style, '=') >= 0
if type(styles) == type('')
let defgroup = styles
else
let defgroup = 'luaInspectDefault' . group
let style = &bg == 'light' ? styles[0] : styles[1]
execute 'highlight' defgroup style
endif
" Don't link the actual highlighting styles to the defaults if the user
" has already defined or linked the highlighting group. This enables color
" schemes and vimrc scripts to override the styles (see :help :hi-default).
execute 'highlight def link' group defgroup
unlet styles " to avoid E706.
endfor
endfunction

Expand Down

0 comments on commit c6a8ecf

Please sign in to comment.