livecode / atom-language-livecode Goto Github PK
View Code? Open in Web Editor NEWLiveCode Language package for Atom
License: GNU General Public License v3.0
LiveCode Language package for Atom
License: GNU General Public License v3.0
LCB doc comment blocks are distinguished from normal comment blocks by an extra initial star, i.e. /** ... */
.
It would be good to highlight doc comment blocks in a distinctive way to show that they're not just normal comments.
Suggested by @macMikey.
• both "List" and "list" render as variable types
• As an aside, "Number" and "Numbert" both render as variable types
Hi,
I can not get the linter to work with Livecode (.lc file). I have installed the LiveCode server 8.02 on MAC OSX 10.11.6 (15G31).
If I type any errors it always displays no issues in the status bar.
Can anyone confirm which version do work?
Regards
Andy
Trevor has a clever little hack for Sublime Text that pings LC every time a file in a project is modified. In the Levure framework he then has a listener that handles the ping to unload and reload the .livecodescript file, giving us live editing from the external editor.
Although there's no common extension, the scripts of LiveCode objects have similar but distinct grammars from the two you provide. Could you add their grammar as well? For now, it would probably be the job of the user to specify a custom file extension for this grammar, or else to manually select it, but it would be a huge improvement over just using the "AppleScript" grammar for editing LiveCode scripts that have been saved outside of stacks.
Currently, if there's no livecode-server
in the $PATH
and the user hasn't configured package, opening a .livecodescript
file triggers a scary uncaught exception error.
The exception should be caught and an informational warning should be shown, directing users to the settings.
Probably another one for @montegoulding?
When opening an LCB file without setting a valid path to lc-compile, an error pop-up appears recommending to install and set up LiveCode Server (which won't actually solve the problem!)
The top-level README file (which is also shown on the package page) needs to be more helpful. Specifically:
I'm having a autocomplete error after typing 3 letters while using .livecode files. Everything seems to work. I just get a wall of error messages every time I type anything. Other then that, it's pretty great. Is there anything I can do to stop these messages?
/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/symbol-store.js:228
Hide Stack Trace
TypeError: Cannot read property 'toLowerCase' of undefined
at SymbolStore.fuzzyMatchScore (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/symbol-store.js:228:68)
at SymbolStore.scoreSymbol (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/symbol-store.js:214:27)
at SymbolStore.symbolsForConfig (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/symbol-store.js:91:41)
at SymbolProvider.getSuggestions (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/symbol-provider.js:364:47)
at providers.forEach.provider (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:286:58)
at Array.forEach (native)
at AutocompleteManager.getSuggestionsFromProviders (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:262:21)
at AutocompleteManager.findSuggestions (/Users/myName/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/autocomplete-manager.js:254:23)
In LiveCode Script mode, the autocomplete settings don't result in useful suggestions.
In LiveCode Builder mode:
handler TestHandler()
variable tTempVar
end handler
Put the cursor on the blank line and type tte
. The first suggestion is tTempVar
.
In LiveCode Script mode:
on mouseUp
local tTempVar
end mouseUp
Put the cursor on the blank line and type tte
. The first suggestion is templateEPS
and tTempVar
doesn't appear anywhere in the suggested completions.
In a file opened with Emacs, having -*-Makefile-*-
in the first line of the file will select Makefile editing mode. There's no need to have a mode:
specifier, so it would be nice not to have to include mode:
in language-livecode's detection regexp.
Also, we don't currently have any options for how to specify LiveCode Builder vs LiveCode Script mode.
What about case-insensitively using -*-livecode-*-
or -*-livecode[script]-*-
for LCS mode, -*-livecode[server]-*-
for LiveCode Server / revIgniter mode, and -*-livecode[builder]-*-
for LCB mode?
The BBEdit language files recognize // as an LCB comment, but the Atom lcb.cson file does not.
I tried to modify the lcb.cson file to add this feature - hoping to make a useful contribution. But I haven't been successful - maybe I need to add some escaping?
Here is the code I tried:
Lines 13-15
{
'include': '#comment.double-slash'
}
Lines 101-107:
'comment-double-slash':
'begin': '//'
'beginCaptures':
'0':
'name': 'punctuation.definition.comment.double-slash.lcb'
'end': '\n'
'name': 'comment.line.lcb'
Since we don't have named blocks in LCS, it would be nice to be able to perhaps use comments to mark a block, and then be able to fold that block.
For example, I've taken to marking blocks with a commented hashtag
#<parse the list>
...
#</parse the list>
LCB linting reporting wrong errors line numbers on windows
The standalone engine can be run with a script-only stack as its argument. If we could use the standalone engine for linting instead of the server engine, it would make it easier to set up linting without having to download and install the LiveCode server (which most users probably won't be familiar with).
With #7 merged in, opening atom causes an error message:
Failed to activate the language-livecode package
Cannot find module 'atom-linter'
This is despite installing the linter package. So, either our README is wrong (and I need to install something else) or there's some other problem...
@montegoulding: any ideas?
For LiveCode Builder source code, the "Edit->Auto Indent" command ("Editor: Auto Indent" via the command palette) properly re-indents source code, including if
/repeat
/handler
etc.
This doesn't seem to work properly for LiveCode Script source code (.livecodescript
files).
For example, when defining a handler, it can be "public" or "private". Perhaps the private keyword could have a hilite color, or be a different shade so it stands out when I'm staring at code.
If you type "end handler", you will get the Handler macro.
Create a new file and put it in LiveCode Script mode
Type local tVar
Atom fills in some rubbish relating to traversalOn
This makes the Atom mode pretty unusable without perpetual -mashing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.