Commit graph

130 commits

Author SHA1 Message Date
dependabot[bot]
74f342648d
Bump languageserver-types from 0.53.0 to 0.53.1
Bumps [languageserver-types](https://github.com/gluon-lang/languageserver-types) from 0.53.0 to 0.53.1.
- [Release notes](https://github.com/gluon-lang/languageserver-types/releases)
- [Changelog](https://github.com/gluon-lang/languageserver-types/blob/master/release.toml)
- [Commits](https://github.com/gluon-lang/languageserver-types/compare/v0.53.0...v0.53.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-27 13:15:04 +00:00
bors[bot]
e422c2e2f4 Merge #325
325: implement translate_offset_with_edit r=matklad a=vemoo

- Implement `translate_offset_with_edit` to resolve #105 
- Add proptest impls for text, offsets and edits and use them in tests for `translate_offset_with_edit` and `LineIndex`
- Added benchmark for `translate_offset_with_edit`

Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-27 12:19:19 +00:00
bors[bot]
1d6dcef5c5 Merge #332
332: Struct types r=matklad a=flodiebold

Infer types for struct fields, and add basic field completions. There's also some code for enums, but I focused on getting structs working.

There's still ways to go before this becomes useful: There's no autoderef (or even reference types) and no inference for `self`, for example.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2018-12-27 10:08:34 +00:00
Aleksey Kladov
93996fecdc add cancelation module & cancelation backtraces 2018-12-27 13:03:32 +03:00
Aleksey Kladov
62c40b0e91 fix the test 2018-12-27 12:54:59 +03:00
Bernardo
e9c186e48a change to TextEdit to avoid allocation and sort
rename newline to step where applicable
2018-12-25 20:49:18 +01:00
Bernardo
6b2da4e547 use new translate_offset_with_edit for TryConvWith
doc comments
2018-12-25 20:06:49 +01:00
Bernardo
8c9df62c1c move translate_offset_with_edit to ra_editor 2018-12-25 19:59:02 +01:00
Bernardo
881c29192d initial newline translation working
todo:
cleanup, simplify
handle columns
2018-12-25 19:55:05 +01:00
Bernardo
d951979159 test translate_offset_with_edit against simple impl for single edits 2018-12-25 19:49:55 +01:00
Florian Diebold
e5a8089b08 Add . to trigger characters 2018-12-25 15:27:15 +01:00
Florian Diebold
ab0b63992b Implement basic completion for fields 2018-12-25 15:27:15 +01:00
Florian Diebold
4ff1618520 Do name resolution by namespace (types/values) 2018-12-25 15:16:42 +01:00
Aleksey Kladov
21293d0533 fix warning conversion 2018-12-25 02:07:30 +03:00
bors[bot]
b65ba8f1d6 Merge #326
326: resolved #324: remove unnecessary braces in use statement. r=matklad a=gfreezy

Add inspection for unnecessary braces in use statement

Co-authored-by: gfreezy <gfreezy@gmail.com>
2018-12-24 18:39:31 +00:00
gfreezy
29798c763c remove option from Diagnostic 2018-12-24 23:00:18 +08:00
bors[bot]
b052059f86 Merge #302
302: WIP: Support tracing lsp requests. r=DJMcNab a=DJMcNab

EDIT: We need to work out a better way to handle settings before this can be merged. Help wanted

TODO: Debug why decorations are sent even when highlightingOn is disabled
This makes the log volume so high its impossible to work with anyway.
(Continuation of #84 [#99 only disabled using it, not making sure we don't send it]).

These logs can be used in https://microsoft.github.io/language-server-protocol/inspector/

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-24 13:47:27 +00:00
gfreezy
346638c809 add serverity to vscode diagnostics 2018-12-24 00:39:33 +08:00
DJMcNab
a0e8538129 Improve comment 2018-12-23 11:10:12 +00:00
Aleksey Kladov
5c7e8f47a8 less chatty logging 2018-12-22 15:09:08 +03:00
Aleksey Kladov
90f20f8c53 less verbose debug 2018-12-22 12:38:24 +03:00
Aleksey Kladov
2639997973 log times 2018-12-22 11:53:20 +03:00
Aleksey Kladov
498e3a6846 binding icon 2018-12-22 02:24:59 +03:00
Aleksey Kladov
97cb463c9b moar icons 2018-12-22 02:20:14 +03:00
Aleksey Kladov
238b52358d more icons 2018-12-22 02:03:18 +03:00
Aleksey Kladov
f1f2804c71 move completion items to conv 2018-12-22 01:59:32 +03:00
Aleksey Kladov
2351308d92 remove explicit serde_derive 2018-12-21 22:39:59 +03:00
DJMcNab
380733d6d0 Undo the previous mistaken change and make publish_decorations optional
See https://github.com/Microsoft/language-server-protocol/issues/567
for motivations to not require `InitializationOptions`

TODO: Check if there are any other protocol extensions
which should be disabled if not implemented on the client
2018-12-21 17:00:31 +00:00
Aleksey Kladov
4092b8d0b5 make compleion item details private 2018-12-21 15:19:46 +03:00
Aleksey Kladov
b5b44659a4 edits use source-root API 2018-12-21 12:18:14 +03:00
Aleksey Kladov
0063f03e86 hide atom edits a bit 2018-12-21 11:52:32 +03:00
Aleksey Kladov
aa628f4749 fix SourceFileEdit name 2018-12-21 11:15:23 +03:00
Aleksey Kladov
b7d8bf1262 tweak canceled message 2018-12-21 11:08:43 +03:00
Aleksey Kladov
23b040962f fold curly blocks 2018-12-20 22:43:06 +03:00
DJMcNab
70e5fb98a0 Disable highlighting if disabled
This isn't working properly because we don't dynamically disable or enable it

TODO: work out why highlighting can be enabled mid session.

TODO: Improve settings handling
2018-12-20 12:16:44 +00:00
bors[bot]
d8c6b8d999 Merge #297
297: Use ContentModified error code r=matklad a=matklad

25679c2e4b

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-20 09:23:27 +00:00
Aleksey Kladov
b2f2621c17 Use ContentModified error code
25679c2e4b
2018-12-20 12:20:28 +03:00
Aleksey Kladov
2fe41574a1 fix tests 2018-12-20 12:15:38 +03:00
Aleksey Kladov
7b6bafa631 fix syc 2018-12-20 12:15:38 +03:00
Aleksey Kladov
a5ef8ad05b swtich lsp server to vfs 2018-12-20 12:15:38 +03:00
Aleksey Kladov
6a755ed83a remove more imports 2018-12-20 12:15:38 +03:00
Aleksey Kladov
a422d480a1 implement vfs events handling 2018-12-20 12:15:38 +03:00
Aleksey Kladov
2ae05a6163 vfs crate scaffold 2018-12-20 12:15:23 +03:00
Aleksey Kladov
7509901fa0 wip 2018-12-20 12:15:23 +03:00
Jeremy A. Kolb
93cf39d968 Bump languageserver-types to 0.53.0 to support LSP 3.14.0
See: https://microsoft.github.io/language-server-protocol/specification#version_3_14_0
2018-12-19 17:32:44 -05:00
Aleksey Kladov
193992fd14 move thread worker to a separate crate 2018-12-18 12:52:17 +03:00
Andrew Chin
8b1e667077 By default, log only to stderr, and not to disk.
This fixes a common problem when running under VS Code, the user
doesn't have permissions to create a `log` directory in the CWD.

The old behavior can be re-enabled by setting RA_INTERNAL_MODE=1
2018-12-17 17:22:30 -05:00
Bernardo
0527e3b283 rename Edit to TextEdit and AtomEdit to AtomTextEdit 2018-12-11 19:07:17 +01:00
Bernardo
7344d28768 extract AtomEdit and Edit into new ra_text_edit crate 2018-12-10 22:09:12 +01:00
Aleksey Kladov
b9c17a6001 Answer canceled requests 2018-12-09 14:43:02 +03:00