Giter Club home page Giter Club logo

coc-nginx's Introduction

coc-nginx

nginx-language-server extension for coc.nvim

coc-nginx-demo

Features

  • Completion
  • Hover
  • Format by nginxfmt
  • Built-in installer

Install

CocInstall:

:CocInstall @yaegassy/coc-nginx

scoped packages

vim-plug:

Plug 'yaegassy/coc-nginx', {'do': 'yarn install --frozen-lockfile'}

Detect: nginx-language-server

  1. nginx.server.commandPath
  2. current environment PATH (e.g. nginx-language-server in venv, or global)
  3. builtin nginx-language-server (Installation commands are also provided)

Bult-in install

coc-nginx allows you to create an extension-only "venv" and install "nginx-language-server".

The first time you use coc-nginx, if nginx-language-server is not detected, you will be prompted to do a built-in installation.

You can also run the installation command manually.

:CocCommand nginx.installLanguageServer

Configuration options

  • nginx.enable: Enable coc-nginx extension, default: true
  • nginx.server.commandPath: The custom path to the nginx-language-server (Absolute path), default: ""
  • nginx.builtin.pythonPath: Python 3.x path (Absolute path) to be used for built-in install, default: ""
  • nginx.nginxfmt.commandPath: The custom path to the nginxfmt (Absolute path), default: ""
  • nginx.nginxfmt.indent: Specify number of spaces for indentation, default: 4

Commands

  • nginx.installLanguageServer: Install/Upgrade nginx-language-server and more tools (builtin)
    • It will be installed in this path:
      • Mac/Linux: ~/.config/coc/extensions/@yaegassy/coc-nginx-data/nginx-language-server/venv/bin/nginx-language-server
      • Windows: ~/AppData/Local/coc/extensions/@yaegassy/coc-nginx-data/nginx-language-server/venv/Scripts/nginx-language-server.exe
  • nginx.format: Run nginxfmt

Known issue I have identified

There seems to be an error when saving the file.

Repro:

:CocCommand workspace.showOutput -> Choose by number: -> "Enter" the number of the nginx-language-server.

Thanks

License

MIT


This extension is built with create-coc-extension

coc-nginx's People

Contributors

boilingsoup avatar yaegassy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.