Skip to content

Commit b7a43fb

Browse files
committed
Finish Enhance_documentation
1 parent a5cbb7f commit b7a43fb

File tree

7 files changed

+198
-21
lines changed

7 files changed

+198
-21
lines changed

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
8+
## [Unreleased]
9+
10+
11+
### Fixed
12+
13+
- Fixed Typo in the readme
14+
- Fixed LivecodeServerExecutablePath no applying correctly
15+
16+
### Added
17+
18+
- Basic documentation on Readme.md
19+
20+
### Removed
21+
22+
- Removed unused configuration entry
23+
24+
725
## [1.0.4] - 2022-01-22
826

927
### Added

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing
2+
3+
Thanks for considering contributing to Default!
4+
5+
## Opening issues
6+
7+
If you find a bug, please feel free to [open an issue](https://github.com/ferruslogic/vscode-livecodescript/issues).
8+
9+
If you taking the time to mention a problem, even a seemingly minor one, it is greatly appreciated, and a totally valid contribution to this project. Thank you!
10+
11+
## Fixing bugs
12+
13+
We love pull requests. Here’s a quick guide:
14+
15+
1. [Fork this repository](https://github.com/ferruslogic/default/fork) and then clone it locally:
16+
17+
```bash
18+
git clone https://github.com/ferruslogic/default
19+
```
20+
21+
2. Create a topic branch for your changes:
22+
23+
```bash
24+
git checkout -b fix-for-that-thing
25+
```
26+
3. Commit a failing test for the bug:
27+
28+
```bash
29+
git commit -am "Adds a failing test to demonstrate that thing"
30+
```
31+
32+
4. Commit a fix that makes the test pass:
33+
34+
```bash
35+
git commit -am "Adds a fix for that thing!"
36+
```
37+
38+
5. Run the tests:
39+
40+
```bash
41+
npm test
42+
```
43+
44+
6. If everything looks good, push to your fork:
45+
46+
```bash
47+
git push origin fix-for-that-thing
48+
```
49+
50+
7. [Submit a pull request.](https://help.github.com/articles/creating-a-pull-request)
51+
52+
8. Enjoy being the wonderful person you are
53+
54+
After you’ve opened your pull request, [you should email me](mailto:[email protected]) your mailing address so I can mail you a personal thank you note. Seriously!
55+
56+
## Adding new features
57+
58+
Thinking of adding a new feature? Cool! [Open an issue](https://github.com/ferruslogic/default/issues) and let’s design it together.

README.md

+33-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,44 @@
44

55
[![CI](https://github.com/ferruslogic/vscode-livecodescript/actions/workflows/ci.yml/badge.svg)](https://github.com/ferruslogic/vscode-livecodescript/actions/workflows/ci.yml) [![CI](https://badgen.net/vs-marketplace/v/ferruslogic.livecodescript)](https://marketplace.visualstudio.com/items?itemName=ferruslogic.livecodescript)
66

7-
## Features
87

9-
Learn more about the rich features of the Python extension:
8+
# Features
9+
10+
Lots of new improvements happening! We now have a CHANGELOG.md
11+
12+
## General Features
13+
14+
Learn more about the rich features of the Livecode extension:
1015

1116
- Linting
1217
- Format your code
1318
- Syntax highlighting
14-
- Go to definition
19+
- Go to definition (across opened documents)
1520
- Outline
1621
- Breadcrumbs
1722

23+
24+
25+
## Usage
26+
27+
Install the [VSCode Livecode Extension](https://marketplace.visualstudio.com/items?itemName=FerrusLogic.livecodescript).
28+
29+
30+
**This extension requires Livecode server i order to support linting and formating**.
31+
32+
Dowload and install livecode-server. When the plugin is loaded it will ask for Livecode-server executable.
33+
34+
35+
36+
37+
## Contributing
38+
39+
Contributions are welcome. Read more at [Contribute](CONTRIBUTING.md)
40+
41+
42+
43+
44+
45+
# License
46+
47+
[BSD 3](LICENSE.md) © FerrusLogic

package.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@
2929
"title": "Livecodescript",
3030
"type": "object",
3131
"properties": {
32-
"livecodescript.suggest.basic": {
33-
"type": "boolean",
34-
"default": true,
35-
"description": "test1"
36-
},
3732
"livecodescript.validate.enable": {
3833
"type": "boolean",
3934
"default": true,
40-
"description": "test2"
35+
"description": "Enable code validation"
4136
},
42-
"livecodescript.validate.executablePath": {
37+
"livecodescript.LivecodeServerExecutablePath": {
4338
"type": "string",
44-
"default": "C:\\lc-server\\livecode-server.exe",
39+
"default": "",
4540
"description": "Executable Path"
4641
},
4742
"livecodescript.validate.run": {

src/features/format.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as path from 'path';
44

55

66
const enum Setting {
7-
ExecutablePath = 'livecodescript.validate.executablePath',
7+
LivecodeServerExecutablePath = 'livecodescript.validate.LivecodeServerExecutablePath',
88
}
99

1010

@@ -18,9 +18,9 @@ export class LivecodescriptFormattingProvider implements vscode.DocumentRangeFor
1818

1919
// if perltidy is not defined, then skip the formatting
2020
let config = vscode.workspace.getConfiguration('livecodescript');
21-
let executable = config.get("executablePath", "");
21+
let executable = config.get("LivecodeServerExecutablePath", "");
2222

23-
if (!vscode.workspace.getConfiguration('livecodescript').get("executablePath")) {
23+
if (!vscode.workspace.getConfiguration('livecodescript').get("LivecodeServerExecutablePath")) {
2424
return [];
2525
}
2626

@@ -33,7 +33,7 @@ export class LivecodescriptFormattingProvider implements vscode.DocumentRangeFor
3333
}
3434

3535
let config = vscode.workspace.getConfiguration('livecodescript');
36-
let executable = config.get("executablePath", "");
36+
let executable = config.get("LivecodeServerExecutablePath", "");
3737

3838
let args: string[] = [(path.resolve(__dirname, '../../tools/Formatter.lc')).replace(/[\\]+/g,"/"), '-scope=.source.livecodescript'];
3939

src/features/validationProvider.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let localize = nls.loadMessageBundle();
1515
const enum Setting {
1616
Run = 'livecodescript.validate.run',
1717
Enable = 'livecodescript.validate.enable',
18-
ExecutablePath = 'livecodescript.executablePath',
18+
LivecodeServerExecutablePath = 'livecodescript.LivecodeServerExecutablePath',
1919
}
2020

2121
export class LineDecoder {
@@ -177,7 +177,7 @@ export default class LivecodescriptValidationProvider {
177177
return new Promise<void>(resolve => {
178178
const executable = this.config!.executable;
179179
if (!executable) {
180-
this.showErrorMessage(localize('noLivecode', 'Cannot validate since a Livecode installation could not be found. Use the setting \'livecodescript.validate.executablePath\' to configure the Livecode executable.'));
180+
this.showErrorMessage(localize('noLivecode', 'Cannot validate since a Livecode installation could not be found. Use the setting \'livecodescript.LivecodeServerExecutablePath\' to configure the Livecode executable.'));
181181
this.pauseValidation = true;
182182
resolve();
183183
return;
@@ -252,9 +252,9 @@ export default class LivecodescriptValidationProvider {
252252
let message: string | null = null;
253253
if (error.code === 'ENOENT') {
254254
if (this.config!.executable) {
255-
message = localize('wrongExecutable', 'Cannot validate since {0} is not a valid Livecode executable. Use the setting \'livecodescript.validate.executablePath\' to configure the Livecode executable.', executable);
255+
message = localize('wrongExecutable', 'Cannot validate since {0} is not a valid Livecode executable. Use the setting \'livecodescript.LivecodeServerExecutablePath\' to configure the Livecode executable.', executable);
256256
} else {
257-
message = localize('noExecutable', 'Cannot validate since no Livecode executable is set. Use the setting \'livecodescript.validate.executablePath\' to configure the Livecode executable.');
257+
message = localize('noExecutable', 'Cannot validate since no Livecode executable is set. Use the setting \'livecodescript.LivecodeServerExecutablePath\' to configure the Livecode executable.');
258258
}
259259
} else {
260260
message = error.message ? error.message : localize('unknownReason', 'Failed to run Livecode using path: {0}. Reason is unknown.', executable);
@@ -269,7 +269,7 @@ export default class LivecodescriptValidationProvider {
269269
private async showErrorMessage(message: string): Promise<void> {
270270
const openSettings = localize('goToSetting', 'Open Settings');
271271
if (await vscode.window.showInformationMessage(message, openSettings) === openSettings) {
272-
vscode.commands.executeCommand('workbench.action.openSettings', Setting.ExecutablePath);
272+
vscode.commands.executeCommand('workbench.action.openSettings', Setting.LivecodeServerExecutablePath);
273273
}
274274
}
275275
}
@@ -285,7 +285,7 @@ async function getConfig(): Promise<ILivecodescriptConfig> {
285285

286286
let executable: string | undefined;
287287
let executableIsUserDefined: boolean | undefined;
288-
const inspect = section.inspect<string>(Setting.ExecutablePath);
288+
const inspect = section.inspect<string>(Setting.LivecodeServerExecutablePath);
289289
if (inspect && inspect.workspaceValue) {
290290
executable = inspect.workspaceValue;
291291
executableIsUserDefined = false;

0 commit comments

Comments
 (0)