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…”).
e.g. typing 'foo.?.bar(' crashes zls because it doesn't recognize ? as a
possible token as part of a function expression, and tries to call
getFieldAccessType with '.bar' instead.
The actual fix is the one line in src/signature_help.zig
getFieldAccessType was reworked to be more resilient to this type of
thing - the `undefined` value of `current_type.type.data` was being used
since it hit the `.period` branch first. This caused the crash.
* Added textDocument/foldingRange
* Added support for code regions
* Fixed warning message in foldingRangeHandler
Co-authored-by: LucaSas <sas.luca.alex@gmail.com>
* Allow tabs for the indentation added by the code actions feature (#673).
The previous implementation always assumed spaces for indentation.
But in stage2 code may contain tabs for indentation as well.
* Fix some edge cases, properly detect indentation(any amount of spaces) and move the indentation code inside `createDiscardText()`.
* adds reformatting to camelCase for function names
* removes useless +1 byte when allocating a string
* added some forgotten functionality
* fixes an issue caused by auto-fmt & changes action kind
* fixes several issues related to camelCase action
* fixes a bug if a fn name is all underscores
* sets camelCase action to quickfix
* sets camelCase action to sourceFixAll
* fixes a mischanged line
* 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