Skip to content

Commit 0558187

Browse files
authored
docs: update readme documentation (#33)
1 parent eb3c13b commit 0558187

1 file changed

Lines changed: 50 additions & 8 deletions

File tree

README.md

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,35 @@ helping you detect vulnerabilities and misconfigurations earlier in the developm
2626
| K8s Manifest image analysis | Supported | [Supported](./docs/features/k8s_manifest_image_analysis.md) (0.8.0+) |
2727
| Infrastructure-as-code analysis | Supported | In roadmap |
2828

29-
## Build
29+
## Installation
30+
31+
### Pre-built Binaries (Recommended)
32+
33+
The easiest way to install Sysdig LSP is to download a pre-built binary from the [GitHub Releases](https://github.com/sysdiglabs/sysdig-lsp/releases) page.
34+
35+
1. **Download the binary for your platform:**
36+
- Linux x86_64: `sysdig-lsp-linux-amd64`
37+
- Linux ARM64: `sysdig-lsp-linux-arm64`
38+
- macOS x86_64 (Intel): `sysdig-lsp-darwin-amd64`
39+
- macOS ARM64 (Apple Silicon): `sysdig-lsp-darwin-arm64`
40+
41+
2. **Make it executable and move to your PATH:**
42+
```bash
43+
# Example for Linux x86_64
44+
chmod +x sysdig-lsp-linux-amd64
45+
sudo mv sysdig-lsp-linux-amd64 /usr/local/bin/sysdig-lsp
46+
```
47+
48+
3. **Verify the installation:**
49+
```bash
50+
sysdig-lsp --version
51+
```
52+
53+
### Building from Source
54+
55+
If you prefer to build from source or need a custom build, see the [Building from Source](#building-from-source) section below.
56+
57+
## Building from Source
3058

3159
Sysdig LSP is developed in Rust and can be built using Cargo or Nix (a flake is provided). Follow these steps for your preferred method:
3260

@@ -106,6 +134,10 @@ Add the following configuration to your `languages.toml` file:
106134
language-servers = ["docker-langserver", "sysdig-lsp"]
107135
name = "dockerfile"
108136

137+
[[language]]
138+
language-servers = ["sysdig-lsp"]
139+
name = "yaml"
140+
109141
[language-server.sysdig-lsp]
110142
command = "sysdig-lsp"
111143

@@ -124,7 +156,7 @@ Navigate to **Settings > Configure Kate > LSP Client > User Server Settings** an
124156
"01-sysdig-lsp": {
125157
"command": ["sysdig-lsp"],
126158
"root": "",
127-
"highlightingModeRegex": "^Dockerfile$",
159+
"highlightingModeRegex": "^(Dockerfile|YAML)$",
128160
"initializationOptions": {
129161
"sysdig": {
130162
"api_url": "https://secure.sysdig.com"
@@ -145,8 +177,18 @@ Navigate to **Settings > Configure Kate > LSP Client > User Server Settings** an
145177
1. Install the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin.
146178
2. Open the LSP Client config (usually near the Terminal), click **New Language Server** and configure:
147179
- **Server > Command**: `sysdig-lsp`
148-
- **Mappings > File name patterns**: Include `Dockerfile`
149-
- **Language ID**: `dockerfile`
180+
- **Mappings > Language**:
181+
| Language | Language Id |
182+
|----------|-------------|
183+
| YAML | |
184+
- **Mappings > File name patterns**:
185+
| File name patterns | Language ID |
186+
|---------------------|----------------|
187+
| Dockerfile | dockerfile |
188+
| docker-compose.yml | docker-compose |
189+
| compose.yml | docker-compose |
190+
| docker-compose.yaml | docker-compose |
191+
| compose.yaml | docker-compose |
150192
- **Configuration > Initialization Options**:
151193
```json
152194
{
@@ -164,7 +206,7 @@ Add the following to your `coc.nvim` configuration:
164206
"languageserver": {
165207
"sysdig-lsp": {
166208
"command": "sysdig-lsp",
167-
"filetypes": ["dockerfile"],
209+
"filetypes": ["dockerfile", "yaml"],
168210
"initializationOptions": {
169211
"sysdig": {
170212
"api_url": "https://secure.sysdig.com"
@@ -193,7 +235,7 @@ if not configs.sysdig then
193235
default_config = {
194236
cmd = { "sysdig-lsp" },
195237
root_dir = lspconfig.util.root_pattern(".git"),
196-
filetypes = { "dockerfile" },
238+
filetypes = { "dockerfile", "yaml" },
197239
single_file_support = true,
198240
init_options = {
199241
sysdig = {
@@ -215,8 +257,8 @@ Refer to the [Neovim LSP configuration guide](https://neovim.io/doc/user/lsp.htm
215257
```lua
216258
vim.lsp.config.sysdig = {
217259
cmd = {"sysdig-lsp"},
218-
root_markers = {"Dockerfile"},
219-
filetypes = { "dockerfile" },
260+
root_markers = {"Dockerfile", "docker-compose.yml", "compose.yml"},
261+
filetypes = { "dockerfile", "yaml" },
220262
init_options = {
221263
sysdig = {
222264
api_url = "https://us2.app.sysdig.com",

0 commit comments

Comments
 (0)