# Mirage
> ⚠️ **Work in progress**
Remote LSP proxy for Neovim - run language servers on remote machines while editing locally.
## Usage
```bash
# Basic usage (syncs current directory)
mirage -H user@remote.host lsp rust-analyzer
# Custom workspace
mirage -H user@remote.host -w /path/to/project lsp rust-analyzer
```
## Neovim Integration
```vim
:lua vim.lsp.start({ name = "mirage-rust-analyzer", cmd = {"mirage", "-H", "mara@127.0.0.1", "lsp", "rust-analyzer"}, root_dir = "/tmp/mirage", })
```
```lua
vim.lsp.start({
name = "mirage-rust-analyzer",
cmd = {"mirage", "-H", "user@remote.host", "lsp", "rust-analyzer"},
root_dir = vim.fn.getcwd(),
})
```
### With nvim-lspconfig
```lua
local configs = require('lspconfig.configs')
configs.mirage_rust_analyzer = {
default_config = {
cmd = {"mirage", "-H", "user@remote.host", "lsp", "rust-analyzer"},
filetypes = {"rust"},
root_dir = require('lspconfig.util').root_pattern("Cargo.toml"),
},
}
require('lspconfig').mirage_rust_analyzer.setup{}
```
## Supported LSP Servers
`rust-analyzer`, `clangd`, `pyright`
## Requirements
- LSP server installed on remote machine
- SSH access + `rsync`