zls/tests/utility
Aleksey Kladov ea05916e69 Goto definition works when the cursor is at the start of the identifier.
Before, the code lexed only a prefix of the line up to cursor position.
Now, we lex the entire line, and do look at the token just after the
cursor.

This subtly changes sematncih of `getPostionContext`: now it is becomes
oblivious of the _exact_ position of the cursor and returns the whole
token at cursor's position.

I believe this is semantically right approach -- _most_ of the callsite
should not worry at all about such details. Something like completion
_might_ want to know more, but it's better to make that call site's
problem.

It might be the case that some existing code relies on the past
behavior. It's hard to tell though -- we don't have a lot of tests for
_features_, and changes to unit-tests don't explain if the changes are
meaningful for user-observable behavior or not.

In general, for LSP-shaped thing, I feel that the bulk of testing should
be focused on end-to-end behaviors....
2023-01-21 18:31:26 +00:00
..
offsets.zig Use zig-lsp-codegen (#850) 2022-12-27 01:47:57 -05:00
position_context.zig Goto definition works when the cursor is at the start of the identifier. 2023-01-21 18:31:26 +00:00
uri.zig Allocator.resize() does not adjust size of string allocated for URI to file path conversion (#806) 2022-12-04 16:44:22 -05:00