~sbaildon/lexical

486d80d8 — Steve Cohen a month ago
Fixing merge error
f7f7693d — Steve Cohen a month ago
Document Symbols support (#652)

* Document Symbols support

Added document symbols, which supports the following symbols:

  * Modules
  * Functions, both private and public
  * Typespecs
  * Module Attributes
  * ExUnit describe / setup / tests

Fixes #382

* Added support for block ranges and detail ranges

For document symbols, we need to provide support for block ranges for
things like modules, functions and tests, so that the editor can
understand if it's inside the given symbol.
The LSP also would like to have selection ranges, which are more
specific, and would, say highlight the function definition.

* Upgraded sourceror

Sourceror had a bug calculating end lines, which was causing responses
not to be emitted, but only when unicode was present.

It was emitting the ending several characters beyond where the `end`
keyword was, and this would fail during conversion as being out of bounds.
f6ca36f7 — Steve Cohen a month ago
FIX: Invalid reads for requests that contain multi-byte characters (#661)

* FIX: Invalid reads for unicode requests

We would get sporadic failures where the transport would keep reading
headers after they were done. This was due to the previous request
containing unicode characters at specific locations, which would
confuse the transport, since it was reading the body of the request
with IO.read, which reads _characters_, but it was passing in the
content-length, which is counted in bytes. This would cause us to
over-read the body, and consume part of the next body as we were
reading the headers, and then the whole thing would fail when we tried
to parse the headers.

The change is simple, switch to `binread`, which takes the number of
bytes to read.

56ddd703 — Steve Cohen a month ago
Fixed issue where function definitions were returning references (#655)

There was an issue where function definitions were returning
references as well as the definition. This is because the function
definition extractor didn't consume the definition AST and passed it
to the function reference extractor, which would pick up the references.
eee2c97c — Steve Cohen 2 months ago
Slimmed down representations of range and position (#654)

We use range and positions a lot, and the default inspect
implementations were very wordy. This changes them to:

Range: `LxRange[<<1, 1>>...<<5,1>>]`
Position: `LxPos<<1, 1>>`
62622264 — Cameron Duley 2 months ago
New completion sorting approach (#653)

This PR replaces the completion 'boost' function set_sort_scope and an enumerated set of options, based on relative "distance" (for lack of better term) to a user's locally opened module.
f5e882d0 — Cameron Duley 2 months ago
Add summaries to callable completions. (#648)

* Add summaries to callable completions.
* Include `:summary` from elixir_sense callback candidates.
* Append `@spec`'s to them as well.
* Format `:documentation` as markdown in LSP completions.
* Include the type of callable as a completion detail.
64ff5dc0 — Steve Cohen 2 months ago
Find references for variables (#645)

* Find references for variables

This PR implements find references for variables and fixes a couple
bugs and missed cases in the variable indexer.

There's a notable edge case present in the implementation. A rebound
variable that's assigned to a block will effectively shadow the
variable of that name inside the block. I believe this is a limitation
of the information we get back from the indexer, so another approach
might be necessary in the future if this becomes an issue. An example
follows:

```elixir
name = "Stinky"
name = if some_condition() do
  "Smelly"
else
  name
end
```

Searching for references for the `name` variable on the first line
will return no results, but searching for references to the rebind on
the second line will return the reference in the `else` clause in the if.
2178b4be — Scott Ming 2 months ago
Upgrade dialyzer for Elixir 1.16 (#650)

e6aae965 — Cameron Duley 2 months ago
Fix crashing in unsaved vscode files (#644)

* fix crashing in unsaved vscode files:
* match on and handle `untitled:Untitled-N` URIs. Previously they were errantly being treated as file path URIs.
* add `is_binary` guards to `Document.Path` functions. This makes for slightly more explicit errors.
f68fb275 — Steve Cohen 2 months ago
Fixed bug where blocks weren't popped correctly (#647)

While traversing the AST, it's pretty common to not get the position
updated consistently. Because of this, it's possible that there might
be more than one block that needs to be popped at a time.

We were also not attempting to pop blocks when an expression occurred,
which would cause block mismatches in an expression that occurred
after a block ended.
c91f7a37 — Luka Dornhecker 2 months ago
speed up indexing by not calling `deps_dir` for every file (#646)

595978ab — Cameron Duley 2 months ago
Fix `do` completing to `defmodule` in VSCode (#642)

* Fix `do` completing to `defmodule` in VSCode:
03051cb4 — Cameron Duley 2 months ago
Implement callback completions (#640)

* implement new callback candidate translation

92f100bd — Scott Ming 2 months ago
Add prefix search functionality to the search store (#632)

* Add prefix search functionality to the search store

***Description:*** This commit adds the `prefix` function to the `Lexical.RemoteControl.Search.Store` module, allowing for searching entries by prefix. It also implements the `find_by_prefix` callback in the `Lexical.RemoteControl.Search.Store.Backends.Ets` module.

***Changes:***

- Added `prefix` function to `Lexical.RemoteControl.Search.Store`
- Implemented `find_by_prefix` callback in `Lexical.RemoteControl.Search.Store.Backends.Ets`

* Revert `to_subject_charlist` to `to_subject`

* Add a comment for `to_prefix`

* Refine the implementation logic for prefix search.

Utilize List.pop_at directly.

* Revert the `Schemas.V2` changes, use V3 to do the force migiration

* Update apps/remote_control/lib/lexical/remote_control/search/store/backends/ets/state.ex

Co-authored-by: Steve Cohen <scohen@scohen.org>

---------

Co-authored-by: Steve Cohen <scohen@scohen.org>
81441fa6 — Zach Allaun 2 months ago
Add a glossary (#354)

* Outline for glossary and initial set of terms

* Add more glossary entries (#635)

---------

Co-authored-by: Cameron Duley <Cameron.Duley99@gmail.com>
1e2aa3e8 — Steve Cohen 2 months ago
Create FUNDING.yml (#634)

2b99e1c1 — Scott Ming 2 months ago
Refactor search store queries `exact/2` and `fuzzy/2` for simplicity (#631)

Streamlined handling of search and reference queries, removing intermediate steps for direct result return, Eliminated `{:ok, entries}` tuple wrappers for search outcomes and references, Directly returning `entries`
965f4c47 — Michael DiStefano 2 months ago
Add Sublime Text instructions to docs (#633)

Next