A language server for the Teal language
luarocks install teal-language-server- The
teal-language-serverprogram should be installed- This does assume that the LuaRocks bin folder is properly added to your path!
The above is tested and working on Linux and macOS. You may have some troubles on Windows, and we would recommend downloading the pre-built binary below.
We provide binaries for Windows on our GitHub Release page. You should be able to download and extract the the latest version from there.
- Clone repo
- From repo root:
scripts/setup_local_luarocks./lua_modules/bin/teal-language-server
- Go to definition (
textDocument/definition) - Linting (
textDocument/publishDiagnostics) - Intellisense (
textDocument/completion) - Hover (
textDocument/hover)
Install the lspconfig plugin and put the following in your init.vim or init.lua
local lspconfig = require("lspconfig")
-- as long as teal-language-server is in your PATH this should work
lspconfig.teal_ls.setup {}
-- if it's not in your path, you can specify where teal-languag-server is by setting cmd. For example on Windows:
-- lspconfig.teal_ls.setup({cmd = { 'C:\\opt\\tls-windows\\bin\\teal-language-server.bat' },})teal-language-server [--verbose=true] [--log-mode=none|by_proj_path|by_date]
Note:
- All args are optional
- By default, logging is 'none' which disables logging completely
- When logging is set to
by_proj_pathorby_date, the log is output to[User Home Directory]/.cache/teal-language-server
Alongside packages defined in the rockspec, teal-language-server includes the source of the following:
- tree-sitter-teal - MIT
- Bundling directly makes install more reliable, as tree-sitter-cli does not need to be setup for the install to work