Skip to content

Latest commit

 

History

History
153 lines (113 loc) · 3.02 KB

README.md

File metadata and controls

153 lines (113 loc) · 3.02 KB

Language server bitbkae

Language server for bitbake.

screenshot

Install

npm install -g language-server-bitbake

Or install from the sources:

npm install
npm pack
npm install -g .

Configure

In the following instructions:

  • For windows, replace ~/.config to ~/AppData/Local
  • For macOS, replace ~/.config to ~/Library

(Neo)Vim

For vim:

  • Change ~/.config/nvim to ~/.vim
  • Change init.vim to vimrc

~/.config/nvim/coc-settings.json:

{
  "languageserver": {
    "bitbake": {
      "command": "language-server-bitbake",
      "args": ["--stdio"],
      "filetypes": [
        "bitbake"
      ]
    }
  }
}

Note: You need the vim-bitbake language plugin. It is now part of recent neoVim releases, but you may need to install it manually for older versions.

vim-lsp [Not tested]

~/.config/nvim/init.vim:

if executable('language-server-bitbake')
  augroup lsp
    autocmd!
    autocmd User lsp_setup call lsp#register_server({
          \ 'name': 'bitbake',
          \ 'cmd': {server_info->['language-server-bitbake', '--stdio']},
          \ 'whitelist': ['bitbake'],
          \ })
  augroup END
endif

Neovim [Not tested]

~/.config/nvim/init.lua:

vim.api.nvim_create_autocmd({ "BufEnter" }, {
  pattern = { "bitbake*" },
  callback = function()
    vim.lsp.start({
      name = "bitbake",
      cmd = { "language-server-bitbake", "--stdio" }
    })
  end,
})

Emacs [Not tested]

~/.emacs.d/init.el:

(make-lsp-client :new-connection
(lsp-stdio-connection
  `(,(executable-find "language-server-bitbake" "--stdio")))
  :activation-fn (lsp-activate-on "*.bb")
  :server-id "bitbake")))

Helix [Not tested]

~/.config/helix/languages.toml:

[[language]]
name = "bitbake"
language-servers = [ "language-server-bitbake",]

[language_server.language-server-bitbake]
command = "language-server-bitbake --stdio"

KaKoune [Not tested]

~/.config/kak-lsp/kak-lsp.toml:

[language_server.language-server-bitbake]
filetypes = [ "bitbake",]
command = "language-server-bitbake --stdio"

Sublime [Not tested]

~/.config/sublime-text-3/Packages/Preferences.sublime-settings:

{
  "clients": {
    "bitbake": {
      "command": [
        "language-server-bitbake",
        "--stdio"
      ],
      "enabled": true,
      "selector": "source.bitbake"
    }
  }
}

vscode-bitbake

Related projects