
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
nginx-language-server
Advanced tools
A Language Server for nginx.conf
.
Still under construction, expect big / potentially breaking changes for a while.
nginx-language-server currently partially supports the following Language Server capabilities with more to be added in the future.
From your command line (bash / zsh), run:
pip install -U nginx-language-server
-U
ensures that you're pulling the latest version from pypi.
Alternatively, consider using pipx to keep nginx-language-server isolated from your other Python dependencies.
The following instructions show how to use nginx-language-server with your development tooling. The instructions assume you have already installed nginx-language-server.
With coc.nvim, put the following in coc-settings.json
:
{
"languageserver": {
"nginx-language-server": {
"command": "nginx-language-server",
"filetypes": ["nginx"],
"rootPatterns": ["nginx.conf", ".git"]
}
}
}
In your vimrc, I recommend putting in the following lines to ensure variables complete / hover correctly:
augroup custom_nginx
autocmd!
autocmd FileType nginx setlocal iskeyword+=$
autocmd FileType nginx let b:coc_additional_keywords = ['$']
augroup end
Alternatively, you can use coc-nginx.
let g:coc_global_extensions = ['@yaegassy/coc-nginx']
Note: this list is non-exhaustive. If you know of a great choice not included in this list, please submit a PR!
nginx-language-server can be run directly from the command line.
$ nginx-language-server --help
usage: nginx-language-server [-h] [--version] [--tcp] [--host HOST]
[--port PORT] [--log-file LOG_FILE] [-v]
Nginx language server: an LSP server for nginx.conf.
optional arguments:
-h, --help show this help message and exit
--version display version information and exit
--tcp use TCP server instead of stdio
--host HOST host for TCP server (default 127.0.0.1)
--port PORT port for TCP server (default 2088)
--log-file LOG_FILE redirect logs to the given file instead of writing to
stderr
-v, --verbose increase verbosity of log output
Examples:
Run from stdio: nginx-language-server
The useful language data for nginx is ported from vscode-nginx-conf-hint. I would have used this library directly, but alas! It's written only for VSCode and I use Neovim.
Samuel Roeca samuel.roeca@gmail.com
FAQs
A language server for nginx.conf
We found that nginx-language-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.