Skip to content

Improve auto-complete #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
3f423c6
Fix typo
Jan 1, 2018
5bd9de8
Merge branch 'master' of https://github.com/mryurihi/mcfunction
Jan 1, 2018
6adad7a
Prepare 0.5.5 release
Jan 1, 2018
4a8274d
Fix JSON highlighting
Jan 17, 2018
7fd1d08
Prepare 0.6.0 release
Jan 17, 2018
f589ba1
fix typo
Jan 19, 2018
943c1da
Prepare 0.6.1 release
Jan 19, 2018
1ad623c
fixed typo
coolreader18 Jan 30, 2018
ac5c28d
Merge pull request #6 from coolreader18/patch-1
Jan 30, 2018
1a20c6e
fix typo
Feb 4, 2018
76356ec
Merge branch 'master' of https://github.com/mryurihi/mcfunction
Feb 4, 2018
0e98e8a
Prepare 0.6.2 release
Feb 4, 2018
2086cdd
Add block states
Feb 11, 2018
fe0b1b3
Prepare 0.6.3 release
Feb 11, 2018
18875c5
fix
Feb 11, 2018
1a2ccd6
Prepare 0.6.4 release
Feb 11, 2018
87f69b1
Update README.md
Aug 22, 2019
566bd57
A start..
Nov 9, 2019
1202d9b
working for ones..
Nov 9, 2019
c6bfc5e
done...
Nov 9, 2019
cde49f4
version bs
Nov 9, 2019
b1b5375
Prepare v0.1.0 release
Nov 9, 2019
9c3e261
Prepare v0.2.0 release
Nov 9, 2019
4e10e35
version bs again
Nov 9, 2019
2e9a850
Prepare v0.1.0 release
Nov 9, 2019
b788fe6
Prepare v0.2.0 release
Nov 9, 2019
d0e6e74
Prepare v0.3.0 release
Nov 9, 2019
1c3cafa
Improve README formatting
danth Nov 11, 2019
7555bd6
updated to 1.15
Nov 26, 2019
cc34e62
Merge pull request #1 from AlphaMycelium/patch-1
Nov 26, 2019
81800cc
updated md to reflect the change to 1.15
Nov 26, 2019
455f739
Prepare v1.0.0 release
Nov 26, 2019
dce4095
Prepare v2.0.0 release
Nov 26, 2019
ea7e448
qick fix, json syntax error
Nov 27, 2019
32b4900
Prepare v2.0.1 release
Nov 27, 2019
3e9b111
Added some gamerules
Nov 27, 2019
22c6621
Prepare v2.1.0 release
Nov 27, 2019
c933f01
qick data modify storage fix
Nov 27, 2019
a167132
Prepare v2.1.1 release
Nov 27, 2019
0c1efd9
Prepare v2.1.2 release
Nov 27, 2019
8cc2a2c
Added uncompiled resources
Nov 29, 2019
932c860
replaced resurses
Nov 29, 2019
895b573
msg command fixed
Nov 30, 2019
aa55fe0
Moved resources to it's own repository
Nov 30, 2019
c799c81
Merge pull request #2 from Czaplicki/dev
Nov 30, 2019
cc6d083
Updated info
Nov 30, 2019
42c0084
Updated info
Nov 30, 2019
59a4edc
Merge branch 'master' of https://github.com/Czaplicki/mcfunction-support
Nov 30, 2019
42460ce
Prepare v3.0.0 release
Nov 30, 2019
87043d9
Added nbt-location ref, remade data command
Dec 2, 2019
a220445
testing
Dec 2, 2019
e60d6b4
Fixed some inclution bugs. Replaced the endless if-else chain for a s…
Dec 2, 2019
1c52d7c
updated res
Dec 2, 2019
406be71
Merge pull request #3 from Czaplicki/dev
Dec 2, 2019
da9380f
Prepare v3.1.0 release
Dec 2, 2019
36e3917
bugfixes
Dec 9, 2019
a8b0365
Prepare v3.2.0 release
Dec 9, 2019
c14668e
res update
Jan 8, 2020
1448de2
Prepare v3.3.0 release
Jan 8, 2020
e7e1760
Prepare v3.3.1 release
Jan 8, 2020
95aa71f
bug fix
Jan 8, 2020
af3f6d3
Prepare v3.3.2 release
Jan 8, 2020
fdbf2c6
Prepare v3.3.3 release
Jan 8, 2020
1c66f0b
res updated
Mar 6, 2020
f93d741
Prepare v3.4.0 release
Mar 6, 2020
0db44a3
Update README.md
Mar 17, 2020
9fcd4f2
res update
Mar 17, 2020
2251864
Prepare v3.5.0 release
Mar 17, 2020
c6990cd
Merge branch 'master' of https://github.com/Czaplicki/mcfunction-support
Mar 17, 2020
a391c81
Prepare v3.6.0 release
Mar 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 MrYurihi Redstone
Copyright (c) 2019 Czaplicki

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
20 changes: 20 additions & 0 deletions ORIGINAL_LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2017 MrYurihi Redstone

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# mcfunction package
# mcfunction-support for Atom

A syntax highlighter and snippet package for Minecraft's function files
![image not loading](https://mryurihi.github.io/atom-mcfunction-image.png)
# CONTRIBUTE
I have stoped using atom as my text editor,
so I'm not as inclined to continue working on this extention.
I will do my best with look at the pull requests,
but if anyone would what to take over the repository,
it would be highly appriciated!

It also has a *very* competent autocomplete+ provider that is almost identical to Minecraft's native tab completions, so you fill feel right at home
A syntax highlighter, auto-complete provider and snippet package for Minecraft 1.15
function files, built for the [Atom editor](https://atom.io/). The autocomplete
provider is *very* competent and almost has an identical feel to Minecraft's native
tab completions.

## Info
This is a fork of https://github.com/MrYurihi/mcfunction.
I have no idea how he made this, but adding and removing entries in a JSON file,
I do know how to do, so I updated it to 1.15. All Credit goes to them.

If you find something missing, a command, command option, id, etc.
Leave it as en issue or feel free to add them your self and do a pull request,
over at : https://github.com/Czaplicki/mcfunction-support-resources/


## IMO
This is the best available package on apm for datapacks in 1.15.
This is *not* the best available package on apm for datapacks in 1.13.
For 1.13, use https://github.com/MrYurihi/mcfunction.
62 changes: 52 additions & 10 deletions grammars/mcfunction.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"scopeName": "source.mcfunction",
"name": "mcfunction",
"fileTypes": [""],
"fileTypes": ["mcfunction"],
"patterns": [
{
"match": "@[parse]",
"name": "selector"
},
{
"name": "argument",
"begin": "\\[",
"begin": "(@[parse])\\[",
"beginCaptures": {
"1": {
"name": "selector"
}
},
"end": "\\]",
"patterns": [
{
Expand All @@ -25,31 +26,72 @@
"end": "(?=,|\\])",
"name": "value",
"patterns": [
{
"begin": "\"",
"end": "\"",
"patterns": [
{
"match": "\\\\(?:[\"\\\\/bfnrt])|(?:u[0-9a-fA-F]{4})"
}
]
},
{
"match": "[\\w_]"
},
{
"include": "#nbt-compound"
}
]
}
]
},
{
"match": "@[parse]",
"name": "selector"
},
{
"include": "#nbt-compound"
},
{
"match": "^(?:advancement|blockdata|clear|clone|defaultgamemode|difficulty|effect|enchant|entitydata|execute|fill|function|gamemode|gamerule|give|kill|locate|particle|playsound|recipe|reload|replaceitem|say|scoreboard|setblock|setworldspawn|spreadplayers|stats|stopsound|summon|teleport|tellraw|tell|testforblocks|testforblock|testfor|time|title|toggledownfall|tp|trigger|weather|worldborder|xp)\\b",
"match": "(?:^|(?<=run ))(?:advancement|clear|clone|data|datapack|defaultgamemode|difficulty|effect|execute|experience|fill|forceload|function|gamemode|gamerule|give|kill|locate|msg|particle|playsound|recipe|reload|replaceitem|say|scoreboard|tag|team|seed|setblock|setworldspawn|schedule|spreadplayers|stopsound|summon|teleport|tellraw|tell|time|title|tp|trigger|w|weather|worldborder|xp)\\b",
"name": "command"
},
{
"match": "^#.*",
"name": "comment"
},
{
"match": "(?: (?:~-?(?:\\d*\\.)?\\d*|-?(?:\\d*\\.)?\\d+)){3}",
"match": "(:?[~^] ?|[~^]?\\-?\\d*\\.?\\d+\\ ?){2,5}",
"name": "coord"
},
{
"match": "^/",
"name": "invalid.illegal.error.fslash"
"name": "error.fslash"
},
{
"match": "\\[(?:(?:(\\w+)=(\\w+)),)*(?:(\\w+)=(\\w+))\\]",
"name": "state",
"captures": {
"1": {
"name": "name"
},
"3": {
"name": "name"
},
"2": {
"name": "value"
},
"4": {
"name": "value"
}
}
},
{
"match" : "\\.\\.\\d+|\\d+\\.\\.\\d+|\\d+\\.\\.|\\d+",
"name" : "range"
},
{
"include": "source.json"
}
],
"repository": {
Expand Down Expand Up @@ -97,7 +139,7 @@
},
"nbt-key-unquoted": {
"match": "[\\w_]+",
"name": "key.nbt"
"name": "key"
},
"nbt-value": {
"patterns": [
Expand Down
145 changes: 0 additions & 145 deletions grammars/mcfunction13.json

This file was deleted.

10 changes: 10 additions & 0 deletions grammars/mcmeta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"scopeName": "source.mcmeta",
"name": "mcmeta",
"fileTypes": ["mcmeta"],
"patterns" : [
{
"include" : "source.json"
}
]
}
Loading