A language Server for the DOT language/Graphviz.
- Node.js
>=18
npm
npm i -g dot-language-server
If you want to request or implement new features, head over to dot-language-support.
{
"languageserver": {
"dot": {
"command": "dot-language-server",
"args": ["--stdio"],
"filetypes": ["dot"]
}
}
}
if executable('dot-language-server')
augroup lsp
autocmd!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'dot',
\ 'cmd': {server_info->['dot-language-server', '--stdio']},
\ 'whitelist': ['dot'],
\ })
augroup END
endif
vim.api.nvim_create_autocmd({ "BufEnter" }, {
pattern = { "*.dot" },
callback = function()
vim.lsp.start({
name = "dot",
cmd = { "dot-language-server", "--stdio" }
})
end,
})
TODO: There's an Extension for that.
- Install LSP support via
Install Package
->LSP
- Go to
Preferences: LSP Settings
- Add this to clients:
{
"clients": {
"dot-language-server": {
"command": ["dot-language-server", "--stdio"],
"enabled": true,
"languageId": "dot",
"scopes": ["source.dot"],
"syntaxes": ["Packages/Graphviz/DOT.sublime-syntax"]
}
}
}
Note for Windows Users: You have to append .cmd
to the first entry in the command
array (or, if possible, enable shell execution).
For Emacs users, you need to use lsp-mode
which supports the DOT Language Server out of the box.
...and you're done!