Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#741 closed enhancement (invalid)

default_server does not exist in nginx.vim

Reported by: Owned by:
Priority: minor Milestone:
Component: other Version: 1.7.x
Keywords: vim Cc:
uname -a:
nginx -V: 1.7


I noticed the vim syntax file does not contain the default_server directive.

You just need to add the following to the list:

syn keyword ngxDirective default_server

Maybe are there some other inexistent directives.

Change History (3)

comment:1 Changed 4 years ago by mdounin

  • Resolution set to invalid
  • Status changed from new to closed

There is no default_server directive in nginx.

comment:2 Changed 4 years ago by

Well, in that case I would see it as a defect :

ssl gets highlighted when used as a listen parameter, because ssl is also a directive.
ssl should not be highlighted when used as a parameter then, as default_server is not.

The problem shifted from default_server to ssl. Could you update the ticket to reflect that?

comment:3 Changed 4 years ago by mdounin

The parser in vim syntax highlighting is very naive, and doesn't try to understand nginx configuration syntax details. Note well that it's contributed code and not really supported. If you want to rewrite it - feel free to do so and submit patches. Filing tickets in trac makes little to no sense.

Note: See TracTickets for help on using tickets.