LSP implementation for Wren.
- Diagnostics (syntax + basic semantic checks)
- Completion (identifiers, members, builtins, class methods)
- Hover
- Go to definition
- References
- Rename
- Semantic tokens
- Document symbols (outline)
- Signature help
- Document highlights
- Code actions (quick fixes)
- Workspace symbols
- Folding ranges
- Selection range
- Inlay hints (type hints for variables)
- Call hierarchy
- Configurable module resolution
- Cross-module navigation (multi-file)
Download a binary based on your paltform from releases.
vim.filetype.add({
extension = {
wren = "wren",
},
})
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")
if not configs.wren_lsp then
configs.wren_lsp = {
default_config = {
cmd = { "wren-lsp" },
filetypes = { "wren" },
root_dir = lspconfig.util.root_pattern("wren-lsp.json", ".git"),
},
}
end
lspconfig.wren_lsp.setup({})vim.filetype.add({
extension = {
wren = "wren",
},
})
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("wren", {}),
pattern = "wren",
callback = function()
vim.lsp.start({
name = "Wren LSP",
cmd = { "wren-lsp" },
root_dir = vim.loop.cwd(),
flags = { exit_timeout = 1000 },
})
end,
})Install from the Visual Studio Marketplace.
Install LSP-wren-lsp from Package Control.
Add this to ~/.config/helix/languages.toml:
[language-server.wren-lsp]
command = "wren-lsp"
[[language]]
name = "wren"
scope = "text.wren"
file-types = ["wren"]
comment-token = "//"
language-servers = ["wren-lsp"]