-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved hover support: Structs, qualified calls and types, more info for modules #356
Commits on Sep 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f69137a - Browse repository at this point
Copy the full SHA f69137aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f6cc0f8 - Browse repository at this point
Copy the full SHA f6cc0f8View commit details -
Clean up
Lexical.RemoteControl.CodeIntelligence.Docs
This moves all of the fetching of docs, specs, types, and callbacks into `Lexical.RemoteControl.Modules`. Those functions now also operate on BEAM object code, which means the object code doesn't need to be repeatedly read from disk. The object code for a module also appears to be available immediately after calling `Code.ensure_compiled(module)`, which allows us to get rid of a timeout/loop that was waiting for it to be written to disk.
Configuration menu - View commit details
-
Copy full SHA for 2321c40 - Browse repository at this point
Copy the full SHA 2321c40View commit details -
Add
Lexical.Ast.is_call/2
guardThe correct guard logic for a call is quite verbose, as you must ensure that the call in a `{call, meta, args}` node isn't a special form, like `:__aliases__`.
Configuration menu - View commit details
-
Copy full SHA for c020e0d - Browse repository at this point
Copy the full SHA c020e0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 392ae41 - Browse repository at this point
Copy the full SHA 392ae41View commit details -
Include callbacks in module hover and fix
Ast
position findingThis commit currently pulls in a to-be-merged branch of `Sourceror` which contains fixes and changes around `Sourceror.get_range/1`. These are required in order to accurately determine the cursor position in an AST. An additional important change that this commit makes is to add the `unescape: false` option when converting strings to quoted forms. This is needed to determine whether newlines in strings were escaped literals (`\n`) or multi-line. Take this example: iex> Code.string_to_quoted!(~S|"foo\nbar"|) "foo\nbar" iex> Code.string_to_quoted!(~S|"foo ...> bar"|) "foo\nbar" iex> Code.string_to_quoted!(~S|"foo\nbar"|, unescape: false) "foo\\nbar" iex> Code.string_to_quoted!(~S|"foo ...> bar"|, unescape: false) "foo\nbar" Note that, with `unescape: false`, there is a difference between the strings.
Configuration menu - View commit details
-
Copy full SHA for 34e2e55 - Browse repository at this point
Copy the full SHA 34e2e55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0371755 - Browse repository at this point
Copy the full SHA 0371755View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0d8f57 - Browse repository at this point
Copy the full SHA d0d8f57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7517e85 - Browse repository at this point
Copy the full SHA 7517e85View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48d8848 - Browse repository at this point
Copy the full SHA 48d8848View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0815f4b - Browse repository at this point
Copy the full SHA 0815f4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 201f422 - Browse repository at this point
Copy the full SHA 201f422View commit details -
Configuration menu - View commit details
-
Copy full SHA for e74c754 - Browse repository at this point
Copy the full SHA e74c754View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b44721 - Browse repository at this point
Copy the full SHA 6b44721View commit details -
Configuration menu - View commit details
-
Copy full SHA for de36f18 - Browse repository at this point
Copy the full SHA de36f18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bfa9aa - Browse repository at this point
Copy the full SHA 9bfa9aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9592956 - Browse repository at this point
Copy the full SHA 9592956View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b68808 - Browse repository at this point
Copy the full SHA 3b68808View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5327e47 - Browse repository at this point
Copy the full SHA 5327e47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f2591f - Browse repository at this point
Copy the full SHA 4f2591fView commit details -
Improve
Lexical.Test.CursorSupport
APIThere were a few commonalities in all existing usage of `CursorSupport`: 1. In almost all usage, `cursor_position` and `strip_cursor` are used together. 2. In all usage, the returned `{line, column}` tuple could/should be a `Lexical.Document.Position`. 3. In many cases, the stripped text is then used to create a `Lexical.Document`. To address these, a higher level `pop_cursor/2` has been added, returning `{%Position{}, stripped_text}` by default. However, by using the `:as` or `:document` options, `pop_cursor/2` can return `{%Position{}, %Document{}}`, reducing a significant amount of boilerplate. This change also has the effect of reducing the number of tests requiring `PositionSupport`.
Configuration menu - View commit details
-
Copy full SHA for 1258b5e - Browse repository at this point
Copy the full SHA 1258b5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bafbd8 - Browse repository at this point
Copy the full SHA 0bafbd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 306b78e - Browse repository at this point
Copy the full SHA 306b78eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c899a6 - Browse repository at this point
Copy the full SHA 9c899a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 492ae8d - Browse repository at this point
Copy the full SHA 492ae8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a960337 - Browse repository at this point
Copy the full SHA a960337View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc0b963 - Browse repository at this point
Copy the full SHA bc0b963View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef6e777 - Browse repository at this point
Copy the full SHA ef6e777View commit details -
Configuration menu - View commit details
-
Copy full SHA for 916c211 - Browse repository at this point
Copy the full SHA 916c211View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfc3476 - Browse repository at this point
Copy the full SHA cfc3476View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb4d977 - Browse repository at this point
Copy the full SHA fb4d977View commit details -
When resolving a struct, always resolve full alias
When resolving modules, we'll exclude segments trailing the cursor so that you can walk up a module to better understand its context. For instance, for `My.|Nested.Module`, we resolve to `My.Nested`. Using the same behavior for structs makes less sense. If you're hovering a module being used as a struct, often only the full alias is actually a struct; the parents might not be. For instance, with `%My.|Nested.Struct{}`, resolving to `My.Nested` will not yield useful results. Because of this, the full alias is now always resolved in a struct context, so the above would resolve to the struct `My.Nested.Struct`.
Configuration menu - View commit details
-
Copy full SHA for bac214e - Browse repository at this point
Copy the full SHA bac214eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d46b08f - Browse repository at this point
Copy the full SHA d46b08fView commit details