1
- # LiveCode Language package for Atom
1
+ # LiveCode language package for Atom
2
2
3
3
![ LiveCode Community Logo] ( http://livecode.com/wp-content/uploads/2015/02/livecode-logo.png )
4
4
5
- This is a language package for Atom that provides support for editing
6
- [ LiveCode ] ( http://livecode.com/ ) source code.
5
+ This is a language package that lets you edit [ LiveCode ] ( http://livecode.com/ )
6
+ source code in the Atom editor. It adds support for:
7
7
8
- LiveCode is an open source platform provides a way to build applications for
9
- mobile, desktop and server platforms. The visual workflow allows the user to
10
- develop apps "live", using a powerful and uniquely-accessible language syntax.
8
+ * LiveCode Builder source code ( ` .lcb ` )
9
+ * LiveCode server source code ( ` .lc ` and ` .irev ` )
10
+ * LiveCode script-only stacks ( ` .livecodescript ` )
11
11
12
- The LiveCode server syntax and revIgniter snippets were converted from the
13
- TextMate bundles available from the [ revIgniter] ( http://revigniter.com/ )
14
- website.
12
+ ## Installing
13
+
14
+ Using the Atom package manager:
15
+
16
+ * Visit Atom's "Settings" view, and go to the "Install" tab
17
+ * Use the search field to search for the ** language-livecode** package
18
+ * Click "Install"
19
+
20
+ Using the command line: ` apm install language-livecode `
15
21
16
- ## Supported languages
22
+ See also the [ Atom Packages] ( https://atom.io/docs/v1.0.19/using-atom-atom-packages )
23
+ section in the Atom Flight Manual.
17
24
18
- Currently, this package supports editing:
25
+ ## Configuration
19
26
20
- * LiveCode Builder source code in ` .lcb ` files
21
- * LiveCode server source code in ` .lc ` and ` .irev ` files
22
- * LiveCode Script source code in ` .livecodescript ` files, where the shebang line
23
- contains ` livecode ` or the first line contains an Emacs mode comment
24
- ` # -*- mode:livecodescript -*- `
27
+ The settings for LiveCode integration can also be modified using Atom's
28
+ "Settings" view. Go to the "Packages" tab, find the ** language-livecode**
29
+ package, and click its "Settings" button.
25
30
26
- The package provides syntax highlighting, highlighting and indentation support
27
- for all the supported languages.
31
+ See also the
32
+ [ Package Settings] ( https://atom.io/docs/v1.0.19/using-atom-atom-packages#package-settings )
33
+ section in the Atom Flight Manual.
28
34
29
- It also provides snippets to enhance LiveCode server script and revIgniter
30
- script development.
35
+ ## Usage
31
36
32
- For LiveCode Script there are quite a number of autocomplete snippets generated
33
- from the LiveCode documentation.
37
+ ** language-livecode** integrates LiveCode editing into the Atom editor. Note
38
+ that it doesn't make Atom behave like the LiveCode IDE, and it doesn't
39
+ integrate with or replace the LiveCode IDE's script editor.
34
40
35
- ## Installation
41
+ ### Syntax highlighting and indentation
36
42
37
- Install the ` language-livecode ` package from the "Install Packages and Themes"
38
- view in Atom's "Settings" window .
43
+ The package adds automatic syntax highlighting and indentation for all of the
44
+ supported LiveCode language types .
39
45
40
- You may also wish to install the [ revIgniter theme] ( https://atom.io/themes/revigniter-syntax )
41
- for Atom.
46
+ The optional [ revigniter-syntax] ( https://atom.io/themes/revigniter-syntax )
47
+ can be installed to provide a colour theme that's tailored for LiveCode source
48
+ code.
42
49
43
- ## Script Error Checking
50
+ ### Autocompletion
44
51
45
- This package provides a linter for LiveCode Script, LiveCode Server and LiveCode
46
- Builder to highlight and describe script compilation errors on the fly.
52
+ The package also includes autocompletion support for symbols in the current
53
+ file, along with snippets for many common LiveCode Builder and LiveCode Script
54
+ syntax elements.
47
55
48
- ![ Linter In Action ] ( http://ecove.on-rev.com/linter.gif )
56
+ ### Script error checking ("linting" )
49
57
50
- Dependencies:
58
+ If you have the [ linter] ( https://atom.io/packages/linter ) package installed,
59
+ you can enable script error checking support. This highlights and describes
60
+ script compilation errors as you work.
51
61
52
- * The [ linter package] ( https://atom.io/packages/linter ) needs to be installed
53
- * LiveCode 7.1+ Server engine for the platform it is being run on must be
54
- accessible
62
+ ![ Linter in action] ( http://ecove.on-rev.com/linter.gif )
55
63
56
- The default setting assumes you have installed the LiveCode Server engine somewhere
57
- on the current ` $PATH ` with the name ` livecode-server ` . However, you can enter any
58
- path or name you choose via the package settings.
64
+ #### LiveCode Script linting
59
65
60
- For LiveCode Server the linter will only check for errors within the scope of
61
- the file being edited. If for example a variable re-declarition error is caused
62
- by the inclusion of another file that error won't be detected.
66
+ You will need to
67
+ [ download LiveCode server] ( https://downloads.livecode.com/livecode ) and install
68
+ (by unzipping it somewhere appropriate). LiveCode Server 7.1.0 or later is
69
+ required.
63
70
64
- The linter supports an optional explicit variables mode which can be turned on
65
- via the package settings.
71
+ Next, go to the package settings and put the full path to the LiveCode server
72
+ program that you just extracted (e.g. ` /path/to/livecode-community-server ` )
73
+ into the "LiveCode Server Engine Path" setting.
66
74
67
- ### LiveCode Builder Linting
75
+ It's often useful to enable the "Explicit Variables" setting to get an error
76
+ when you use a variable name that you haven't declared with ` local ` or
77
+ ` global ` .
68
78
69
- Linting of LiveCode Builder files should be considered experimental. This is
70
- particularly the case for projects that have complex interdependencies between
71
- files.
79
+ ** Note:** When checking LiveCode Server source files, the linter will only
80
+ check for errors in the file currently being edited. If, for example, the file
81
+ you're editing includes another file and that inclusion causes a variable
82
+ re-declaration error, the linter will not detect it.
72
83
73
- In order to lint LiveCode Builder files ensure the following:
84
+ #### LiveCode Builder linting
74
85
75
- * lc-compile can be found at the location specified in settings
76
- * You have appropriately set the module paths to a directory with the standard
77
- ` *.lci ` files provided by LiveCode. You may add further paths delimited by ` ; `
86
+ ** Warning:** Linting for LiveCode Builder source code is ** experimental** .
78
87
79
- The default settings assume you have a clone of the LiveCode repo in
80
- your home directory named livecode and you have built a debug build.
88
+ You need LiveCode 8 installed to use LiveCode Builder linting. The LiveCode
89
+ IDE's installation location contains the LiveCode Builder compiler, called
90
+ ** lc-compile** . In the package settings, set the "Compiler Path for LiveCode
91
+ Builder" to the full path to the compiler (e.g. ` /path/to/lc-compile ` ).
81
92
82
- In the process of linting the LiveCode Builder file a ` *.lci ` file is created in
83
- a directory named ` .lci ` next to the file being edited. In the case of files
84
- that have dependencies you may receive a dependency error if you edit a
85
- file with the dependency before those it depends on because it won't be able to
86
- fine the appropriate ` *.lci ` file in the ` .lci ` directory.
93
+ The LiveCode Builder compiler also needs to know where to find the ` .lci `
94
+ interface files which provide the built-in modules' interface information.
95
+ These are usually located in a ` modules ` directory near the ** lc-compile**
96
+ program in the LiveCode IDE's installation location. You should put this
97
+ path in the "Module Paths For LiveCode Builder" setting.
98
+
99
+ If you are working on a complex project and you need ** lc-compile** to look for
100
+ ` .lci ` files in multiple places, you can put multiple paths in the "Module
101
+ Paths for LiveCode Builder" setting, separated by ` ; ` characters.
102
+
103
+ ** Notes:** The linting step will automatically create a ` .lci ` working
104
+ directory in the directory where the LCB file is located. The linter puts the
105
+ interface files for the files that are being linted in that directory. You may
106
+ get dependency errors if you edit an LCB module which has dependencies before
107
+ editing the module that it depends on, because the ` .lci ` working directory
108
+ will have missing interface files.
87
109
88
110
## Authors
89
111
@@ -92,6 +114,10 @@ fine the appropriate `*.lci` file in the `.lci` directory.
92
114
* Monte Goulding
93
115
* Adam Robertson
94
116
117
+ The LiveCode server syntax and revIgniter snippets were converted from the
118
+ TextMate bundles available from the [ revIgniter] ( http://revigniter.com/ )
119
+ website.
120
+
95
121
## Reporting bugs and contributing
96
122
97
123
Please report any problems to the [ GitHub issues tracker] ( https://github.com/peter-b/atom-language-livecode/issues ) .
0 commit comments