| Crates.io | safety-lsp |
| lib.rs | safety-lsp |
| version | 0.4.0 |
| created_at | 2025-10-09 06:15:46.578979+00 |
| updated_at | 2025-10-09 06:15:46.578979+00 |
| description | A lib for using safety tags defined in tag-std |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1875134 |
| size | 176,929 |
.vscode/settings.json, SP_FILE starts from workspace root if it's a relative path:{
"safety-tool.env": {
"SP_FILE": "./ostd/safety-tags.toml"
}
}
SP_FILE can also be a absolute path.
SP_DIR is also supported, but only one of them should be specified.
safety-lsp.env.SAFETY_LSP should be set as vscode will fail to find
safety-lsp due to absence of bash env loading.{
"safety-tool.env": {
"SAFETY_LSP": "/path/to/safety-lsp"
}
}
Ctrl+Space to open hover doc panel of each completion candidate if the doc is not shown.vim.lsp.config["safety-lsp"] = {
-- Command and arguments to start the server.
cmd = { "/home/gh-zjp-CN/tag-std/safety-tool/safety-lsp/target/debug/safety-lsp" },
-- Environment variables passed to the LSP process on spawn
cmd_env = { SP_DISABLE_CHECK = 1 },
-- Filetypes to automatically attach to.
filetypes = { "rust" },
-- Sets the "workspace" to the directory where any of these files is found.
-- Files that share a root directory will reuse the LSP server connection.
-- Nested lists indicate equal priority, see |vim.lsp.Config|.
root_markers = { { "Cargo.toml" }, ".git" },
-- Specific settings to send to the server. The schema is server-defined.
settings = {},
}
-- Make LSP server config into effects.
vim.lsp.enable("safety-lsp")