Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#741 closed enhancement (invalid)

default_server does not exist in nginx.vim

Reported by: https://stackoverflow.com/users/573152/bernard-rosset Owned by:
Priority: minor Milestone:
Component: other Version: 1.7.x
Keywords: vim Cc:
uname -a:
nginx -V: 1.7

Description

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 by Maxim Dounin, 9 years ago

Resolution: invalid
Status: newclosed

There is no default_server directive in nginx.

comment:2 by https://stackoverflow.com/users/573152/bernard-rosset, 9 years ago

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 by Maxim Dounin, 9 years ago

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.