Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,2 @@
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# Where third-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez
.expert-lsp/

burrito_out/

# Ignore package tarball (built via "mix hex.build").
expert-*.tar

# Temporary files, for example, from tests.
/tmp/
erl_crash.dump
6 changes: 4 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
elixir 1.17.2-otp-27
erlang 27.0.1
elixir 1.17.2-otp-26
erlang 26.2.5
zig 0.13.0
just 1.35.0
59 changes: 46 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,54 @@
# Expert

**TODO: Add description**
Welcome to the monorepo for the official Elixir LSP implementation, Expert!

## Installation
## Projects

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `expert` to your list of dependencies in `mix.exs`:
- `expert` - the LSP server
- `engine` - the code intelligence engine injected into the user's project
- `namespace` - mix task to disguise the engine application to not clobber the user's code

```elixir
def deps do
[
{:expert, "~> 0.1.0"}
]
end
## Getting Started

Expert uses the [just](https://just.systems) command runner system (similar to make). If you use [Nix](https://nixos.org/), you can jump in the dev shell `nix develop` and `just` and the rest of the dependencies will be installed for you.

Otherwise, please install the following dependencies with your choice of package manager or with asdf/mise.

- [just](https://just.systems)
- Erlang (version found in the .tool-versions file)
- Elixir (version found in the .tool-versions file)
- Zig (version found in the .tool-versions file)
- xz
- 7zz (to create Windows builds)

To quickly build a release you can run locally

```shell
# dev build
just release-local

# prod build
MIX_ENV=prod just release-local
```
Now a single file executable for your system will be available in `./expert/burrito_out/`, e.g., `./expert/burrito_out/expert_linux_amd64`

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/expert>.
To start the local dev server in TCP mode.

```shell
just start --port 9000
```

The full set of recipes can be found by running `just --list`.

```
Available recipes:
compile project # Compile the given project.
deps project # Run mix deps.get for the given project
mix cmd *project # Run a mix command in one or all projects. Use `just test` to run tests.
release-all # Build releases for all target platforms
release-local # Build a release for the local system
release-plain # Build a plain release without burrito
run project +ARGS # Run an arbitrary command inside the given project directory
start *opts="--port 9000" # Start the local development server
test project="all" *args="" # Run tests in the given project
```
5 changes: 0 additions & 5 deletions bin/start

This file was deleted.

File renamed without changes.
26 changes: 26 additions & 0 deletions engine/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# Where third-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez

# Ignore package tarball (built via "mix hex.build").
engine-*.tar

# Temporary files, for example, from tests.
/tmp/
21 changes: 21 additions & 0 deletions engine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Engine

**TODO: Add description**

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `engine` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:engine, "~> 0.1.0"}
]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/engine>.

5 changes: 5 additions & 0 deletions engine/lib/engine.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defmodule Engine do
def ensure_all_started() do
Application.ensure_all_started(:engine)
end
end
19 changes: 19 additions & 0 deletions engine/lib/engine/application.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
defmodule Engine.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false

use Application

@impl true
def start(_type, _args) do
children = [
Engine.Worker
]

# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Engine.Supervisor]
Supervisor.start_link(children, opts)
end
end
Loading