Skip to content

Commit

Permalink
Merge pull request #54 from jonnyboyC/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jonnyboyC authored May 31, 2019
2 parents b95a4a3 + b4f560c commit 4316986
Show file tree
Hide file tree
Showing 176 changed files with 6,386 additions and 4,435 deletions.
26 changes: 19 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [0.6.0] (2019-5-30)

## Features
- **Suffix Completion** In addition to completion suggestions for variables, locks, and function, suffixes are suggested when the type is known. This should almost always be the case for common globals such as `ship` and `body`.
- **Signature Help** When the function can be determined signature help can now be provided. Currently the signature displays the types for each parameter but not the parameter name. In a feature release parameter name will be added.

## Bug Fixes
- **Type Hover** Previously, on hover would not work past the first suffix trailer. This version rewrites a large part of the type checker to better resolve types for suffixes. On hover now reports types for all depths of suffix.

## Other
- **Instruction to Statement** changed all references of instruction to statement to better align with the terminology of Kos

# [0.5.1] (2019-5-16)

## Features
Expand Down Expand Up @@ -88,10 +100,10 @@

## Features
- **default KSP planets** Added kerbin, eve, etc. to auto completes. Will eventually allow for customization
- **deprecated warning** Initial set of deprecated warning for deprecated io. i.e. copy, rename, delete instructions.
- **deprecated warning** Initial set of deprecated warning for deprecated io. i.e. copy, rename, delete statements.

## Bug Fixes
- **run instruction resolution** fixed a bug the run instruction and functions where `runPath("0:example.ks").` did not resolve the sample as
- **run statement resolution** fixed a bug the run statement and functions where `runPath("0:example.ks").` did not resolve the sample as
`runPath("0:\runpath.ks").` or `runPath("runpath.ks")`


Expand All @@ -102,10 +114,10 @@
- **better auto complete** completions now include type inferred type information where available

## Bug Fixes
- **rename instruction grammer** Fixed an issue with the grammar for the rename instruction
- **rename statement grammer** Fixed an issue with the grammar for the rename statement
- **update performance diagnostics** Between the release of 0.2.0 and 0.3.0 vscode now ships with node 10. The performance hooks that were previously used have been remove. The new node performance hooks have been added in it's place
- **report error when lazyglobal off set** The language server now reports and errors when `lazyGlobal off. ... set x to "example".`
- **run instructions** Fixed a few issues related to the language server loading other file based on `runPath("example.ks").` and it's sibilings
- **run statements** Fixed a few issues related to the language server loading other file based on `runPath("example.ks").` and it's sibilings

# [0.2.0] (2019-1-5)

Expand All @@ -132,13 +144,13 @@
# [0.1.2] (2018-09-17)

## Bug Fixes
- **break instruction**: Forgot to actually implement break statement logic
- **break statement**: Forgot to actually implement break statement logic
- **parameter syntax**: Previously comments would not highlight correctly in the middle of a parameter declaration
- **declare syntax**: Previously in `declare variable to thing.` the variable name was highlighted as a keyword.
- **more synchronize** instruction*: More keywords were reset error reporting
- **more synchronize** statement*: More keywords were reset error reporting

# [0.1.1] (2018-09-12)

## Bug Fixes
- **parse errors**: Previously there was a bug were parse errors were not correctly reported for instructions inside a block (for, until, function, etc.).
- **parse errors**: Previously there was a bug were parse errors were not correctly reported for statements inside a block (for, until, function, etc.).

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ The project currently has client support for [Visual Studio Code](https://code.v

## Features

Currently the vscode client 0.5.1 implements the follow features
Currently the vscode client 0.6.0 implements the follow features
- synatx highlighting
- brace detection
- code snippets
- diagnostics on parsing errors
- go to definition
- basic auto complete
- symbol auto complete
- suffix auto complete
- function signature help
- file symbol lookup
- identify symbols that don't exist
- identify unused symbols
Expand Down
6 changes: 3 additions & 3 deletions clients/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Vscode client for the KOS-language-server",
"author": "John Chabot",
"license": "MIT",
"version": "0.5.1",
"version": "0.6.0",
"publisher": "JohnChabot",
"repository": {
"type": "git",
Expand Down Expand Up @@ -32,4 +32,4 @@
"@types/semver": "^6.0.0",
"@types/ws": "^6.0.1"
}
}
}
2 changes: 1 addition & 1 deletion clients/vscode/snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"body": [
"set ${1:suffix} to ${2:value}."
],
"description": "Set Instruction"
"description": "Set statement"
},
"until": {
"prefix": "until",
Expand Down
75 changes: 75 additions & 0 deletions kerboscripts/parser_valid/unitTests/allLanguage.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
@lazyGlobal on.

// triggers
on ship:body {
print(10 ^ (5 * 3e-1)).
}

when 10 <> 5 then {
copy "something" to "somewhere".
rename file somewhere "blah" to "otherwhere".
delete 10 from "someplace".
switch to 0.
compile body to 10.
}

toggle ship:panels.

// function
local function func {
parameter a.
parameter c is "something", b is 10.

declare global x is 1e6 * 3.

// all control flow
if "string" = "string" {
print((10 + 3)).
} else {
unset x.
}

local l is list(1, 2, 3, 4).
from { local shp is ship. } until defined ship step { . } do {
if shp <> ship and 10 <= 2 {
break.
}

// indexers
print l[0] at (10 + 5, (unchar(10))).
print l#0.
}

for i in l {
run once example.ks.
runPath(i).
runOncePath(x).
}

until a <> true {
local lambda is { return func:bind(10, b, c). }.
lambda().
}

wait until body:mu > 10.

return 20.
}

declare global lock other to 10.

if "something":someMethod((10:typestring + "cat")) or false {
unlock other.
}

log 10 to dump.txt.

stage.
clearScreen.
preserve.
reboot.
shutdown.

local n is node(1, 1, 1, 1).
add n.
remove n.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 30 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Syntax highlighting, auto-complete, and language diagnostics for KerboScript in Kerbal Operating System.",
"author": "John Chabot",
"license": "MIT",
"version": "0.5.1",
"version": "0.6.0",
"galleryBanner": {
"color": "#a3a3a3",
"theme": "dark"
Expand Down Expand Up @@ -116,7 +116,8 @@
}
}
},
"commands": [{
"commands": [
{
"command": "kos.startTelnet",
"title": "kOS: Connect Telnet Client"
},
Expand All @@ -133,26 +134,32 @@
"title": "kOS: Route Logging to Vscode"
}
],
"languages": [{
"id": "kos",
"aliases": [
"Kerbal Operating System",
"kos"
],
"extensions": [
".ks"
],
"configuration": "./kos.configuration.json"
}],
"grammars": [{
"language": "kos",
"scopeName": "source.kos",
"path": "./clients/vscode/kos-grammar/language-kos.json"
}],
"snippets": [{
"language": "kos",
"path": "clients/vscode/snippets/snippets.json"
}]
"languages": [
{
"id": "kos",
"aliases": [
"Kerbal Operating System",
"kos"
],
"extensions": [
".ks"
],
"configuration": "./kos.configuration.json"
}
],
"grammars": [
{
"language": "kos",
"scopeName": "source.kos",
"path": "./clients/vscode/kos-grammar/language-kos.json"
}
],
"snippets": [
{
"language": "kos",
"path": "clients/vscode/snippets/snippets.json"
}
]
},
"scripts": {
"vscode:prepublish": "cd clients/vscode && npm run update-vscode && cd ../.. && node build/clean.js && npm run prod && npm run test",
Expand Down Expand Up @@ -198,4 +205,4 @@
"webpack": "^4.30.0",
"webpack-cli": "^3.3.0"
}
}
}
10 changes: 7 additions & 3 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
kos-language-server is a language server for the Kerboscript language, part of Kerbal Operating System mod.

## Features
Currently the kos-language-server 0.5.1 implements the follow features
- Code completion for KSP global scope suffixs and keywords. Additional suggests local variables that are in scope of the cursor.
Currently the kos-language-server 0.6.0 implements the follow features
- Code completion
- Built in symbols and keywords
- local in scope symbols
- suffixes where the type can be resolved
- Document Symbols for quick navigation to properties in the document.
- Diagnostics (Validation) are pushed for all open documents
- syntax errors
Expand All @@ -17,4 +20,5 @@ Currently the kos-language-server 0.5.1 implements the follow features
- symbols that are shadowed by other symbols
- potentially unused symbols
- Go to definition for each symbol in the open documents. In some case can resolve functions in other scripts that have been run.
- On hover with experimentail type inference support
- On hover with experimentail type inference support
- Signature help for functions that can be correctly resolved
2 changes: 1 addition & 1 deletion server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "kos-language-server",
"description": "A Language server for Kerbal Operating System. A mod for Kerbal Space Program.",
"version": "0.5.1",
"version": "0.6.0",
"main": "out/server.js",
"types": "out/server.d.ts",
"files": [
"out/**/*"
],
"author": "John Chabot",
"license": "MIT",
"engines": {
Expand All @@ -25,8 +28,10 @@
"ksp",
"language-server"
],
"scripts": {},
"scripts": {
"prepublishOnly": "cd .. && npm run dev:server && npm run test"
},
"devDependencies": {
"@types/node": "^11.11.4"
}
}
}
Loading

0 comments on commit 4316986

Please sign in to comment.