Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svermeulen/teal-language-server
A language server for Teal, a typed dialect of Lua
https://github.com/svermeulen/teal-language-server
Last synced: 3 months ago
JSON representation
A language server for Teal, a typed dialect of Lua
- Host: GitHub
- URL: https://github.com/svermeulen/teal-language-server
- Owner: svermeulen
- Fork: true (teal-language/teal-language-server)
- Created: 2022-02-20T22:08:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-28T22:42:31.000Z (almost 2 years ago)
- Last Synced: 2023-03-22T20:26:39.896Z (over 1 year ago)
- Size: 131 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WIP and Currently (Very) Unstable
This is very much a work in progress. Work is being done in the Teal compiler itself to make development of this easier and the cli is undergoing changes as well to help with the project management tools that a language server expects to have (such as being able to properly load `tlconfig.lua`).Check out the Teal gitter if you would like to contribute
[![Join the chat at https://gitter.im/dotnet/coreclr](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/teal-language/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
```
luarocks install --dev teal-language-server
```# teal-language-server
Currently the server only implements:
- `textDocument/didOpen`
- `textDocument/didSave`
- `textDocument/didClose`
- `textDocument/hover`And just runs a simple type check
# Setup
If you can get this working with your editor, please open an issue/pr to add it here!
### NeoVim 0.5
Install the [lspconfig plugin](https://github.com/neovim/nvim-lspconfig) and put the following in your `init.vim` or `init.lua`
```lua
local lspconfig = require("lspconfig")
local configs = require("lspconfig/configs") -- Make sure this is a slash (as theres some metamagic happening behind the scenes)
if not lspconfig.teal then
configs.teal = {
default_config = {
cmd = {
"teal-language-server",
-- "logging=on", use this to enable logging in /tmp/teal-language-server.log
},
filetypes = {
"teal",
-- "lua", -- Also works for lua, but you may get type errors that cannot be resolved within lua itself
},
root_dir = lspconfig.util.root_pattern("tlconfig.lua", ".git"),
settings = {},
},
}
end
lspconfig.teal.setup{}```