Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oberblastmeister/lua-analyzer
A language server for lua written in rust
https://github.com/oberblastmeister/lua-analyzer
lsp lua rust
Last synced: 7 days ago
JSON representation
A language server for lua written in rust
- Host: GitHub
- URL: https://github.com/oberblastmeister/lua-analyzer
- Owner: oberblastmeister
- Created: 2021-03-11T19:32:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T05:16:43.000Z (7 months ago)
- Last Synced: 2024-04-22T18:26:45.637Z (7 months ago)
- Topics: lsp, lua, rust
- Language: Rust
- Homepage:
- Size: 2.03 MB
- Stars: 63
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lua-analyzer
lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. This server is highly inspired by rust-analyzer and has a lot of code that is similar or copied from it. Currently only the parser is (partially) implemented. Please don't use this yet.
## Installation
```sh
git clone https://github.com/oberblastmeister/lua-analyzer
cd lua-analyzer
cargo install --path ./crates/lua-analyzer
```## neovim lspconfig
First add it to your configurations
```lua
local configs = require("lspconfig/configs")
configs.lua_analyzer = {
default_config = {
cmd = { "lua-analyzer" },
filetypes = {"lua"},
root_dir = util.root_pattern("*.lua", vim.fn.getcwd()),
docs = {
description = [[]],
default_config = {root_dir = [[root_pattern(".git", vim.fn.getcwd())]]},
},
}
}
```Then you can just set it up as usual
```lua
lspconfig.lua_analyzer.setup { ... }
```## Lsp features
- [x] simple syntax diagnostics
- [ ] completion
- [ ] symbols
- [ ] workspace symbols
- [ ] renaming
- [ ] goto definition
- [ ] hover