Skip to content

Commit

Permalink
Updated config sample to remove no longer needed G references.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Nov 23, 2015
1 parent 069e78c commit 0d6d6ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions cfg/scheme-picker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
2. Add the following code with the scheme you selected to `cfg/user.lua`.
--]]

local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('TomorrowNightBlue')
styles = loadfile('cfg/tomorrow.lua')('TomorrowNightBlue')
stylesoutshell = styles -- apply the same scheme to Output/Console windows
styles.auxwindow = styles.text -- apply text colors to auxiliary windows
styles.calltip = styles.text -- apply text colors to tooltips
Expand Down
14 changes: 7 additions & 7 deletions cfg/user-sample.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ See [configuration](http://studio.zerobrane.com/doc-configuration.html) page for
--]]--

-- to modify loaded configuration for recognized extensions for lua files
local G = ... -- this now points to the global environment in the script
local luaspec = G.ide.specs['lua']
-- (no longer needed in v1.21+) local G = ... -- this now points to the global environment
local luaspec = ide.specs['lua']
luaspec.exts[#luaspec.exts+1] = "luaz"
luaspec.keywords[1] = luaspec.keywords[1] .. ' foo'

Expand Down Expand Up @@ -82,8 +82,8 @@ styles.text = {bg = {240,240,220}}

-- to change the default color scheme; check tomorrow.lua for the list
-- of supported schemes or use cfg/scheme-picker.lua to pick a scheme.
local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('Tomorrow')
-- (no longer needed in v1.21+) local G = ... -- this now points to the global environment
styles = loadfile('cfg/tomorrow.lua')('Tomorrow')
-- also apply the same scheme to Output and Console windows
stylesoutshell = styles

Expand All @@ -95,7 +95,7 @@ styles.marker.prompt = {ch = wxstc.wxSTC_MARK_CHARACTER+('>'):byte(), fg = {0, 0
stylesoutshell = styles

-- to disable indicators (underlining) on function calls
styles.indicator.fncall = nil
-- styles.indicator.fncall = nil

-- to change the color of the indicator used for function calls
styles.indicator.fncall.fg = {240,0,0}
Expand Down Expand Up @@ -142,8 +142,8 @@ editor.nomousezoom = true
corona = { skin = "iPad" }

-- to style individual keywords; `return` and `break` are shown in red
local G = ... -- this now points to the global environment in the script
local luaspec = G.ide.specs.lua
-- (no longer needed in v1.21+) local G = ... -- this now points to the global environment
local luaspec = ide.specs.lua

local num = #luaspec.keywords
-- take a new slot in the list of keywords (starting from 1)
Expand Down

0 comments on commit 0d6d6ae

Please sign in to comment.