Implement the VLS roadmap on the native VBS build

Native VBS and CMake builds of the server and every registered suite:
protocol and document sync, VBS/compdb providers, stock GCC diagnostics
(including in-process default profile preparation), the stock occurrence
observer and hover/definition, the bounded Scheduler, C++ module graph,
scan and artifact cache with real CMI production, the context-aware
symbol index with schema-2 snapshot migration, navigation and guarded
rename, reflection provenance with splice-origin extraction, index-backed
completion and signature help, live GCC worker control with a registered
DAP suite, and the Neovim and VS Code clients.

VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced
from the versioned patches and verified stepping reflection/template code
with projected values 17/34 and 41/82.
This commit is contained in:
faumaray committed 2026-12-05 14:06:50 +03:00
1 parent ca04975d54
commit da8003f6d4
310 files changed
+47552 -480

No files matched your search

+92
View File
@@ -0,0 +1,92 @@
if vim.g.loaded_vls then
return
end
vim.g.loaded_vls = 1
local function report(subject, result, err)
if err then
vim.notify("VLS: " .. err, vim.log.levels.ERROR)
return
end
vim.notify(subject .. "\n" .. vim.inspect(result), vim.log.levels.INFO)
end
vim.api.nvim_create_user_command("VlsStart", function()
local client, err = require("vls").start()
report("VoidLanguageServer started",
client and { id = client.id, root = client.config.root_dir } or nil, err)
end, { desc = "Start VoidLanguageServer for the current buffer" })
vim.api.nvim_create_user_command("VlsStatus", function()
report("VoidLanguageServer provider status", require("vls").status())
end, { desc = "Request provider status for the current document" })
vim.api.nvim_create_user_command("VlsAnalysisStatus", function()
report("VoidLanguageServer analysis status", require("vls").analysis_status())
end, { desc = "Request semantic analysis status for the current document" })
vim.api.nvim_create_user_command("VlsReplay", function(options)
local trace = vim.fn.fnamemodify(options.args, ":p")
report("VoidLanguageServer replay", require("vls").replay(trace))
end, { nargs = 1, complete = "file", desc = "Replay an absolute VLS recording" })
vim.api.nvim_create_user_command("VlsSession", function()
report("VoidLanguageServer replay session", require("vls").session())
end, { desc = "Subscribe to the active replay session and generation" })
vim.api.nvim_create_user_command("VlsTimeline", function(options)
local fields = vim.split(options.args, "%s+", { trimempty = true })
local page, err = require("vls").timeline(tonumber(fields[1]), tonumber(fields[2]))
if err then
report("VoidLanguageServer timeline", nil, err)
return
end
local lines = { string.format("session %s generation %d total %d",
page.sessionId, page.generation, page.total) }
for _, event in ipairs(page.events) do
table.insert(lines, string.format("%d %s%s", event.sequence, event.kind,
event.acknowledgedAction and
string.format(" stop=%d action=%s", event.acknowledgedStop,
event.acknowledgedAction) or ""))
end
require("vls").render("VLS timeline", lines)
end, { nargs = "*", desc = "Show a bounded timeline page: :VlsTimeline [start] [count]" })
vim.api.nvim_create_user_command("VlsFrames", function(options)
local fields = vim.split(options.args, "%s+", { trimempty = true })
local page, err = require("vls").frames(tonumber(fields[1]), tonumber(fields[2]))
if err then
report("VoidLanguageServer frames", nil, err)
return
end
local lines = { string.format("session %s generation %d total %d",
page.sessionId, page.generation, page.total) }
for _, frame in ipairs(page.frames) do
table.insert(lines, string.format("%s %s", tostring(frame.id),
tostring(frame.name)))
end
require("vls").render("VLS frames", lines)
end, { nargs = "*", desc = "Show a bounded frame page: :VlsFrames [start] [count]" })
vim.api.nvim_create_user_command("VlsSource", function()
local content, err = require("vls").source()
if err then
report("VoidLanguageServer source", nil, err)
return
end
require("vls").render("VLS captured source", vim.split(content, "\n", { plain = true }))
end, { desc = "Show the captured source of the active replay" })
vim.api.nvim_create_user_command("VlsStop", function()
require("vls").stop()
vim.notify("VLS: replay stopped", vim.log.levels.INFO)
end, { desc = "Stop the active replay session" })
vim.api.nvim_create_user_command("VlsRename", function(options)
local ok, err = require("vls").rename(options.args)
if not ok then
vim.notify("VLS: " .. err, vim.log.levels.ERROR)
else
vim.notify("VLS: rename applied", vim.log.levels.INFO)
end
end, { nargs = 1, desc = "Rename the symbol at the cursor through the server" })