Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Support dark colorschemes following scite.lua

  • Loading branch information...
commit c6a8ecf5067329540d70a313336d28cd33dbf4f9 1 parent 72a058e
Peter Odding authored August 12, 2010

Showing 2 changed files with 17 additions and 15 deletions. Show diff stats Hide diff stats

  1. 4  TODO.md
  2. 28  luainspect.vim
4  TODO.md
Source Rendered
... ...
@@ -1,7 +1,7 @@
1 1
 # The to-do list
2 2
 
3  
- * Copy highlighting colors for dark backgrounds from luainspect/scite.lua.
4 3
  * OMNI completion for in scope variables (including display of library function signatures).
5  
- * Fix improvised hack by using new `luainspect.signatures.value_signatures` table.
6 4
  * Document g:lua_inspect_path option.
7 5
  * Check whether "core/SciTE: jump to definition now supports functions in different files." is interesting.
  6
+ * Use the new 'init.get_variable_details' function to replace most of actions.tooltip()?
  7
+ * 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  luainspect.vim
@@ -2,7 +2,7 @@
2 2
 " Author: Peter Odding <peter@peterodding.com>
3 3
 " Last Change: August 12, 2010
4 4
 " URL: http://peterodding.com/code/vim/lua-inspect/
5  
-" Version: 0.3.6
  5
+" Version: 0.3.7
6 6
 " License: MIT
7 7
 
8 8
 " Support for automatic update using the GLVS plug-in.
@@ -41,15 +41,15 @@ endif
41 41
 
42 42
 " The highlight groups and default styles/links defined by this plug-in.
43 43
 let s:groups = {}
44  
-let s:groups['GlobalDefined'] = 'guifg=#600000'
  44
+let s:groups['GlobalDefined'] = ['guifg=#600000', 'guifg=#ffc080']
45 45
 let s:groups['GlobalUndefined'] = 'ErrorMsg'
46  
-let s:groups['LocalUnused'] = 'guifg=#ffffff guibg=#0000ff'
47  
-let s:groups['LocalMutated'] = 'gui=italic guifg=#000080'
48  
-let s:groups['UpValue'] = 'guifg=#0000ff'
49  
-let s:groups['Param'] = 'guifg=#000040'
50  
-let s:groups['Local'] = 'guifg=#000080'
51  
-let s:groups['FieldDefined'] = 'guifg=#600000'
52  
-let s:groups['FieldUndefined'] = 'guifg=#c00000'
  46
+let s:groups['LocalUnused'] = ['guifg=#ffffff guibg=#000080', 'guifg=#ffffff guibg=#000080']
  47
+let s:groups['LocalMutated'] = ['gui=italic guifg=#000080', 'gui=italic guifg=#c0c0ff']
  48
+let s:groups['UpValue'] = ['guifg=#0000ff', 'guifg=#e8e8ff']
  49
+let s:groups['Param'] = ['guifg=#000040', 'guifg=#8080ff']
  50
+let s:groups['Local'] = ['guifg=#000040', 'guifg=#c0c0ff']
  51
+let s:groups['FieldDefined'] = ['guifg=#600000', 'guifg=#ffc080']
  52
+let s:groups['FieldUndefined'] = ['guifg=#c00000', 'guifg=#ff0000']
53 53
 let s:groups['SelectedVariable'] = 'CursorLine'
54 54
 let s:groups['SyntaxError'] = 'SpellBad'
55 55
 let s:groups['WrongArgCount'] = 'SpellLocal'
@@ -207,18 +207,20 @@ endfunction
207 207
 function! s:define_default_styles() " {{{2
208 208
   " Always define the default highlighting styles
209 209
   " (copied from /luainspect/scite.lua for consistency).
210  
-  " TODO Consider the &background?
211  
-  for [group, style] in items(s:groups)
212  
-    let defgroup = style
  210
+  for [group, styles] in items(s:groups)
213 211
     let group = 'luaInspect' . group
214  
-    if match(style, '=') >= 0
  212
+    if type(styles) == type('')
  213
+      let defgroup = styles
  214
+    else
215 215
       let defgroup = 'luaInspectDefault' . group
  216
+      let style = &bg == 'light' ? styles[0] : styles[1]
216 217
       execute 'highlight' defgroup style
217 218
     endif
218 219
     " Don't link the actual highlighting styles to the defaults if the user
219 220
     " has already defined or linked the highlighting group. This enables color
220 221
     " schemes and vimrc scripts to override the styles (see :help :hi-default).
221 222
     execute 'highlight def link' group defgroup
  223
+    unlet styles " to avoid E706.
222 224
   endfor
223 225
 endfunction
224 226
 

0 notes on commit c6a8ecf

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