-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issues covered: - vala-language-server#57 - vala-language-server#106 - vala-language-server#138 - vala-language-server#153
- Loading branch information
Showing
10 changed files
with
171 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build/ | ||
*.o | ||
subprojects/lstf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,5 +75,5 @@ if get_option('plugins') | |
endif | ||
|
||
if get_option('tests') | ||
subdir('test') | ||
subdir('tests') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[wrap-git] | ||
url = https://github.com/Prince781/lstf | ||
revision = head | ||
|
||
# [provide] | ||
# program_names = lstf |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// issue: vala-language-server#106 | ||
server_path = option('server-path'); | ||
|
||
let f = file(` | ||
void main() { | ||
print ("this is a string"); | ||
} | ||
`); | ||
|
||
project_files = [ f ]; | ||
|
||
|
||
|
||
await change(f, { | ||
range: { | ||
start: { line: 2, character: 29 }, | ||
end: { line: 2, character: 29 } | ||
}, | ||
text: '.' | ||
}); | ||
|
||
assert { | ||
isIncomplete: false, | ||
items: [] | ||
} <=> await completion(f, 2, 29); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// issue: vala-language-server#138 | ||
server_path = options('server-path'); | ||
|
||
let f = file(` | ||
interface Iface { | ||
public abstract void must_override(); | ||
} | ||
class Sas : Iface, Object { | ||
|
||
} | ||
`); | ||
|
||
project_files = [ f ]; | ||
|
||
|
||
|
||
await change(f, { | ||
range: { | ||
start: { line: 7, character: 5 }, | ||
end: { line: 7, character: 5 } | ||
}, | ||
text: '\n p' | ||
}); | ||
|
||
assert { | ||
isIncomplete: false, | ||
completions: [ | ||
{ | ||
label: 'public void must_override()', | ||
kind: CompletionItemKind.Method, | ||
insertText: 'public void must_override()$0', | ||
insertTextFormat: InsertTextFormat.Snippet | ||
} | ||
] | ||
} <=> await completion(f, 8, 6); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// issue: vala-language-server#153 | ||
server_path = option('server-path'); | ||
|
||
let f = file(` | ||
void foo (int arg1, int arg2) { | ||
} | ||
void main() { | ||
foo | ||
} | ||
`); | ||
|
||
project_files = [ f ]; | ||
|
||
|
||
|
||
await change(f, { | ||
range: { | ||
start: { line: 4, character: 7 }, | ||
end: { line: 4, character: 7 } | ||
}, | ||
text: ' (' | ||
}); | ||
|
||
assert { | ||
signatures: [ | ||
{ | ||
label: 'void foo(int arg1, int arg2)', | ||
parameters: [ { label: 'int arg1' } ] | ||
} | ||
], | ||
activeParameter: 0 | ||
} <=> await signatureHelp(f, 4, 9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// issue: vala-language-server#57 | ||
server_path = option('server-path'); | ||
|
||
let f = file(` | ||
interface Iface { | ||
public abstract void must_override1(); | ||
public abstract void must_override2(int arg1); | ||
public abstract void must_override3(int arg1, bool arg2); | ||
} | ||
class Sas : Iface, Object { | ||
|
||
} | ||
`); | ||
|
||
project_files = [ f ]; | ||
|
||
|
||
|
||
await change(f, { | ||
range: { | ||
start: { line: 7, character: 5 }, | ||
end: { line: 7, character: 5 } | ||
}, | ||
text: 'p' | ||
}); | ||
|
||
assert { | ||
isIncomplete: false, | ||
completions: [ | ||
{ | ||
label: 'public void must_override1()', | ||
kind: CompletionItemKind.Method, | ||
insertText: 'public void must_override1()$0', | ||
insertTextFormat: InsertTextFormat.Snippet, | ||
}, | ||
{ | ||
label: 'public void must_override2(int arg1)', | ||
kind: CompletionItemKind.Method, | ||
insertText: 'public void must_override2(int ${1:arg1})$0', | ||
insertTextFormat: InsertTextFormat.Snippet, | ||
}, | ||
{ | ||
label: 'public void must_override3(int arg1, bool arg2)', | ||
kind: CompletionItemKind.Method, | ||
insertText: 'public void must_override3(int ${1:arg1}, bool ${2:arg2})$0', | ||
insertTextFormat: InsertTextFormat.Snippet | ||
} | ||
] | ||
} <=> await completion(f, 7, 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
lstf = find_program('lstf', required: false) | ||
|
||
if not lstf.found() | ||
meson.override_find_program('lstf', subproject('lstf').get_variable('lstf')) | ||
lstf = find_program('lstf') | ||
endif | ||
|
||
test('57-suggest-overridable-symbols', lstf, | ||
workdir: meson.current_source_dir(), | ||
args: ['57-suggest-overridable-symbols.lstf', '--server-path', vls]) | ||
|
||
test('106-autocompletion-in-string-literals', lstf, | ||
workdir: meson.current_source_dir(), | ||
args: ['106-autocompletion-in-string-literals.lstf', '--server-path', vls]) | ||
|
||
test('138-suggest-overridable-symbols', lstf, | ||
workdir: meson.current_source_dir(), | ||
args: ['138-suggest-overridable-symbols.lstf', '--server-path', vls]) | ||
|
||
test('153-signaturehelp-shared-prefix', lstf, | ||
workdir: meson.current_source_dir(), | ||
args: ['153-signaturehelp-shared-prefix.lstf', '--server-path', vls]) |