Commit Graph

17088 Commits

Author SHA1 Message Date
Max Brunsfeld
e16e68094f Update highlighting when an injectable tree-sitter grammar is loaded 2018-06-29 14:47:38 -07:00
Max Brunsfeld
623af0ca90 Fix possible mismatch between .findMarkers and .descendantsOfType 2018-06-29 12:55:43 -07:00
Max Brunsfeld
60c59c795c Fix highlighting problem when seeking past the end of a syntax tree 2018-06-29 12:53:43 -07:00
Max Brunsfeld
41c124cc13 Define highlight iter's position in terms of tree cursor position
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-28 19:50:57 -07:00
David Wilson
cd83486c7d Fix isReleasedVersion check in AtomEnvironment 2018-06-28 14:29:09 -07:00
David Wilson
bd5d258d80 Detect any channel name in AtomEnvironment.getReleaseChannel 2018-06-28 12:53:14 -07:00
David Wilson
691d5da97c Command installer should use known channel names 2018-06-28 12:52:57 -07:00
Max Brunsfeld
cdb9529b68 Emit highlight change events when removing injections
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-27 15:40:06 -07:00
Max Brunsfeld
6c85ff84a5 Start parsing right away when constructing a TreeSitterLanguageMode
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-27 14:31:48 -07:00
Max Brunsfeld
613d4d65e9 Add text getter to SyntaxNode
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-27 13:13:08 -07:00
Max Brunsfeld
4d3916f74e Add tests and docs for addInjectionPoint
Also, replace `addInjectionPattern` API with a single `injectionRegExp` 
field on the grammar.

Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-27 12:39:29 -07:00
Max Brunsfeld
890d955f70 Only update injections intersecting changed ranges 2018-06-26 20:54:18 -07:00
Max Brunsfeld
c05dcb0bb8 Fix syntax highlighting problems with injected languages
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-26 15:30:03 -07:00
Max Brunsfeld
e60f0f9b60 Get first test for grammar injections passing
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-26 13:46:33 -07:00
David Wilson
d82c3979ac Merge pull request #17521 from Aerijo/patch-1
Support activation hooks by grammar scope
2018-06-26 12:13:46 -07:00
Federico Bruni
6856c63421 Doc: explain how to open a file at a certain line and column 2018-06-23 18:01:20 +02:00
Max Brunsfeld
37a3ae1491 Start work on Tree-sitter grammar injections
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-22 16:21:32 -07:00
Max Brunsfeld
ed48feda82 Fix Tree-sitter folding bug affecting HTML 2018-06-18 14:41:34 -07:00
Benjamin Gray
ce7b8b2a7e 🔥 useless return in handleGrammarUsed 2018-06-16 22:00:46 +10:00
Benjamin Gray
e84662743a Support activation hooks by grammar scope 2018-06-16 21:40:31 +10:00
Max Brunsfeld
0422e0d61f 🚱 Fix leak when switching between tree-sitter languages 2018-06-07 17:03:45 -07:00
Max Brunsfeld
6346f5ec9e Grammar scoring, weigh grammar type higher than content regex match
This fixes another regression introduces in #17468
2018-06-07 16:17:23 -07:00
Max Brunsfeld
0148ee7d9b Always leave room for scrollbars 2018-06-07 14:42:06 -07:00
Max Brunsfeld
31f511aae7 Don't boost tree-sitter grammars' score unless they match in some way 2018-06-05 16:00:03 -07:00
Max Brunsfeld
ebf15ef050 Merge pull request #17468 from atom/mb-fix-content-regexes
Make Tree-sitter grammars' contentRegExp work as intended
2018-06-04 18:06:46 -07:00
Max Brunsfeld
4dbfadd0d5 Make Tree-sitter grammars' contentRegExp work as intended 2018-06-04 17:17:37 -07:00
David Wilson
ba9616506f Merge pull request #17464 from atom/extended-color-profile-bits
Extend the color profile PR (#17380)
2018-06-04 14:22:25 -07:00
David Wilson
fceb6b0063 Merge pull request #17380 from atom/fix-color-problems-using-electron-2.0
Restore color rendering following Electron 2.0 update
2018-06-04 12:40:50 -07:00
Jason Rudolph
c3d38ed360 Support configuring color profile via settings UI 2018-06-01 16:32:31 -04:00
Jason Rudolph
f9ba602c6c Gracefully handle missing config file
https://circleci.com/gh/atom/atom/7630
2018-06-01 16:21:04 -04:00
Jason Rudolph
266e0111b8 Decaffienate ScopeDescriptor
Oddly, I expect this to resolve the CI failure seen in 
https://travis-ci.org/atom/atom/builds/386819124#L1200.
2018-06-01 15:33:28 -04:00
Jason Rudolph
b67f8ac2ce 👕 2018-06-01 15:04:46 -04:00
Jason Rudolph
6985fb0ff3 Use Atom's standard config file to set custom color profile 2018-06-01 14:26:33 -04:00
Jason Rudolph
c71de84962 Look for .electron-switches in ATOM_HOME 2018-06-01 11:02:00 -04:00
Jason Rudolph
82ba358aa9 Read user's custom Electron switches from config file 2018-06-01 09:50:16 -04:00
Max Brunsfeld
d7e7c772c3 Merge pull request #17424 from atom/mb-workspace-open-exception-handling
Avoid masking exceptions as cancellations in Workspace.open
2018-05-29 14:30:12 -07:00
Lee Dohm
57572d5221 Merge pull request #17008 from saadq/flow-double-slash
allow the use of double slash flow comments
2018-05-29 14:24:59 -07:00
Max Brunsfeld
d4e132067b Avoid masking exceptions as cancellations in Workspace.open 2018-05-29 13:26:15 -07:00
npezza93
0938ea1a3d Fix deprecated hidden-inset title bar style
As of https://github.com/electron/electron/pull/11975 the hidden-inset
titleBarStyle has been removed so the custom-inset title bar option
renders a normal title bar which is not desired.
2018-05-24 10:40:01 -04:00
Max Brunsfeld
53dfa83ae9 Allow some synchronous parsing to avoid unnecessary re-renders 2018-05-23 15:58:33 -07:00
Max Brunsfeld
7a2667406b Rename out-of-date property: layer -> languageMode 2018-05-23 09:42:36 -07:00
Max Brunsfeld
d4d57c2c8e 🐎 Parse asynchronously when opening buffers 2018-05-23 09:42:36 -07:00
Max Brunsfeld
3548abe541 Fix bug w/ empty node handling, comment TreeSitterHighlightIterator 2018-05-23 08:11:54 -07:00
Max Brunsfeld
f6d2d57299 Reparse again if there were changes since the last parse started 2018-05-23 08:11:54 -07:00
Max Brunsfeld
aced30da1f Start work on async parsing 2018-05-23 08:11:54 -07:00
Jason Rudolph
d65a0971f9 Fix #17356
Refs:
https://github.com/electron/electron/issues/10732#issuecomment-390321086
2018-05-18 17:29:49 -04:00
hansonw
d646f70f12 Handle cases where the item may be destroyed 2018-05-15 11:32:31 -07:00
hansonw
1f685768d5 Ensure grammar activation hooks are called after emitting new editors 2018-05-15 11:32:31 -07:00
Jason Rudolph
db88a07e8c Fix test failure re: "Module._cache.hasOwnProperty is not a function"
Example build failure:
https://ci.appveyor.com/project/Atom/atom/build/job/fvtxos5ys6a5lek1#L634

As of Node 8.0.0, Module._cache.hasOwnProperty is no longer a function:
403b89e72b
2018-05-04 14:24:57 -04:00
Jordan Eldredge
c65c76cee9 Fix out of date doc block method name
Looks like this method name changed in https://github.com/atom/atom/pull/3456/files#diff-88c69a7ba7e0c0d0090f4501ca44472c but the comment did not get updated.
2018-05-02 10:09:55 -07:00