aboutsummaryrefslogtreecommitdiff
path: root/core/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-07-07 20:49:45 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2009-07-07 20:49:45 -0400
commitae87d21236bb01b9680e8241956b9239133b0c1c (patch)
treedbc03f0a5492c9cb7d21b37fb28544c5d1435f6c /core/init.lua
parent7d8b623ea9c0391657a332f7270737f779187797 (diff)
downloadtextadept-ae87d21236bb01b9680e8241956b9239133b0c1c.tar.gz
textadept-ae87d21236bb01b9680e8241956b9239133b0c1c.zip
Use ~/.textadept/ for user settings, sessions, themes, lexers, etc.
Diffstat (limited to 'core/init.lua')
-rw-r--r--core/init.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/init.lua b/core/init.lua
index 5039fe56..52e5ebae 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -9,15 +9,16 @@ else
package.cpath = _HOME..'/core/?.dll;'..package.cpath
end
+_USERHOME = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')..'/.textadept/'
+
+_LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers/'
+
_THEME = 'light'
-local user_dir = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')
-if user_dir then
- local f = io.open(user_dir..'/.ta_theme', 'rb')
- if f then
- theme = f:read('*line'):match('[^\r\n]+')
- f:close()
- if theme and #theme > 0 then _THEME = theme end
- end
+local f = io.open(_USERHOME..'/theme', 'rb')
+if f then
+ theme = f:read('*line'):match('[^\r\n]+')
+ f:close()
+ if theme and #theme > 0 then _THEME = theme end
end
require 'iface'