Commit 291d197
Address PR review: reuse parsed AST, hoist neutralize, filter fix
- document_symbols: reuse the AST `Parser.parse_immediate/2` already produced on
`Parser.Context.ast` instead of reparsing the raw source with toxic2. That
reparse was an extra parse for .ex/.exs and nonsensical for .eex/.html-eex
(which are EEx-derived Code ASTs, not toxic2 trees).
- selection_ranges: neutralize the toxic2 error nodes once in `selection_ranges/3`
and pass the neutralized AST to `delimiter_pair_ranges/4` and
`ast_node_ranges/4`, instead of re-walking/neutralizing the whole tree once per
cursor position.
- completion_engine: compute the loaded/application module-name list once per
struct-module filter pass rather than per candidate (`has_struct_submodule?`
was O(N^2)). Mirrors the elixir_sense copy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XRd15BX6wBpZ8ThaNSo2321 parent f8454b3 commit 291d197
3 files changed
Lines changed: 44 additions & 43 deletions
File tree
- apps
- elixir_ls_utils/lib
- language_server/lib/language_server/providers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
725 | 730 | | |
726 | 731 | | |
727 | | - | |
| 732 | + | |
728 | 733 | | |
729 | 734 | | |
730 | 735 | | |
731 | 736 | | |
732 | 737 | | |
733 | 738 | | |
734 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
735 | 754 | | |
736 | | - | |
| 755 | + | |
737 | 756 | | |
738 | 757 | | |
739 | 758 | | |
| |||
747 | 766 | | |
748 | 767 | | |
749 | 768 | | |
750 | | - | |
| 769 | + | |
751 | 770 | | |
752 | 771 | | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | 772 | | |
769 | | - | |
| 773 | + | |
770 | 774 | | |
771 | 775 | | |
772 | 776 | | |
773 | | - | |
774 | 777 | | |
775 | 778 | | |
776 | 779 | | |
| |||
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
Lines changed: 12 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
64 | | - | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
| 158 | + | |
153 | 159 | | |
154 | | - | |
155 | | - | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
414 | 418 | | |
415 | 419 | | |
416 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
417 | 424 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| |||
0 commit comments