Techatrix
61c0981294
Use zig-lsp-codegen ( #850 )
...
* add lsp.zig
* change references from types.zig to lsp.zig
* remove types.zig and requests.zig
* add tres as a submodule
* transition codebase from types.zig to lsp.zig
* update lsp.zig
* completely overhaul message handler
* fix memory errors
* partially transition tests to lsp.zig
* update lsp.zig
* more test fixes
* disable failing tests
* fix message handling bugs
* fix remaining tests
* access correct union in diff.applyTextEdits
* more message handler fixes
* run zig fmt
* update tres submodule
* fix memory access to freed memory
* simplify initialize_msg for testing
* check if publishDiagnostics is supported
2022-12-27 01:47:57 -05:00
Techatrix
03e50066a1
Merge branch 'master' into intern-pool
2022-12-27 01:53:55 +01:00
Auguste Rame
c355a54dd1
Fix raw, responseless returns on willSaveWaitUntil ( #833 )
...
* Fix raw, responseless returns on willSaveWaitUntil
* Make this code pretty
2022-12-19 16:01:08 -05:00
Steven Kabbes
427620742a
track builtin API changes from zig/master
...
see: https://github.com/ziglang/zig/pull/13930
In this PR, std.builtin.Type.field_type is renamed to type
And there is discussion that all Enum layouts are .Auto
2022-12-18 12:45:36 -07:00
Techatrix
375daba743
improve behavior if zig_exe_path is not set ( #830 )
2022-12-17 03:03:05 -05:00
Techatrix
d679b19676
remove old stage1 code artifacts ( #831 )
2022-12-17 03:02:31 -05:00
Techatrix
e1973afafc
fix cimport duplicate messages & crash ( #828 )
2022-12-16 15:24:03 -05:00
Techatrix
c39a4eb2ab
simplify & refactor analysis code ( #823 )
2022-12-15 13:03:09 -05:00
Auguste Rame
0ab34abc0f
Bug stream fixes ( #818 )
...
* Fix glaring inlay hint issue; thanks for the report Nameless
* Fix label references; closes #728
2022-12-13 22:07:36 -05:00
Lee Cannon
878464ea72
Merge pull request #816 from alexnask/ascii-deprecated-removed
...
Use new versions of now removed std.ascii declarations
2022-12-12 00:18:23 +00:00
Techarix
748cd7d6a9
Merge remote-tracking branch 'origin/master' into intern-pool
2022-12-11 19:02:24 +01:00
Techatrix
1ae341850e
automatically generate config associated files ( #813 )
2022-12-11 13:10:48 +02:00
Alexandros Naskos
3cac23f8a1
Fix references to now removed, previously deprecated std.ascii declarations
2022-12-10 23:21:55 +02:00
Alex Kladov
cfb0b023ad
fix #801 , IOOB in foldingRanges ( #802 )
...
* Add smoke tests for folding ranges
* fix index out of bounds in foldingRanges
closes #801
For invalid syntax trees, zig's parser seems to return bogus data where
startToken > endToken, which then causes everything else to crash.
This seems like a deeper issue, which needs to be fixed "properly", but
let's just paper over it here.
2022-12-03 17:23:13 +02:00
Auguste Rame
6ab2c68355
Allocgate 2.0 slain ( #791 )
...
* Allocgate 2.0 slain
* Tests now compile, but they fail
* Temporary bruteforce
2022-12-02 15:14:58 -05:00
Techatrix
4f180712bb
add initial intern pool implementation
2022-12-02 00:08:45 +01:00
Techatrix
784047d952
add a dummy cancelRequest implementation ( #790 )
2022-12-01 04:00:08 -05:00
Alexandros Naskos
56a65f42bf
Added tuple type support, fixed compilation with zig master branch ( #786 )
...
* Added tuple type support, fixed compilation with zig master branch
* Removed unneeded comment
* Bumped up minimum zig version required to build zls
2022-11-26 12:22:16 -05:00
Aleksey Kladov
8731a37d1f
textDocument/selectionRange
...
closes #777
2022-11-26 11:31:46 +00:00
Techatrix
aa14772cfe
use textDocument/willSaveWaitUntil for autofix ( #780 )
2022-11-25 16:32:08 -05:00
Techatrix
1ced17266c
set TextDocumentSync to Incremental ( #776 )
2022-11-22 21:05:29 -05:00
nullptrdevs
4794f1e8d9
Disable label references until #728 is resolved
2022-11-22 02:08:43 -08:00
Techatrix
f09ffb63db
don't format files with syntax errors ( #766 )
...
* don't format files with syntax errors
* Remove showMessage
Co-authored-by: Auguste Rame <19855629+SuperAuguste@users.noreply.github.com>
2022-11-18 18:49:59 -05:00
Auguste Rame
355d56376f
Merge pull request #724 from zigtools/comptime-bebe-steps
...
Implement comptime interpreter
2022-11-16 18:13:35 -05:00
Techatrix
28be9a4cc7
report actual zls version in initialize response ( #759 )
2022-11-16 17:58:37 -05:00
Techatrix
662b560861
format with Ast.render
instead of zig fmt
( #755 )
2022-11-16 17:33:15 -05:00
Ingo Lohmar
e98aea61ea
do not panic on error response to workspace/configuration ( #747 )
2022-11-13 17:28:00 -05:00
Auguste Rame
c8dffc1f9b
Some comptime interpreter fixes
2022-11-10 20:51:02 -05:00
Nick Cernis
e58bddd769
Improve Zig version mismatch error ( #744 )
...
Improves the server message we send if the system Zig version is older
than the Zig version that ZLS was built with:
- Correct typo (“build with” → “built with”).
- Show versions so users know which one they need to update to.
- Suggest step needed to fix the error (“Update Zig…”).
2022-11-09 23:13:35 -05:00
Auguste Rame
b91a193d04
We can interpret std now because of proper tree shaking!
2022-11-08 14:42:40 -05:00
Auguste Rame
d2e166bb0b
Some builtins, rudimentary hacky diagnostics; need to nerf global evaluation
2022-11-08 14:37:14 -05:00
Auguste Rame
599c134593
Imports, cross-boundary resolution; can import std but dies on missing builtins / lang features
2022-11-08 14:37:13 -05:00
Auguste Rame
da00751726
Field access, function calls based on function value
2022-11-08 14:37:13 -05:00
Auguste Rame
779c3c0710
Hacky mess but it works (only if your function is the first root decl tho :P)
2022-11-08 14:37:13 -05:00
musi-musi
2ae113ddcf
fixed jrpc config treating empty strings as non null ( #727 )
2022-10-30 00:30:03 -04:00
InKryption
51a7ae2274
Fix region folding off-by-one error ( #726 )
2022-10-28 16:59:33 -04:00
InKryption
7fe62147a3
Improve folding regions ( #720 )
2022-10-28 14:35:22 -04:00
Luca Sas
2a17590bf4
Added textDocument/foldingRange ( #718 )
...
* Added textDocument/foldingRange
* Added support for code regions
* Fixed warning message in foldingRangeHandler
Co-authored-by: LucaSas <sas.luca.alex@gmail.com>
2022-10-25 10:35:16 -04:00
Auguste Rame
5ddbf24d11
Fix diagnostics ( #716 )
2022-10-21 12:24:26 -04:00
Techatrix
a0723dbffd
add missing semicolon
2022-10-20 18:25:06 +02:00
Techatrix
7c54ded487
Merge pull request #702 from Techatrix/document-store-refactor
...
DocumentStore refactor
2022-10-18 11:40:14 +02:00
Techatrix
89be8e0211
return const Handle from getHandle
2022-10-17 20:33:37 +02:00
ryuukk
472e28ad5c
builtins also get their detailed label ( #706 )
2022-10-14 12:24:22 -04:00
Techatrix
2bc83741fb
update cimport diagnostic collection
2022-10-10 19:16:23 +02:00
Techatrix
d6ef330984
Merge branch 'master' into document-store-refactor
2022-10-10 19:07:15 +02:00
nullptrdevs
19fd17ff76
ability to highlight global variables ( #655 )
...
anything declared with "var" at the root level
2022-10-10 01:13:15 -04:00
Techatrix
4f27f075d7
revert timer removal
2022-10-09 00:38:05 +02:00
Techatrix
5d748767e9
mark DocumentStore & Handle const
2022-10-05 13:40:11 +02:00
Techatrix
dab7eb81cc
reimplement document store
2022-10-05 13:23:38 +02:00
Techatrix
b9a291b944
remove requests.Configuration ( #696 )
2022-09-30 20:47:40 -04:00
Techatrix
a9a1fad13e
remove types.TextDocument ( #693 )
...
* remove types.TextDocument
* resolve compile errors because of previous merge
2022-09-30 20:45:45 -04:00
Techatrix
51356517a9
Self hosted fixes ( #682 )
...
* fix compiler errors when using self-hosted
* move parameters into builder struct
* simplify code when using self hosted
* fix stage2 error `cast discards const qualifier`
* correctly return after finding method
* fix position context tests on self hosted
* remove unnecessary comptime in position context tests
2022-09-30 00:04:55 -04:00
Techatrix
d030dd0993
improve conformance to the lsp ( #687 )
2022-09-30 00:04:27 -04:00
Techatrix
cf73771739
simplify Server.zig ( #681 )
...
* simplify Server.zig
* remove wrong default value in Server.zig
2022-09-29 14:01:38 -04:00
Techatrix
e3803d760f
show a warning when using an old zig version ( #677 )
...
* show a warning when using an old zig version
* use builtin zig version
2022-09-28 19:30:26 -04:00
Techatrix
8eeae02865
unmanage diff.zig ( #680 )
2022-09-28 12:13:55 -04:00
Techatrix
f3889cfe8d
explicit request didSave notification from client ( #676 )
2022-09-28 12:07:24 -04:00
Techatrix
8edaa7f506
Merge branch 'master' into dev
2022-09-26 18:41:07 +02:00
Techatrix
0d848a71ec
Merge pull request #674 from Techatrix/snippets
...
Add keyword Snippets for autocomplete
2022-09-25 17:27:46 +00:00
Techatrix
00be49c595
add keyword snippets for autocomplete
2022-09-25 02:45:02 +02:00
Techatrix
8cf5c82261
implement autofix
2022-09-25 01:05:12 +02:00
Techatrix
1b64db8a4c
implement textDocument/codeAction
2022-09-25 01:04:29 +02:00
Techatrix
ca58cbb3f3
make types.Diagnostic correctly parseable
2022-09-25 01:01:31 +02:00
Techatrix
548ced259f
refactor ast-check into separate function with small changes
2022-09-24 21:54:31 +02:00
Techatrix
a8dcb89a81
refactor getting the first & last parameter token into a function
2022-09-24 21:26:55 +02:00
Techatrix
6ff19e8b5f
analysis: store function node in parameter declaration
2022-09-24 21:25:32 +02:00
Techatrix
869d27c75d
simplify completionHandler, gotoHandler, hoverHandler and their callees
2022-09-22 20:09:16 +02:00
Techatrix
8a77007872
don't use inline for iterating builtin data
2022-09-22 05:39:04 +02:00
Techatrix
e9e9571fe5
avoid config copy for document store ( #669 )
2022-09-21 21:31:48 -04:00
Techatrix
cf52fd8190
report cImport failure using textDocument/publishDiagnostics
2022-09-19 19:53:41 +02:00
Techatrix
b76710ea5f
References improvements ( #653 )
2022-09-16 01:11:39 +00:00
Techatrix
e28549fa7d
Completely overhaul offsets.zig ( #643 )
...
* completely overhaul offsets.zig
2022-09-16 00:33:49 +00:00
Lee Cannon
bd6f60e451
update for zig master ( #651 )
2022-09-13 16:54:28 -04:00
Techatrix
e6238e3354
improve width of log prefix ( #649 )
2022-09-13 16:12:32 -04:00
Techatrix
1a93ec2234
Merge pull request #647 from Techatrix/logging-improvements
...
Only globally log to stderr
2022-09-12 11:42:46 +00:00
Techatrix
85135d36ae
refactor builtin_completions
2022-09-12 00:50:35 +02:00
Techatrix
ff779049f1
only globally log to stderr
2022-09-11 23:48:15 +02:00
Techatrix
7730c7715b
respect document encoding
2022-09-05 22:49:50 +02:00
Techatrix
925cc3fee9
reconstruct diagnostic range end of ast-gen
2022-09-05 20:41:40 +02:00
Auguste Rame
246fee8a1b
ast-check fixes
2022-09-01 09:26:58 -04:00
Auguste Rame
57a35a7bc8
ast-check for zls!
2022-08-31 20:52:55 -04:00
Techatrix
605c4e2988
fix textDocument/rename
2022-08-29 21:28:05 +02:00
nullptrdevs
b7a5ab5f52
fix: fix warning emitted incorrectly when using ..
2022-08-25 16:13:58 -07:00
Lee Cannon
a18ec394f1
Merge pull request #602 from Techatrix/unmanage-code
...
unmanage all the code
2022-08-23 21:21:08 +01:00
Lee Cannon
163409f48f
Merge pull request #579 from jefftime/master
...
Text format to return edited ranges instead of entire document
2022-08-23 21:20:49 +01:00
Techatrix
dc3199cffa
unmanage all the code
2022-08-23 12:44:26 +02:00
jefftime
5804454334
Merge branch 'zigtools:master' into master
2022-08-22 20:18:02 -04:00
nullptrdevs
4d0ab8b1aa
Update Server.zig
2022-08-22 10:49:15 -07:00
nullptrdevs
2c5ae262f7
fix: fix memory leaks related to updating config variables
...
adds an edge case in analysis.makeScopeInternal to prevent
leaking memory when adding duplicate container fields w/ name "other"
2022-08-21 17:11:50 -07:00
Techatrix
c6892eaafc
Merge branch 'zigtools:master' into cimport-support
2022-08-21 08:53:06 +00:00
InKryption
63d84855a5
Improve unused variable report accuracy
2022-08-19 15:28:38 +02:00
InKryption
249685e4c5
2 minor tidy-ups + fix for over-eager unused parameter error in function types
2022-08-19 00:31:41 +02:00
Techatrix
1859afd4c5
emit JSON formatted packages & include dirs in build_runner.zig
2022-08-18 22:56:03 +02:00
Techatrix
29690f4e0b
Refactor Ast helper functions
2022-08-18 00:52:21 +02:00
Lee Cannon
673b4b3505
trigger completion after ]
2022-08-14 22:45:05 +01:00
Jeffery Stager
1fbf1c5427
Minor cleanup in formatting function
2022-08-13 17:23:39 -04:00
Jeffery Stager
254353a9f4
Add fallback to old behavior on diff failure
2022-08-13 17:16:53 -04:00
Jeffery Stager
4e33e1d61f
Working diff for formatting
2022-08-10 22:47:33 -04:00
Gregory Anders
c4f3cd0efa
Only return highlights for symbols in current document
...
This seems to only occur when highlighting "field access" symbols, e.g.
"bar" in a statement such as `foo.bar`. This is because the
`symbolReferencesInternal` function finds the reference to the field in
the container even when the container is not in the current document.
2022-08-10 16:03:00 -06:00
Techatrix
c9d41650da
fix 'Cannot resolve std library import'
2022-08-05 13:01:39 +02:00