Adept Language Server
Download adeptls binary for your platform or build it from source, then follow the directions below for your editor:
You can add something like the following to your init.lua.
Make sure to replace the path given for --infrastructure with the output of running adept --root.
Also make sure to replace the path to adeptls inside the cmd table with the path to it on your system.
vim.api.nvim_create_autocmd("FileType", {
pattern = "adept",
callback = function()
local client = vim.lsp.start({
name = "adeptls",
cmd = {
"/Users/isaac/AdeptProjects/AdeptLSP/adeptls",
"--infrastructure",
"/Users/isaac/Projects/Adept/build/macOS-Release/"
},
})
vim.lsp.buf_attach_client(0, client)
end
})
- Step 1: Install LSP Package from Package Control
- Step 2: Open LSP Settings by clicking menu
Sublime Text -> Settings -> Package Settings -> LSP -> Settings - Step 3: Add client for
adeptlsto configuration. See below for exampleLSP.sublime-settings:
{
"clients": {
"adeptls": {
"enabled": true,
"command": [
"/Users/isaac/AdeptProjects/AdeptLSP/adeptls",
"--infrastructure",
"/Users/isaac/Projects/Adept/build/macOS-Release/"
],
"selector": "source.adept"
}
}
}
- Step 4: Make sure to replace the path given for
--infrastructurewith the output of runningadept --root. - Step 5: Also make sure to replace the path to
adeptlsinside thecommandarray with the path to it on your system.
You can compile adeptls by navigating to the project folder, and then running:
make
(and then the result is ./adeptls)
Since this LSP relies on C code for the actual code insight, a Makefile is provided.
The Makefile builds both the frontend language server which handles processing/communication and the backend insight server which performs the code analysis.
To only rebuild the frontend, you can build it like a normal Adept project using:
adept