Since some time now debputy is available in the archive. It is a declarative buildsystem for debian packages, but also includes a Language Server (LS) part.
A LS is a binary can hook into any client (editor) supporting the LSP (Language Server Protocol) and deliver syntax highlighting,
completions, warnings and highlighting of errors. The LSP was initially developed by Microsoft but is now an open standard; it's typically one
or more LS communication via JSON-RPC with an editor supporting the former.
It is probably one of the few things Microsoft developed that is not EEE or straight up garbage.
Prerequisites
Install debputy-lsp.
You also need an editor supporting the LSP. The following editors in the archive support this natively: neovim, helix and Kate.
emacs and vim require an additional plugin for this to work. Your editor should you provide you with the documentation you need to
set this up; make sure to also check out this page.
Setting up debputy
Once you have installed debputy-lsp the only thing left to do is let your preferred editor hook into
the LS (debputy) whenever you open debian-related files (and only then).
Since I use neovim I will be detailing the process here (skip this if you use a different editor).
Neovim setup
If you already have an init.lua just add this snippet somewhere:
local autocmd = vim.api.nvim_create_autocmd
autocmd("FileType", {
pattern = "debcontrol",
callback = function()
local root_dir = vim.fs.dirname("debian")
local client = vim.lsp.start({
name = 'debputy',
cmd = { 'debputy', 'lsp', 'server' },
filetypes = { 'debcontrol', 'debcopyright', 'debchangelog', 'make', 'yaml' },
root_dir = root_dir,
})
vim.lsp.buf_attach_client(0, client)
end
})
This basically tells the editor to start and attach the language server, only if we are in a debian directory and only run it on the specified filetypes.
neovim 0.11 has even easier setup for language servers, I might cover this in a future post.
For using it with any other editor you'll need the same command to run it (debputy lsp server).
To switch from vim while re-using your existing .vimrc you can do this:
vim.cmd([[
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
]])
And that's it, you're set up. You can check everything is working as intended by opening any debian-related file (rules, dch, control, copyright) in the editor and you
should get e.g. highlighting for d/control. To ensure it's running run ":checkhealth lsp" in command mode and verify it shows up there.

Ideally, you now should get errors/hints/warnings like this:

Arguably, those are pretty obvious mistakes. Nevertheless, I had situations where debputy detected something (minor) I'd have overlooked otherwise.
That's exactly what I want: no AI slop or suggestions, since every package warrants different needs, but rather a sanity check that runs in the background.
Closing thoughts
After using the debputy language server for about four months now this is definitely a nice-to-have feature.
This would've been even more helpful to have when I started contributing; having debputy as "sanity check" might've caught some errors early on.
While most editors have spellchecking capabilities having detailed diagnostics is really great, even if just to ensure you made no typo in dch.
Whether you are an experienced contributor or a newcomer to Debian, the debputy LS provides nice feedback as-you-edit and is IMO a valuable tool when
working on packages.
I'd like to thank fellow DD nthykier for developing debputy (and quickly fixing bugs I reported).