This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added inline annotation support for language extensions, used by the
zed-javascript-ext (https://github.com/zedapp/zed-javascript-ext).
- Loading branch information
Showing
9 changed files
with
87 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -905,5 +905,4 @@ define(function(require, exports, module) { | |
}); | ||
}); | ||
|
||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* global ace, define*/ | ||
define(function(require, exports, module) { | ||
var Anchor = ace.require("ace/anchor").Anchor; | ||
var Range = ace.require("ace/range").Range; | ||
|
||
function InlineAnnotation(session, info) { | ||
this.session = session; | ||
this.info = info; | ||
this.startAnchor = new Anchor(session.getDocument(), info.row, info.column); | ||
this.endAnchor = new Anchor(session.getDocument(), info.row, info.endColumn); | ||
this.startAnchor.on("change", this.update.bind(this)); | ||
this.endAnchor.on("change", this.update.bind(this)); | ||
this.marker = null; | ||
this.update(); | ||
} | ||
|
||
InlineAnnotation.prototype = { | ||
update: function() { | ||
var range = Range.fromPoints(this.startAnchor.getPosition(), this.endAnchor.getPosition()); | ||
if (this.marker) { | ||
this.session.removeMarker(this.marker); | ||
} | ||
this.marker = this.session.addMarker(range, "marker-highlight-" + this.info.type); | ||
}, | ||
remove: function() { | ||
this.startAnchor.detach(); | ||
this.endAnchor.detach(); | ||
if (this.marker) { | ||
this.session.removeMarker(this.marker); | ||
} | ||
} | ||
}; | ||
|
||
return InlineAnnotation; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Zed Projects | ||
============ | ||
|
||
Zed is an editor based on projects. When you do a fresh Zed install, a few project-like options will be available, including "Open Local Folder", "Open Dropbox Folder", "Notes", "Configuration", and "Manual". | ||
|
||
Editing Local Files | ||
------------------- | ||
To edit the files in a folder on your local hard drive pick "Open Local Folder". A new Zed window will open allowing you to select the folder to edit. After you switch back to the Zed Project Picker window, you will see that the folder you just opened has been added to your project list. | ||
|
||
Editing Files on Dropbox | ||
------------------------ | ||
To edit files on Dropbox, select "Open Dropbox Folder", login with Dropbox and select the folder to edit. After you opened the folder and switching back to the Project Picker, you'll notice that the folder you just openened has been added to your project list. | ||
|
||
Notes | ||
----- | ||
Notes is a special built-in project that stores its files on Google Drive |