Commit graph

10 commits

Author SHA1 Message Date
Tyler Wilding bc40fc5d2f
util/file: cleanup log initialization and some file-util functions (#2299)
Fixes both issues mentioned in #2297
2023-03-01 17:52:33 -05:00
Tyler Wilding 50076537b7
d/jak2: finish sidekick, target-carry and battle. Close to finishing target-death and warp-gate (#1990) 2022-10-29 18:27:31 -04:00
Tyler Wilding 7dd716ded5
vscode: add snippets for supported ;; og:... comments (#1963)
Better documentation on what is supported / makes it faster to type them
without making mistakes.


![image](https://user-images.githubusercontent.com/13153231/195737915-1ed0fc15-e91d-4b35-a7df-0c31ebdc07d1.png)
2022-10-14 19:10:57 -04:00
Tyler Wilding d95ff2d2fb
lsp: improve LSP IR2 hovers (#1891)
Some new hover features:

docstrings (`@param/@return` syntax is not yet supported, nor is a
syntax-highlighted preview, will do later)

![image](https://user-images.githubusercontent.com/13153231/190830490-d0ef774c-e7e5-4bb9-8007-b366be0f491e.png)

better MIPs instruction descriptions

![image](https://user-images.githubusercontent.com/13153231/190830507-0bb35c13-7e88-4b74-a63b-b7fb3587b82e.png)

numeric hovers convert to different bases / tell you the OpenGOAL method
id (i can't tell you the amount of times ive done -16 / 4 manually
myself...)

![image](https://user-images.githubusercontent.com/13153231/190830674-f66ed15a-f983-48ff-b251-259374dfbcac.png)

Closes https://github.com/open-goal/opengoal-vscode/issues/33
Closes https://github.com/open-goal/opengoal-vscode/issues/31
Related to https://github.com/open-goal/opengoal-vscode/issues/29
2022-09-16 20:28:44 -04:00
Tyler Wilding 4e3c44294e
lsp: re-process all-types file when it changes (#1889)
Found the reason why this wasn't happening -- the path included by the
decompiler isn't a proper URL encoded URI -- so I have to convert it
appropriately so when vscode sends it's "this file with this URI has
changed" event it actually matches the tracked all-types file.

This will make jump-to-defs not drift as the file changes, and new
uncommented symbols will actually get picked up
2022-09-16 20:28:09 -04:00
Tyler Wilding 71871595da
lsp: re-analyze IR2 files when they change (#1841)
* lsp: re-analyze IR2 files when they change

* tests: update ref tests
2022-09-05 17:45:41 -04:00
Tyler Wilding 090b2984a2
decomp: add docstring support to relevant places in all-types (#1753)
* decomp: add `docstring` support to relevant places in `all-types`

* decomp: output method docstring into the `defmethod` instead

* goalc: handle docstrings in `define[-extern]` (gracefully ignore for now)

* decomp: output docstrings for bitfield deftypes too

* goalc: fix `defenum` parsing when coming from the compiler (no symbol metadata to store to)

* lsp/tests: fix ups

* lint: formatting

* goalc: handle edge-case of defining a string constant

* cleanup leftovers, fix codacy issues, rename struct
2022-08-23 00:32:07 -04:00
Tyler Wilding b3e77c673f
decomp/lsp: Differentiate warnings from likely/definite errors (#1725)
* decomp: differentiate potential false positive warnings from likely/certain failures

* lsp: handle IR2 errors

* decomp: downgrade an expr building warning as often expressions build fine

* tests: update reference tests since comments aren't ignored

* decomp: simplify warnings interface

* tests: update ref tests
2022-08-06 11:52:36 -04:00
Tyler Wilding d1ad6c3817
utf8: fix locale mis-handling on linux (#1698)
* utf8: fix locale mis-handling on linux

* lint: formatting
2022-07-23 10:30:23 -04:00
Tyler Wilding 01c70368e3
LSP: initial LSP implementation for IR files to assist with decompilation (#1647)
* lsp: json-rpc example is working, a decent place to start...

* lsp: vendor library

* lsp: cleanup and time to get started

* lsp: commit what i got so far

* lsp: example `initialize` payload

* lsp: switch to `stdio`

* stash

* modularize the lsp implementation

* lsp: implement first actual LSP feature - function names in outline

* lsp: produce document diagnostics

* lsp: remove unused third-party lib

* lsp: support hovering MIPS instructions in IR files

* lsp: basic go-to all-types definition

* stash

* lsp: cleanup code, just need to add it to the release artifacts

* fix some project configuration

* fix linux build

* lsp: add lsp to PR artifacts and release assets

* lsp: address feedback
2022-07-18 18:26:57 -04:00