LSP server for kitty.conf with diagnostics, completions, and hover documentation for any editor
Kitty is a fast, feature-rich, GPU-based terminal emulator. This language server brings IntelliSense, validation, and documentation for kitty.conf to any editor that supports the Language Server Protocol (Neovim, Helix, Emacs, Zed, Sublime Text, and more).
Context-aware autocompletion for all 300+ kitty options, directives, and actions.
- Option names with descriptions, types, defaults, and snippet insertion
- Enum values for options like
cursor_shape,tab_bar_style,placement_strategy - Color values with hex presets from popular themes (Gruvbox, Catppuccin, Dracula, Solarized)
- Map actions for
mapandmouse_mapdirectives (80+ actions) - Directive snippets for
map,mouse_map,include,globinclude,env
Hover over any option to see its description, type, default value, allowed values, and a link to the kitty docs.
Real-time validation catches configuration errors as you type:
- Unknown option names
- Invalid boolean values (only
yes/noare valid in kitty) - Invalid number values
- Invalid enum values with the list of accepted alternatives
- Invalid color formats
npm install -g @atoolz/kitty-lsp-toolkitThis installs the kitty-lsp binary globally.
vim.api.nvim_create_autocmd("FileType", {
pattern = "kitty",
callback = function()
vim.lsp.start({
name = "kitty-lsp",
cmd = { "kitty-lsp" },
})
end,
})To detect kitty.conf as filetype kitty, add to your init.lua:
vim.filetype.add({
filename = {
["kitty.conf"] = "kitty",
},
pattern = {
[".*/kitty/.*%.conf"] = "kitty",
},
})Add to ~/.config/helix/languages.toml:
[language-server.kitty-lsp]
command = "kitty-lsp"
[[language]]
name = "kitty"
scope = "source.kitty"
file-types = [{ glob = "kitty.conf" }, { glob = "*/kitty/*.conf" }]
language-servers = ["kitty-lsp"](with-eval-after-load 'lsp-mode
(add-to-list 'lsp-language-id-configuration '(".*kitty.*\\.conf$" . "kitty"))
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("kitty-lsp"))
:activation-fn (lsp-activate-on "kitty")
:server-id 'kitty-lsp)))Add to LSP settings:
{
"clients": {
"kitty-lsp": {
"command": ["kitty-lsp"],
"selector": "source.kitty"
}
}
}Add to your Zed settings:
{
"lsp": {
"kitty-lsp": {
"binary": {
"path": "kitty-lsp"
}
}
}
}All major kitty configuration categories are covered:
Fonts Cursor Scrollback Mouse Performance Terminal Bell Window Layout Tab Bar Colors Advanced
For VS Code, use the companion extension Kitty Toolkit which includes syntax highlighting, snippets, and all features from this LSP built-in.
Contributions are welcome. Please open an issue or pull request on GitHub.



