Socket
Socket
Sign inDemoInstall

systemd-language-server

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemd-language-server

Language server for systemd unit files


Maintainers
1

systemd-language-server

PyPI GitHub Actions (Tests) GitHub

Language server for systemd unit files. Result of an exercise to learn the language server protocol.

Supported Features

textDocument/completion

Completion for

  • unit file directives
  • unit file sections

textDocument/hover

Documentation for directives supplied on hovering.

For markup in hover windows (i.e. the fancy highlighting), pandoc must be found in $PATH. Otherwise, there will be fallback to plain text.

Installation

pip install systemd-language-server

Example Integrations

coc.nvim

In coc-settings.json, under .languageserver:

...
"systemd-language-server": {
  "command": "systemd-language-server",
  "filetypes": ["systemd"]
}
...

nvim-lspconfig

local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'

if not configs.systemd_ls then
  configs.systemd_ls = {
    default_config = {
      cmd = { 'systemd-language-server' },
      filetypes = { 'systemd' },
      root_dir = function() return nil end,
      single_file_support = true,
      settings = {},
    },
    docs = {
      description = [[
https://github.com/psacawa/systemd-language-server

Language Server for Systemd unit files.
]]
    }
  }
end

lspconfig.systemd_ls.setup {}

Courtesy of @ValdezFOmar

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc