A language server for nginx.conf
Project description
Nginx Language Server
A Language Server for nginx.conf
.
Still under construction, expect big / potentially 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 setlocal iskeyword+=$
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.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 717e7554dc653ceb5ec61a2f8b8fd53e5acc3d8129dc6d089324f42298e98d83 |
|
MD5 | 8246cc5cf300793d4c1dd4715c99ef80 |
|
BLAKE2b-256 | cb45e9b5614aa93a92860006c901f8e64c74f6cb290a183cef5b309fd0cec04b |
Hashes for nginx_language_server-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4e9ea786eae7cc7f547489080fa850420bcd7c08dd6f910d3bf8e8a8662d0e |
|
MD5 | dc208a051410e16551926971dbe178ac |
|
BLAKE2b-256 | 2375b2e781bb54b603fd833deabddd418be23e9eeca7639faa1f049d88922826 |