#language-server #lsp #device-tree #dts #tree-sitter

app dts-lsp

Language Server for Device Tree Source files

4 releases

0.1.5 Sep 24, 2024
0.1.4 Jun 19, 2024
0.1.3 May 29, 2024
0.1.2 May 27, 2024

#1001 in Development tools

MIT/Apache

71KB
2K SLoC

Language Server for Device Tree Source files

Build Status Crates.io

An LSP for DTS files built on top of tree-sitter-devicetree grammar.

Features and Roadmap

  • Go to label definition
  • Find references to label
  • Handle editor buffer changes
  • Rename labels/references

Installation

cargo install dts-lsp

Neovim configuration

vim.api.nvim_create_autocmd('FileType', {
    pattern = "dts",
    callback = function (ev)
        vim.lsp.start({
            name = 'dts-lsp',
            cmd = {'dts-lsp'},
            root_dir = vim.fs.dirname(vim.fs.find({'.git'}, { upward = true })[1]),
        })
    end
})

Dependencies

~12–21MB
~297K SLoC