Commit Graph

247 Commits

Author SHA1 Message Date
Alexandros Naskos
f382a1b22d
Better import handling 2021-03-30 15:41:59 +03:00
Jonathan Hähne
c7158f7625 Remove checks again 2021-03-30 11:23:09 +02:00
Jonathan Hähne
83f153e87e Actually make it build (sem-token support has regressed previously!) 2021-03-30 11:07:29 +02:00
Jonathan Hähne
aab9ca18f2 Fix some crashes & find all @imports
If there are parse errors, an AST can contain uninitialized nodes.
Walking the tree in this case can lead to horribly nasty crashes.
2021-03-30 10:33:21 +02:00
Alexandros Naskos
b417e64e10
Do not show tests in container completions 2021-03-29 15:41:58 +03:00
Alexandros Naskos
e770e2bead
Fixed regression from latest commit 2021-03-29 15:35:14 +03:00
Alexandros Naskos
962327425d
Fixed enum completion generation 2021-03-29 14:57:16 +03:00
Alexandros Naskos
4e753338af
Added error set and enum completion deduplication 2021-03-29 14:02:58 +03:00
Alexandros Naskos
360c437d6a
Some style fixes in analysis.zig 2021-03-29 13:01:24 +03:00
Alexandros Naskos
81500697db
Fixed crash in makeScopeInternal 2021-03-29 12:40:52 +03:00
Alexandros Naskos
2d168ed63e
Fixed error completion generation when making document scopes 2021-03-29 12:28:52 +03:00
Alexandros Naskos
48b5ca5385
Always send an insertText field in completion items 2021-03-28 17:02:48 +03:00
Alexandros Naskos
3e300e4d74
Added our own ifFull implementation, fixes some crashes 2021-03-26 21:46:49 +02:00
Alexandros Naskos
06518778c1
Removed comment preprocessing code from the semantic tokens gap highlighter,
Fixed various comment semantic highlighting issues.
Refactored some minor parts of the analysis code.
2021-03-26 21:04:51 +02:00
Alexandros Naskos
55ad1028fc
Fixed crash in analysis of variable declaration aliases 2021-03-21 02:31:32 +02:00
Luuk de Gram
472033a845
Improve token location stability 2021-03-13 12:22:19 +01:00
Luuk de Gram
0d85668ce4
Do not offer completion for function labels 2021-03-12 11:56:51 +01:00
Luuk de Gram
7a2cd418a8
Scope fixes + semantic token colors:
- Creates a scope for errdefer and adds the payload as a declaration
  (Previously lhs was a token index meaning we had an out of bounds error due too high of an integer)
- Semantic highlighting corrected for error payloads in loops/ifs and errdefers
2021-03-11 20:45:05 +01:00
Luuk de Gram
ef1b3c95f1
Completion fixes:
- Fixes namespace completions. Uses pointers instead of indices to ensure they are unique
- Adds .ptr completion to slices and `*` to many pointer
2021-03-11 13:59:09 +01:00
Luuk de Gram
094b31be48
Fix namespaces in containers 2021-03-10 17:04:14 +01:00
Luuk de Gram
85937d48ca
Semantic token + scope fixes:
- Highlights pipes of loops/elses payloads correctly
- New ast structure counts last token as the variable itself and not the '}' so change scope checking to '<=' instead of '<'
2021-03-10 10:02:07 +01:00
Luuk de Gram
3ac6c82b9a
Completion for index label in for loops and fix for function snippets 2021-03-09 19:53:59 +01:00
Luuk de Gram
858f3cb282
Completion of unions in switches and its tags 2021-03-09 12:35:56 +01:00
Luuk de Gram
20cb0b7307
Fix off by one scope end index 2021-03-08 20:31:02 +01:00
Luuk de Gram
43ebfc7300
Work on completion for unwrapped slices/optionals in loops/ifs 2021-03-08 19:46:23 +01:00
Luuk de Gram
fd6b94bcc9
Fixes multiple small bugs:
- Correct completion based on scope
 - Semantic tokens for while/if/else/for keywords
 - Fix crash on import path
2021-03-07 21:54:54 +01:00
Luuk de Gram
53c37765c0
Fix inferred error set return types 2021-03-07 18:45:37 +01:00
Luuk de Gram
e2f4bbf2f3
Implement semantic tokens for regular comments 2021-03-07 14:51:47 +01:00
Luuk de Gram
ac8a00342e
All functionalities implemented. Also implemented ability to skip searching for references through std 2021-03-06 20:55:59 +01:00
Luuk de Gram
3d8a9732fc
Calculate correct token locations and ensure all semantic highlighting matches 2021-03-05 22:38:42 +01:00
Luuk de Gram
acc45b4efe
Use the correct tree to display semantic tokens 2021-03-04 22:53:54 +01:00
Luuk de Gram
9224bbd4dc
Implement all of the semantic tokens 2021-03-04 22:30:25 +01:00
Luuk de Gram
08075a1261
Start fixing semantic tokens 2021-03-04 16:14:30 +01:00
Luuk de Gram
a80e9b262e
Implement usingnamespace and fix function snippets 2021-03-04 13:26:11 +01:00
Luuk de Gram
7495aab28b
Start implementing usingnamespace 2021-03-03 21:02:31 +01:00
Luuk de Gram
d7ccf6a3c2
References working for current file 2021-03-03 20:38:52 +01:00
Luuk de Gram
a699dab2f7
Referencing fixes and more 2021-03-03 16:34:24 +01:00
Luuk de Gram
92adeb8826
Completion fixes 2021-03-02 22:01:13 +01:00
Luuk de Gram
1dd39914ec
Hovering fixes 2021-03-02 15:32:38 +01:00
Luuk de Gram
c8a2467fac
Compiles without errors. Still needs improvement 2021-03-01 22:18:38 +01:00
Luuk de Gram
ada0d13ba9
Fix symbolReferencesInternal 2021-03-01 19:34:28 +01:00
Luuk de Gram
e82ea30e6f
Last fixes in src/analysis.zig 2021-03-01 16:30:43 +01:00
Luuk de Gram
4645638434
Fixes and completions 2021-03-01 16:02:24 +01:00
Luuk de Gram
1c9da7053c
More type resolving 2021-03-01 14:32:19 +01:00
Luuk de Gram
b651a79380
Type resolving fixes 2021-02-28 21:57:15 +01:00
Luuk de Gram
96fcac89a4
Complete resolveTypeOfNodeInternal 2021-02-28 20:37:21 +01:00
Luuk de Gram
b175a01fce
Progress in resolveTypeOfNodeInternal 2021-02-28 17:42:34 +01:00
Luuk de Gram
709c1a70fd
Implement makeScopeInternal logic 2021-02-28 13:09:10 +01:00
Luuk de Gram
5f5d6ce4ea
Progress in makeScopeInternal 2021-02-27 21:55:39 +01:00
Luuk de Gram
72605c7549
A lot of fixes 2021-02-27 16:38:06 +01:00