Skip to content

Commit

Permalink
Rename Project
Browse files Browse the repository at this point in the history
  • Loading branch information
PatWie committed Aug 2, 2024
1 parent b550ac8 commit a841201
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "llm-sitter-ls"
name = "polyglot_ls"
version = "0.1.0"
edition = "2021"

Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# LLM-Sitter-LS
# Polyglot-LS

LLM-Sitter-LS is a single-binary language server that uses the tree-sitter
Polyglot-LS is a single-binary language server that uses the tree-sitter
parser to provide context-aware code actions. These code actions are performed
by a Large Language Model (LLM) by forming a prompt which interpolated a given
text with tree-sitter nodes content.

![LLM-Sitter-LS Preview](.github/preview.png)
![Polyglot-LS Preview](.github/preview.png)

## Setup

Expand All @@ -24,8 +24,8 @@ To compile the project, follow these steps:
1. Clone the repository:

```sh
git clone https://github.com/patwie/llm-sitter-ls.git
cd llm-sitter-ls
git clone https://github.com/patwie/polyglot_ls.git
cd polyglot_ls
```

2. Build the project:
Expand All @@ -34,29 +34,29 @@ To compile the project, follow these steps:
cargo build --release
```

3. The binary will be located in `target/release/llm-sitter-ls`.
3. The binary will be located in `target/release/polyglot_ls`.

### Using the Language Server

1. Copy the contents of the `code_actions` configs directory to
`$HOME/.config/llm-sitter-ls/code_actions/`.
`$HOME/.config/polyglot_ls/code_actions/`.

2. To run the server, execute:

```sh
./target/release/llm-sitter-ls
./target/release/polyglot_ls
```

For debugging, use:

```sh
./target/release/llm-sitter-ls --listen
./target/release/polyglot_ls --listen
```

For direct usage in Neovim, use:

```sh
./target/release/llm-sitter-ls --stdin
./target/release/polyglot_ls --stdin
```

## Limitations
Expand All @@ -77,11 +77,11 @@ For Neovim and the "neovim/nvim-lspconfig" plugin, use the following setup:
```lua
local configs = require 'lspconfig.configs'

if not configs.llmls then
configs.llmls = {
if not configs.polyglot_ls then
configs.polyglot_ls = {
default_config = {
cmd = { "/path/to/llm-sitter-ls" , "--stdin" },
-- for debugging, launch "llm-sitter-ls" with --listen and use:
cmd = { "/path/to/polyglot_ls" , "--stdin" },
-- for debugging, launch "polyglot_ls" with --listen and use:
-- cmd = vim.lsp.rpc.connect('127.0.0.1', 9257),
filetypes = { 'python', 'rust' },
single_file_support = true,
Expand Down
2 changes: 1 addition & 1 deletion src/code_action_providers/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl ActionProvider for GenericProvider {
if let Some(context_node) = context_node {
let ctx_range = helper::ts_node_to_lsp_range(&context_node);
return Some(CodeAction {
title: self.config.name.clone(),
title: format!("Polyglot: {}", self.config.name),
kind: Some(CodeActionKind::REFACTOR_REWRITE),
data: Some(json!(ResolveAction {
id: self.id.to_string(),
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ async fn main() {
let home_dir = env::var("HOME").expect("Failed to get home directory");
let config_dir = Path::new(&home_dir)
.join(".config")
.join("llm-sitter-ls")
.join("polyglot_ls")
.join("code_actions");

log::info!("Processing config-dir: {:?}", config_dir);
for language in read_language_config_files(&config_dir) {
log::info!("Processing language config: {}", language);
let path = Path::new(&home_dir)
.join(".config")
.join("llm-sitter-ls")
.join("polyglot_ls")
.join("code_actions")
.join(format!("{}.yaml", language));
match config::CodeActionConfig::from_yaml(&path) {
Expand Down

0 comments on commit a841201

Please sign in to comment.