mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
add systemd-lsp
This commit is contained in:
committed by
mattn
parent
1df01a1160
commit
854c272ce0
@@ -180,6 +180,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
|
||||
| Svelte | tailwindcss-intellisense | Yes | Yes |
|
||||
| Svelte | biome | Yes | Yes |
|
||||
| Swift | sourcekit-lsp | Yes | No |
|
||||
| systemd | systemd-lsp | UNIX Only | Yes |
|
||||
| SystemVerilog | verible-verilog-ls | UNIX Only | Yes |
|
||||
| SystemVerilog | svls | Yes | Yes |
|
||||
| TeX | texlab | Yes | Yes |
|
||||
|
||||
35
installer/install-systemd-lsp.sh
Executable file
35
installer/install-systemd-lsp.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
os=$(uname -s | tr "[:upper:]" "[:lower:]")
|
||||
arch="$(uname -m)"
|
||||
|
||||
case $os in
|
||||
linux)
|
||||
if [ "$arch" = "x86_64" ]; then
|
||||
file="systemd-lsp-x86_64-unknown-linux-gnu"
|
||||
else
|
||||
echo "unknown architecture: $arch"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
darwin)
|
||||
if [ "$arch" = "x86_64" ]; then
|
||||
file="systemd-lsp-x86_64-apple-darwin"
|
||||
elif [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then
|
||||
file="systemd-lsp-aarch64-apple-darwin"
|
||||
else
|
||||
echo "unknown architecture: $arch"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "unknow platform: $os"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -L -o "systemd-lsp" "https://github.com/JFryy/systemd-lsp/releases/download/v2025.07.10/$file"
|
||||
|
||||
chmod +x systemd-lsp
|
||||
@@ -1800,6 +1800,14 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"systemd": [
|
||||
{
|
||||
"command": "systemd-lsp",
|
||||
"url": "https://github.com/JFryy/systemd-lsp",
|
||||
"description": "a language server implementation for systemd unit files made in rust 🦀",
|
||||
"requires": []
|
||||
}
|
||||
],
|
||||
"systemverilog": [
|
||||
{
|
||||
"command": "verible-verilog-ls",
|
||||
|
||||
18
settings/systemd-lsp.vim
Normal file
18
settings/systemd-lsp.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
augroup vim_lsp_settings_system_lsp
|
||||
au!
|
||||
LspRegisterServer {
|
||||
\ 'name': 'systemd-lsp',
|
||||
\ 'cmd': {server_info->lsp_settings#get('systemd-lsp', 'cmd', [lsp_settings#exec_path('systemd-lsp')]+lsp_settings#get('systemd-lsp', 'args', []))},
|
||||
\ 'root_uri':{server_info->lsp_settings#get('systemd-lsp', 'root_uri', lsp_settings#root_uri('systemd-lsp'))},
|
||||
\ 'initialization_options': lsp_settings#get('systemd-lsp', 'initialization_options', {
|
||||
\ 'completion': {
|
||||
\ 'autoimport': { 'enable': v:true },
|
||||
\ },
|
||||
\ }),
|
||||
\ 'allowlist': lsp_settings#get('systemd-lsp', 'allowlist', ['systemd']),
|
||||
\ 'blocklist': lsp_settings#get('systemd-lsp', 'blocklist', []),
|
||||
\ 'config': lsp_settings#get('systemd-lsp', 'config', lsp_settings#server_config('systemd-lsp')),
|
||||
\ 'workspace_config': lsp_settings#get('systemd-lsp', 'workspace_config', {}),
|
||||
\ 'semantic_highlight': lsp_settings#get('systemd-lsp', 'semantic_highlight', {}),
|
||||
\ }
|
||||
augroup END
|
||||
Reference in New Issue
Block a user