Commit Graph

39 Commits

Author SHA1 Message Date
Anton Myasnikov
7f6820c368
[LIGO-42] Support for document symbols
Problem: We want to be able to extract document symbols from some
ligo contract that are realised by @haskell-lsp@ client.

Solution: Implement `extractDocumentSymbols` and integrate it with
@haskell-lsp@.
2020-09-09 14:08:09 +03:00
Anton Myasnikov
283f41738d
[LIGO-40] Support for code hovering
Problem: We want to be able to show modal on hovering curson on
some specific declaration.

Solution: Add `hoverDecl` and integrate it with haskell-lsp client.
2020-09-08 18:44:11 +03:00
Anton Myasnikov
f0005c982a
[LIGO-39] Parse contracts in directory
Problem: We want to be able to parse whole directory for ligo
contracts for testing purposes.

Solution: Add `parseContracts` function that returns `ParsedContract`
data that ignores every file which is not a ligo contract.
2020-08-25 17:29:40 +03:00
Anton Myasnikov
fd862676b3
[LIGO-26] Support code folding capability
Problem: We want to support code folding for functions and types
in our lsp.

Solution: Add `foldingAST` function that produces an additional
list of ranges along with the given monad used in `haskell-lsp`
API to collect ranges that are consequently sent to server.
2020-08-25 13:39:47 +03:00
Kirill Andreev
28714af8cc
Additional fixes 2020-08-24 20:20:52 +04:00
Kirill Andreev
f2a3f0b579
Hopefully fix VFS loading (by falling back to loadByURI) 2020-08-24 20:10:00 +04:00
Kirill Andreev
5533b07270
Fix pattern defs for pascaligo 2020-08-24 14:17:53 +04:00
Anton Myasnikov
1828fd6d46
[LIGO-29] Integrate existing completion framework with haskell-lsp
Problem: Currently we have not integrated our completions with
haskell-lsp server so that we could use this completion from text
editor itself.

Solution: Add the corresponding requests for handling code completion.
2020-08-23 22:01:00 +03:00
Kirill Andreev
1c684a791c
Fix camligo not registering fun/lam args 2020-08-21 18:24:06 +04:00
Kirill Andreev
ba66f6e8e4
Make extension-aware parser entrypoint 2020-08-14 14:54:04 +04:00
Anton Myasnikov
a1a846b554
[LIGO-25] Add ReasonLIGO parser
Problem: With generated ReasonLIGO grammar we need to develop its
parser as well. With it we also need to restructure AST a bit
and add expressions that are used for ReasonLIGO specifically.

Solution: Add ReasonLIGO parser and some dummy examples of its
usage, adapt AST to it, rename LIGO to AST.
2020-08-11 13:33:26 +03:00
Kirill Andreev
38c32f01d4
Remove most warnings and renudant line in AST.Parser 2020-08-11 12:32:55 +04:00
Kirill Andreev
31274e1507
Tie all up 2020-08-11 12:32:54 +04:00
Kirill Andreev
6bd5d9ef84
Update AST.Scope to new framework 2020-08-11 12:32:53 +04:00
Kirill Andreev
b5e5bc25a1
[WIP] Conversion to descent-based parser 2020-08-11 12:32:52 +04:00
Kirill Andreev
58e5128142
Fix dying on broken code and handle errors in Main.hs 2020-08-11 12:32:10 +04:00
Kirill Andreev
20014a7926
Remove warnings, refactor FullEnv 2020-08-11 12:32:09 +04:00
Kirill Andreev
c26bc044ee
Separate the namespaces for search 2020-08-11 12:32:08 +04:00
Kirill Andreev
29bc1721d1
Load from VFS 2020-08-11 12:32:07 +04:00
Kirill Kuvshinov
bf6cc6ca16
[LIGO-18] Expose find ref and go to def via LSP
Problem: The current implementation of "Find references" and
"Go to definition" is not exposed via the LSP. We need to expose
them so that they are accessible from the client.

Solution: Add the necessary handlers, send response messages.
2020-08-11 12:32:07 +04:00
Kirill Andreev
24cc24b0d7
Prevent loop on recursive import 2020-08-11 12:32:06 +04:00
Kirill Andreev
b35a28853b
Add ability to recursively parse #included files 2020-08-11 12:32:06 +04:00
Kirill Andreev
583d7f8997
Clean the comments 2020-08-11 12:32:05 +04:00
Kirill Andreev
03b89bc5b7
Rewrite scope loader 2020-08-11 12:32:05 +04:00
Kirill Andreev
8d61a36918
[WIP] Implement a loader of Env from a ScopeTree 2020-08-11 12:32:05 +04:00
Kirill Andreev
9f124bf5af
Implement def/impl/type search 2020-08-11 12:32:04 +04:00
Kirill Andreev
9d81ecf353
Silence warnings 2020-08-11 12:32:02 +04:00
Kirill Andreev
9b95006a71
Make Error a Functor; move all Error stuff to Error.hs 2020-08-11 12:32:02 +04:00
Kirill Andreev
f3fbfb49a1
Add documentation 2020-08-11 12:32:01 +04:00
Kirill Andreev
95707100c2
Formatting Main.hs 2020-08-11 12:32:01 +04:00
Kirill Kuvshinov
9856476ebf
WIP: Add CTRL.run 2020-08-11 12:32:00 +04:00
Kirill Andreev
d380e46737
Convert to monotyped AST 2020-08-11 12:32:00 +04:00
Kirill Andreev
11fdc0afa1
Fix error msg interpolation 2020-08-11 12:31:59 +04:00
Kirill Andreev
67de82edec
[LIGO-6] Implement fallback scope system 2020-08-11 12:31:58 +04:00
Kirill Andreev
1536590edb
TMP 2020-08-11 12:31:58 +04:00
Kirill Andreev
e6299a50ff
Make parser recognise all src/tests/contracts 2020-08-11 12:31:54 +04:00
Kirill Andreev
0cec59988e
Prevent many/some from making last error-element 2020-08-11 12:31:51 +04:00
Kirill Andreev
00b4dabe36
Add Pretty instance to AST, Error and Range 2020-08-11 12:31:51 +04:00
Kirill Andreev
510cda6613
Initial commit of LIGO tooling 2020-08-11 12:31:49 +04:00