Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support dark colorschemes following scite.lua

  • Loading branch information...
commit c6a8ecf5067329540d70a313336d28cd33dbf4f9 1 parent 72a058e
@xolox authored
Showing with 17 additions and 15 deletions.
  1. +2 −2 TODO.md
  2. +15 −13 luainspect.vim
View
4 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('%'))
View
28 luainspect.vim
@@ -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.
@@ -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'
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.