mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-19 12:16:35 +00:00
Applied markdownlint, minor typos and fixes in readme [ci skip]
# Conflicts: # README.md
This commit is contained in:
1 parent
59b2bccb26
commit
5a1bfa0838
3 files changed
+173
-192
No files matched your search
+3
-38
@@ -21,30 +21,10 @@ You can install a virtual environment with the required as follows
|
||||
|
||||
1. Create a new virtual environment: `uv venv`
|
||||
2. Activate the environment:
|
||||
* On Linux/Unix/macOS: `source .venv/bin/activate`
|
||||
* On Windows: `.venv\Scripts\activate.bat` (in cmd/ps) or `source .venv/Scripts/activate` (in git-bash)
|
||||
* On Linux/Unix/macOS or Windows with Git Bash: `source .venv/bin/activate`
|
||||
* On Windows outside of Git Bash: `.venv\Scripts\activate.bat` (in cmd/ps) or `source .venv/Scripts/activate` (in git-bash)
|
||||
3. Install the required packages with all extras: `uv pip install --all-extras -r pyproject.toml -e .`
|
||||
|
||||
### Docker setup
|
||||
|
||||
Build the docker image with
|
||||
|
||||
```shell
|
||||
docker build -t serena .
|
||||
```
|
||||
|
||||
and run it with the repository mounted as a volume:
|
||||
|
||||
```shell
|
||||
docker run -it --rm -v "$(pwd)":/workspace serena
|
||||
```
|
||||
|
||||
You can also just run `bash docker_build_and_run.sh`, which will do both things
|
||||
for you.
|
||||
|
||||
Note: For the Windows subsystem for Linux (WSL), you may need to adjust the path for the
|
||||
volume.
|
||||
|
||||
## Running Tools Locally
|
||||
|
||||
The Serena tools (and in fact all Serena code) can be executed without an LLM, and also without
|
||||
@@ -54,19 +34,4 @@ An example script for running tools is provided in [scripts/demo_run_tools.py](s
|
||||
|
||||
## Adding a New Supported Language
|
||||
|
||||
Serena interacts with code through language servers which are included in
|
||||
the `solidlsp` package. It is rather easy to include a new supported language
|
||||
if an LSP implementation for it exists. You just need to:
|
||||
|
||||
1. create a new subclass of `SolidLanguageServer`
|
||||
2. add a new value to the `Language` enum
|
||||
3. make a new `elif` case in the `SolidLanguageServer.create` method
|
||||
4. add a test repo of the new language to `test/resources/repos/<new_language>/test_repo`
|
||||
and new tests in `test/solidlsp/<new_language>`. Similar to existing tests for other languages
|
||||
5. also add a new case to the parameterized tests in `test/serena/test_serena_agent`
|
||||
|
||||
The subclasses are typically easy to write, have a look at the
|
||||
[PyrightLanguageServer](src/multilspy/language_servers/pyright_language_server/pyright_server.py)
|
||||
for an example, or at any other implementation to see how non-python
|
||||
dependencies for language servers are handled there.
|
||||
There are also some tips from the multilspy admin [here](https://github.com/microsoft/multilspy/issues/5).
|
||||
See the corresponding [memory](.serena/memories/adding_new_language_support_guide.md).
|
||||
Reference in new issue
Block a user