https://github.com/kindermax/lets_ls
LSP server for lets cli tool
https://github.com/kindermax/lets_ls
lets lsp nvim rust vscode
Last synced: 4 months ago
JSON representation
LSP server for lets cli tool
- Host: GitHub
- URL: https://github.com/kindermax/lets_ls
- Owner: kindermax
- Created: 2024-12-21T11:51:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-20T08:00:05.000Z (5 months ago)
- Last Synced: 2025-01-20T08:36:55.016Z (5 months ago)
- Topics: lets, lsp, nvim, rust, vscode
- Language: Rust
- Homepage:
- Size: 185 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lsp server for lets task runner
## Supported features
* [x] Goto definition
- Navigate to definitions of `mixins` files
* [x] Completion
- Complete commands in `depends`
* [ ] Diagnostics
* [ ] Hover
* [ ] Document highlight
* [ ] Document symbol
* [ ] Formatting
* [ ] Signature help
* [ ] Code action## Development
Build:
```bash
cargo build
```Test:
```bash
cargo test
```Lint:
```bash
cargo clippy
# or to fix lints
cargo clippy --fix --bin "lets_ls"
```## Release build
```bash
cargo build --release
```## Integration with Neovim
Add new filetype:
```lua
vim.filetype.add({
filename = {
["lets.yaml"] = "yaml.lets",
},
})
```In your `neovim/nvim-lspconfig` servers configuration:
In order for `nvim-lspconfig` to recognize lets_ls we must define config for `lets_ls`
```lua
require("lspconfig.configs").lets_ls = {
default_config = {
cmd = {
"lets_ls",
},
filetypes = { "yaml.lets" },
root_dir = util.root_pattern("lets.yaml"),
settings = {},
},
}
```And then enable `lets_ls` in then `servers` section:
```lua
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lets_ls = {},
pyright = {}, -- just to show an example how we enable lsp servers
},
},
}
```## Integration with VSCode
Extension can be found [here](https://marketplace.visualstudio.com/items?itemName=kindritskyimax.vscode-lets).