| Crates.io | typua |
| lib.rs | typua |
| version | 0.1.3 |
| created_at | 2025-09-20 15:09:27.739757+00 |
| updated_at | 2025-10-05 10:40:54.266613+00 |
| description | A lua typecheker and language server |
| homepage | |
| repository | https://github.com/takeshid/typua |
| max_upload_size | |
| id | 1847852 |
| size | 361,082 |
typua is a lua typechecker for Lua5.1, 5.2, 5.3, 5.4, LuaJIT.
Compatibled type-annotation syntax lua-language-server.
cargocargo install typua
vim.lsp.enable("typua")
vim.lsp.config("typua", {
cmd = { "typua", "lsp" },
filetypes = { "lua" },
root_markers = { ".git", ".typua.toml" },
settings = {
typua = {
workspace = {
library = {
vim.env.VIMRUNTIME,
}
}
},
},
})
lua-lstypua can be used in combination with lua-ls
{
cmd = { "lua-language-server" },
filetypes = { "lua" },
-- omitted...
settings = {
Lua = {
hint = { -- use with typua
enable = false,
},
diagnostics = { -- use with typua
enable = true,
disable = {
"assign-type-mismatch",
"param-type-mismatch",
"return-type-mismatch",
"undefined-field",
}
}
},
},
}
typua detects .typua.toml in workingspace root.
on the other hand, use --config/-c option like typua --config your_typua.toml.
[workspace]
ignore_dir = ["target"]
use_gitignore = true