- Notifications
You must be signed in to change notification settings - Fork0
Language server for nginx.conf
License
harry-xm/nginx-language-server
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
ALanguage Server fornginx.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 usingpipx 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.
Withcoc.nvim, put the following incoc-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:
augroupcustom_nginxautocmd!autocmdFileTypenginxsetlocaliskeyword+=$autocmdFileTypenginxletb:coc_additional_keywords= ['$']augroupend
Alternatively, you can usecoc-nginx.
letg: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 --helpusage: 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 outputExamples: Run from stdio: nginx-language-server
The useful language data for nginx is ported fromvscode-nginx-conf-hint. I would have used this library directly, but alas! It's written only for VSCode and I use Neovim.
Samuel Roecasamuel.roeca@gmail.com
About
Language server for nginx.conf
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- JavaScript49.3%
- Python48.0%
- Makefile2.7%