Max Brunsfeld
662d38135b
Use zero as the minimum value of getGrammarPathScore
...
This way, we can determine if the grammar matches a buffer in any way by
checking for a positive score.
2017-12-26 14:14:22 -08:00
Max Brunsfeld
c844a253e0
Implement TreeSitterLanguageMode.scopeDescriptorForPosition
2017-12-15 17:15:39 -08:00
Max Brunsfeld
4adfba47cc
Support legacyScopeName field on tree-sitter grammars
...
* Use the field for mapping scope names in GrammarRegistry.grammarForId
* Use the field for adapting legacy scoped settings to work with tree-sitter parsers
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-12-15 16:57:36 -08:00
Max Brunsfeld
f4fa7f910e
Merge branch 'master' into mb-tree-sitter-parsers
2017-12-15 09:45:21 -08:00
Max Brunsfeld
e09ee1c1fa
Fix error in TreeSitterHighlightIterator.seek
2017-12-15 09:44:45 -08:00
Katrina Uychaco
2d6750cae3
Remove input enabled check for 'is-focused' class
...
vim-mode-plus relies on this behavior
2017-12-14 11:56:23 +01:00
Damien Guard
ca53cf9ec1
Remove the texteditor isModified/isReadOnly handling intended for unsavable edit buffers as causes issues with vim-mode-plus
2017-12-13 09:17:30 -08:00
Max Brunsfeld
43c6f4ccb0
Merge branch 'master' into mb-tree-sitter-parsers
2017-12-11 09:18:31 -08:00
Max Brunsfeld
e669152841
Merge pull request #16074 from UziTech/patch-4
...
Make notifications.clear public and emit event
2017-12-08 14:20:33 -08:00
Max Brunsfeld
3d11c17264
Fix exception in getFoldableRangeForNode
2017-12-07 17:42:52 -08:00
Max Brunsfeld
a7a53f4158
Allow multiple child types to be specified as fold start or end
2017-12-07 17:08:47 -08:00
Max Brunsfeld
ad492ef344
Merge branch 'master' into mb-tree-sitter-parsers
2017-12-07 17:07:18 -08:00
Max Brunsfeld
f712de65d0
Fix nesting level calculation for children of partially-folded nodes
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-12-07 15:30:48 -08:00
Max Brunsfeld
136dc86584
Leave muli-character fold end tokens on their own line
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-12-07 15:29:11 -08:00
GilTeixeira
2369219c87
Changed atom safe mode theme to One Dark.
2017-12-07 16:53:38 +00:00
Max Brunsfeld
725d7db7ae
Merge branch 'master' into mb-tree-sitter-parsers
2017-12-06 14:56:09 -08:00
Max Brunsfeld
3f775b5505
Fix folding of internal nodes when fold end isn't specified
2017-12-06 11:09:44 -08:00
Max Brunsfeld
815b445d2e
⬆️ language packages
2017-12-05 17:58:39 -08:00
Max Brunsfeld
77fd29647a
Cache foldability more intelligently
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-12-05 17:01:49 -08:00
Max Brunsfeld
f3715779e5
Support contentRegExp field on grammars, to match more than one line
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-12-05 16:26:24 -08:00
Katrina Uychaco
b3cee41f28
Merge remote-tracking branch 'origin/master' into ku-add-readonly-editor-attribute
2017-12-05 14:02:39 -08:00
Max Brunsfeld
a475baf4b5
Rework fold API for tree-sitter grammars
2017-12-05 12:39:52 -08:00
Damien Guard
70e773fa7b
Ensure read-only text editors are not considered 'modified'. Also clear read-only flag on successful save.
2017-12-04 13:12:08 -08:00
Justin Ratner
d4dd08da22
Use buildIndentString method instead of hard-coding spaces
2017-12-04 12:51:01 -07:00
Max Brunsfeld
98e11673aa
Tweak TreeSitterLanguageMode folding configuration
2017-12-04 11:40:44 -08:00
Max Brunsfeld
4e38b61a5e
Optimize TreeSitterLanguageMode.isFoldableAtRow
2017-12-04 11:02:24 -08:00
Max Brunsfeld
d893fb25a8
🎨 TreeSitterLanguageMode
2017-12-02 10:48:20 -08:00
Max Brunsfeld
bda50585c4
Make TreeSitterHighlightIterator stop in between tokens when needed
2017-12-01 14:58:09 -08:00
Max Brunsfeld
6e2ac3548f
Ensure that all opened editors' buffers are added to the project
...
Assigning a language mode happens when adding a buffer to the project,
so we need to guarantee this happens to all buffers used by visible editors.
2017-12-01 09:58:19 -08:00
Max Brunsfeld
203c38ca45
Add select-{larger,smaller}-syntax-node commands
2017-11-30 15:17:14 -08:00
Max Brunsfeld
273d708a48
Add preference for using Tree-sitter parsers
2017-11-30 14:21:53 -08:00
Max Brunsfeld
9762685106
Start work on loading tree-sitter grammars in GrammarRegistry
2017-11-30 09:31:08 -08:00
Max Brunsfeld
5c1a49fccf
Add initial TreeSitterLanguageMode implementation
...
Much of this is from the tree-sitter-syntax package.
Also, add a dependency on the tree-sitter module.
2017-11-29 17:14:34 -08:00
Max Brunsfeld
c4b38c615f
Fix misplaced default chunkSize property
2017-11-29 13:10:00 -08:00
Max Brunsfeld
1a1ee134cf
Merge pull request #16297 from atom/mb-remove-grammar-registry-inheritance
...
Remove GrammarRegistry's inheritance from first-mate's GrammarRegistry
2017-11-29 12:26:02 -08:00
Max Brunsfeld
3053069ab1
Merge pull request #16199 from atom/mb-decaffeinate-package
...
Convert Package to JS
2017-11-29 11:45:39 -08:00
Max Brunsfeld
515ed5602e
Add a shim for the GrammarRegistry.grammars property
2017-11-29 11:23:56 -08:00
Max Brunsfeld
1af6da0b76
Don't use underscore in Package
2017-11-29 11:08:54 -08:00
Max Brunsfeld
9006d05d4f
Remove GrammarRegistry's inheritance from first-mate's registry
2017-11-29 10:36:49 -08:00
Katrina Uychaco
a993742f7f
👕 🔥 semicolon
2017-11-28 22:06:33 -08:00
Katrina Uychaco
aeb9af63df
Store readOnly state on the TextEditor model
2017-11-28 21:14:40 -08:00
Katrina Uychaco
909caa2a59
Add 'readonly' attribute to <atom-text-editor> element
2017-11-28 20:01:31 -08:00
Max Brunsfeld
607ed74e7b
Rename TokenizedBuffer to TextMateLanguageMode
2017-11-28 16:57:06 -08:00
Max Brunsfeld
61ac366491
Replace TokenizedBuffer.setVisible with simpler .startTokenizing
...
We will still wait to tokenize a buffer until it is visible in *some*
tab, but we no longer enable and disable tokenization as different
editors become visible.
2017-11-28 12:12:40 -08:00
Max Brunsfeld
e08091f193
Make assignLanguageMode take a language id instead of a language name
2017-11-28 11:14:29 -08:00
Max Brunsfeld
bffdeb461f
Remove handling of old grammarOverridesByPath serialization key
2017-11-27 09:36:43 -08:00
Max Brunsfeld
d1468fddd9
Implement .setGrammar in terms of .setLanguageMode
2017-11-22 16:27:29 -08:00
Max Brunsfeld
59ed55e898
Don't deprecate old TextEditorRegistry methods yet
2017-11-22 16:11:39 -08:00
Max Brunsfeld
af8848fb86
Document new GrammarRegistry methods
2017-11-22 15:53:13 -08:00
Max Brunsfeld
4810d13094
Fix memory leak in .maintainLanguageMode
2017-11-22 11:41:55 -08:00