Skip to content

Commit ffce4e9

Browse files
authored
add elm syntax highlighting (codesandbox#2036)
* add elm syntax highlighting * only add syntax highlight
1 parent f72c847 commit ffce4e9

File tree

2,717 files changed

+276235
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,717 files changed

+276235
-1
lines changed

standalone-packages/vscode-extensions/out/extensions/index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sudo: false
2+
3+
os:
4+
- osx
5+
- linux
6+
7+
before_install:
8+
- if [ $TRAVIS_OS_NAME == "linux" ]; then
9+
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
10+
sh -e /etc/init.d/xvfb start;
11+
sleep 3;
12+
fi
13+
14+
install:
15+
- node --version
16+
- npm --version
17+
- npm install -g elm
18+
- npm install
19+
- npm run vscode:prepublish
20+
21+
script:
22+
- npm test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3+
<Metadata>
4+
<Identity Language="en-US" Id="elm" Version="0.25.0" Publisher="sbrink"/>
5+
<DisplayName>elm</DisplayName>
6+
<Description xml:space="preserve">Elm Language Support for Visual Studio Code</Description>
7+
<Tags>snippet,keybindings,json,elm,Elm,__ext_elm</Tags>
8+
<Categories>Programming Languages,Snippets,Linters</Categories>
9+
<GalleryFlags>Public</GalleryFlags>
10+
<Badges></Badges>
11+
<Properties>
12+
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.6.0" />
13+
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
14+
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
15+
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
16+
17+
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/Krzysztof-Cieslak/vscode-elm.git" />
18+
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/Krzysztof-Cieslak/vscode-elm.git" />
19+
20+
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/Krzysztof-Cieslak/vscode-elm.git" />
21+
22+
23+
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/Krzysztof-Cieslak/vscode-elm/issues" />
24+
25+
<Property Id="Microsoft.VisualStudio.Services.Branding.Color" Value="#232323" />
26+
<Property Id="Microsoft.VisualStudio.Services.Branding.Theme" Value="dark" />
27+
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
28+
29+
30+
</Properties>
31+
32+
<Icon>extension/images/elmIcon.png</Icon>
33+
</Metadata>
34+
<Installation>
35+
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
36+
</Installation>
37+
<Dependencies/>
38+
<Assets>
39+
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
40+
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/images/elmIcon.png" Addressable="true" />
41+
</Assets>
42+
</PackageManifest>
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
### 0.25.0 - 07.01.2019
2+
* Fix issue with elm module parser using object spread in raw javascript (not transpiled). (by @joeandaverde)
3+
* Fix issue with improperly invaliding old symbols in cache. (by @joeandaverde)
4+
* Fix elm analyse path (by @Razzeee)
5+
* The linter should also respect the module in "Make special path" (by @ccapndave)
6+
7+
### 0.24.0 - 26.11.2018
8+
* Improved Symbol Search / Goto Definition (by @joeandaverde)
9+
* Fix wrong missing compiler error message (by @andys8)
10+
* Check isTestFile before normalizing path on windows (by @Krzysztof-Cieslak)
11+
12+
### 0.23.0 - 19.11.2018
13+
* corrected a spelling error (by @WEBhicham)
14+
* Replace inefficient regex to locate imports with simpler regex (by @joeandaverde)
15+
* Add json schema support for Elm's config files (by @stephenreddek)
16+
* Add support for running tests for Elm 0.19 (by @jackfranklin)
17+
18+
### 0.22.0 - 01.10.2018
19+
* Fix a 0.18 elm-make configuration bug and support elm-format for 0.18 and 0.19 (by @hakonrossebo)
20+
* Setting and logic to disable linting (by @hakonrossebo)
21+
* Adds external package "oracle"-support for Elm 0.19 (by @r1sc)
22+
* Handle breaking change in elm-format (by @hakonrossebo)
23+
24+
### 0.21.0 - 30.08.2018
25+
* Set elm-make as default makeCommand for 0.18 and earlier (by @jackfranklin)
26+
* Fix for Elm 0.19, find right project directory (by @norpan)
27+
* Fix linting for errors for Elm 0.18 (by @jackfranklin)
28+
* Changes REPL to use integrated terminal for interactivity (by @hakonrossebo)
29+
* Make compiler errors a little easier to read (by @norpan)
30+
* Separate example code for 0.18 and 0.19 (by @hakonrossebo)
31+
* Fixes to omit Elm Oracle for 0.19 and read elm.json (by @hakonrossebo)
32+
* Using terminal instead of output window to install packages for y/n (by @hakonrossebo)
33+
34+
### 0.20.0 - 24.08.2018
35+
* Snippets: Let expression indentation (elm-format) (by @andys8)
36+
* Add ability to configure elm-package locating. (by @jackfranklin)
37+
* Syntax Polish (by @mdgriffith)
38+
* Elm 0.19 update (by @hakonrossebo and @7sharp9)
39+
40+
### 0.19.0 - 27.07.2018
41+
* Snippets: Add todo comment snippet (by @andys8)
42+
* Refactoring diagnostic init for LS (by @lostintangent)
43+
* Grammar updates (by @mdgriffith)
44+
* Compilable Msg placeholder in HTML.program snippet (by @milesfrain)
45+
* Info about editor.formatOnSaveTimeout on Windows (by @rofrol)
46+
47+
### 0.18.0 - 22.05.2018
48+
* Make linting work again with elm-analyse 0.14.2 (by @Yarith)
49+
* Handle formatSelection the same as formatDocument (by @milesfrain)
50+
51+
### 0.17.0 - 26.04.2018
52+
* Limiting workspace symbols and linting to local files (by @lostintangent)
53+
* Fixed issue with elm-make and spaces in paths (by @Arbyy)
54+
* Fix error message not clearing when formatting with elm-format (by @adam77)
55+
* Make folding not eat up empty lines (by @szabba)
56+
57+
### 0.16.0 - 11.02.2018
58+
* Jump to symbol based on imports. Jump to symbol that has been fully qualified such as `MyModule.myFunction` (by @joeandaverde)
59+
* Fix cursor moving when formatting with elm-format (by @adam77)
60+
* Support elm code syntax highlighting in markdown files (by @kachkaev)
61+
* Snippets improvement (by @andys8)
62+
* Fix `elm.makeCommand` sample path for Windows (by @lukaszgasior)
63+
64+
### 0.15.1 - 03.10.2017
65+
* added prettier to the project (by @littleStudent)
66+
* Fix package installation (by @wolverian)
67+
* save file only once formatting is finished (by @gyzerok)
68+
* Snippets for elm-test test and describe blocks (by @andys8 )
69+
70+
### 0.15.0 - 10.08.2017
71+
* Add integration with `Elm-analyse` (by @hakonrossebo)
72+
* Use TsLint on `vscode-elm` code base (by @littleStudent)
73+
74+
### 0.14.1 - 21.06.2017
75+
* Added the ability to include function/type/type alias comments in intellisense (by @andrewsdev)
76+
* Fixed bugs in parsing elm-oracle hover results and bugs in userProject hover results (by @andrewsdev)
77+
78+
### 0.14.0 - 15.06.2017
79+
* Fix defaultModel snippet, Add Html.program snippet (by @iocube)
80+
* Bugfix: Error with one-line suggested annotation (by @hakonrossebo)
81+
* Handle block comments (by @hakonrossebo)
82+
* Improvements/bug fixes for user project intellisense (by @andrewsdev):
83+
- Bug fix: writing type signature before writing the function definition behavior
84+
- Bug fix: `/as/` regex for the list of imports behavior
85+
- Bug fix: name of a user's type or type alias were not included in intellisense results
86+
- Feature: Primitive types are now included in autocomplete when writing a function definition
87+
- Feature: limit on user intellisense 'comment' size now better indicates it has hit a settings limit
88+
- Feature: Can now set `elm.userProjectMaxCommentSize` to 0 to bypass the limit on user intellisense 'comment' size
89+
- Feature: Working Intellisense (hover and autocomplete) for user modules with a '.'. Custom configuration to control this feature.
90+
91+
### 0.13.0 - 08.06.2017
92+
* Workspace symbols implementation (by @hakonrossebo)
93+
* Elm-reactor subdir traversal (by @hakonrossebo)
94+
* Command to stop Elm REPL (by @hakonrossebo)
95+
* Elm-make uses path correctly. Also introduce special file config (by @hakonrossebo)
96+
97+
### 0.12.0 - 03.06.2017
98+
* add auto-closing quotes to config (by @kojuro-kun)
99+
* Changes snippets to 4 space indentation (by @hakonrossebo)
100+
* Fixes double module name in autocomplete (by @hakonrossebo)
101+
* Autocomplete handles aliased module names (by @hakonrossebo)
102+
* Elm-format error as StatusBar instead of ErrorMessage (by @hakonrossebo)
103+
* Initial implementation of CodeActions (function type annotations, misspelled variable names, types and patterns) (by @hakonrossebo)
104+
* Implements go to definition for document (by @hakonrossebo)
105+
106+
### 0.11.2 - 10.05.2017
107+
* Improved Linter so that issues are associated with the correct files (by @danheuck )
108+
* Fix for elm-oracle being fed entire elm file (by @dannyob)
109+
110+
### 0.11.1 - 10.05.2017
111+
* Fix keyboard shortcuts
112+
113+
### 0.11.0 - 08.05.2017
114+
* Add `Elm: Browse package` command
115+
* Fix paths concatenation issue for non-Windows machines
116+
117+
### 0.10.0 - 05.05.2017
118+
119+
* Initial changelog entry, so all working features are listed:
120+
121+
* Syntax highlighting
122+
* Autocomplete (for external packages and experimentally for local projects)
123+
* Error highlighting
124+
* Code formatting
125+
* Hover info (for external packages and experimentally for local projects)
126+
* Document Symbol provider
127+
* Integration with Elm Reactor
128+
* Integration with Elm Make
129+
* Integration with Elm Package
130+
* REPL support
131+
* Custom Elm Snippets
132+
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Contributing to VScode-Elm
2+
3+
Please take a moment to review this document in order to make the contribution
4+
process easy and effective for everyone involved!
5+
6+
## Using the issue tracker
7+
8+
Use the issues tracker for:
9+
10+
* [bug reports](#bug-reports)
11+
* [feature requests](#feature-requests)
12+
* [submitting pull requests](#pull-requests)
13+
14+
Please **do not** use the issue tracker for personal or commercial support requests.
15+
16+
Personal support request should be discussed on Elm Slack.
17+
18+
Comercial support is provided by [Lambda Factory](http://lambdafactory.io/).
19+
20+
## Bug reports
21+
22+
A bug is either a _demonstrable problem_ that is caused by the code in the repository,
23+
or indicate missing, unclear, or misleading documentation. Good bug reports are extremely
24+
helpful - thank you!
25+
26+
Guidelines for bug reports:
27+
28+
1. **Use the GitHub issue search** &mdash; check if the issue has already been
29+
reported.
30+
31+
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
32+
`master` branch in the repository.
33+
34+
3. **Isolate and report the problem** &mdash; ideally create a reduced test
35+
case.
36+
37+
Please try to be as detailed as possible in your report. Include information about
38+
your Operating System, as well as your `elm` version. Please provide steps to
39+
reproduce the issue as well as the outcome you were expecting! All these details
40+
will help developers to fix any potential bugs.
41+
42+
Example:
43+
44+
> Short and descriptive example bug report title
45+
>
46+
> A summary of the issue and the environment in which it occurs. If suitable,
47+
> include the steps required to reproduce the bug.
48+
>
49+
> 1. This is the first step
50+
> 2. This is the second step
51+
> 3. Further steps, etc.
52+
>
53+
> `<url>` - a link to the reduced test case (e.g. a GitHub Gist)
54+
>
55+
> Any other information you want to share that is relevant to the issue being
56+
> reported. This might include the lines of code that you have identified as
57+
> causing the bug, and potential solutions (and your opinions on their
58+
> merits).
59+
60+
## Feature requests
61+
62+
Feature requests are welcome and should be discussed on issue tracker. But take a moment to find
63+
out whether your idea fits with the scope and aims of the project. It's up to *you*
64+
to make a strong case to convince the community of the merits of this feature.
65+
Please provide as much detail and context as possible.
66+
67+
68+
## Pull requests
69+
70+
Good pull requests - patches, improvements, new features - are a fantastic
71+
help. They should remain focused in scope and avoid containing unrelated
72+
commits.
73+
74+
**IMPORTANT**: By submitting a patch, you agree that your work will be
75+
licensed under the license used by the project.
76+
77+
If you have any large pull request in mind (e.g. implementing features,
78+
refactoring code, etc), **please ask first** otherwise you risk spending
79+
a lot of time working on something that the project's developers might
80+
not want to merge into the project.
81+
82+
Please adhere to the coding conventions in the project (indentation,
83+
accurate comments, etc.) and don't forget to add your own tests and
84+
documentation. When working with git, we recommend the following process
85+
in order to craft an excellent pull request:
86+
87+
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork,
88+
and configure the remotes:
89+
90+
```bash
91+
# Clone your fork of the repo into the current directory
92+
git clone https://github.com/<your-username>/vscode-elm
93+
# Navigate to the newly cloned directory
94+
cd vscode-elm
95+
# Assign the original repo to a remote called "upstream"
96+
git remote add upstream https://github.com/Krzysztof-Cieslak/vscode-elm
97+
```
98+
99+
2. If you cloned a while ago, get the latest changes from upstream, and update your fork:
100+
101+
```bash
102+
git checkout master
103+
git pull upstream master
104+
git push
105+
```
106+
107+
3. Create a new topic branch (off of `master`) to contain your feature, change,
108+
or fix.
109+
110+
**IMPORTANT**: Making changes in `master` is discouraged. You should always
111+
keep your local `master` in sync with upstream `master` and make your
112+
changes in topic branches.
113+
114+
```bash
115+
git checkout -b <topic-branch-name>
116+
```
117+
4. Install dependencies and make sure everything is building
118+
119+
```bash
120+
yarn install
121+
yarn build
122+
```
123+
124+
5. Open extension in your favorite editor (we recomend VSCode as it enables easy desbuging of the plugin)
125+
126+
```bash
127+
code .
128+
```
129+
130+
6. Start watch-mode compilation (re-compilation on every file save)
131+
132+
```bash
133+
yarn run compile
134+
```
135+
136+
7. You can start current version of the extension in experimental
137+
instance of VSCode with `Launch Extension` debug configuration (`F5`).
138+
139+
8. Commit your changes in logical chunks. Keep your commit messages organized,
140+
with a short description in the first line and more detailed information on
141+
the following lines. Feel free to use Git's
142+
[interactive rebase](https://help.github.com/articles/about-git-rebase/)
143+
feature to tidy up your commits before making them public.
144+
145+
9. Make sure all the tests are still passing.
146+
147+
```bash
148+
yarn test
149+
```
150+
151+
10. Push your topic branch up to your fork:
152+
153+
```bash
154+
git push origin <topic-branch-name>
155+
```
156+
157+
11. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/)
158+
with a clear title and description.
159+
160+
12. If you haven't updated your pull request for a while, you should consider
161+
rebasing on master and resolving any conflicts.
162+
163+
**IMPORTANT**: _Never ever_ merge upstream `master` into your branches. You
164+
should always `git rebase` on `master` to bring your changes up to date when
165+
necessary.
166+
167+
```bash
168+
git checkout master
169+
git pull upstream master
170+
git checkout <your-topic-branch>
171+
git rebase master
172+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (c) Sascha Brink, Krzysztof Cieslak
2+
3+
All rights reserved.
4+
5+
MIT License
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
8+
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
9+
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
10+
is furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
16+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
17+
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)