A language server for nginx.conf
Project description
Nginx Language Server
A Language Server for nginx.conf
.
Still under constructions, expect big changes and breaking changes for a while.
Capabilities
nginx-language-server currently partially supports the following Language Server capabilities with more to be added in the future.
Language Features
Installation
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.
Editor Setup
The following instructions show how to use nginx-language-server with your development tooling. The instructions assume you have already installed nginx-language-server.
Vim / Neovim
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 correcty:
augroup custom_nginx
autocmd!
autocmd FileType nginx set iskeyword+=$
augroup end
augroup custom_coc_additional_keyword_characters
autocmd!
autocmd FileType nginx
\ let b:coc_additional_keywords = ['.', '/', '"', '$', '-']
augroup end
Note: this list is non-exhaustive. If you know of a great choice not included in this list, please submit a PR!
Inspiration
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.
Written by
Samuel Roeca samuel.roeca@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nginx-language-server-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d7225e774bd1c686cf93bcd20a1e6e8fbf135cf4e6faddcfc571132bf86a073 |
|
MD5 | 5e53aab63f44c123032e40fa27f286cb |
|
BLAKE2b-256 | 995e6ed8bed2e08f446111d064aab6ed7261921d07178681af27f3edc8ff57cb |
Hashes for nginx_language_server-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5416e13152cfcf97e4ca65e501b5c14f073fff38cc32e167af9a38e736a22c2 |
|
MD5 | ded5af40cae41235c8252b853c4833a4 |
|
BLAKE2b-256 | e951ee6e7ac433245312de578c3dc9521cdd08eb79c9f563cbbe14eb2b302798 |