Hi list

I'd like to extend a custom c-type syntax file (edc.vim) by including 
the syntax of Lua (lua.vim)
I use vim72
http://trac.enlightenment.org/e/browser/trunk/edje/data/edc.vim

Below is an example file I'd like to get highlighted correctly.

=>What I'd like to do is: everything in the matching pair of curly 
braces after lua_script shall be highlighted by lua.vim
Thats what I've come up so far by reading examples and the help:

-> using 'lua_script' as a pre condition
syn include @Lua syntax/lua.vim
syn match luaScript "lua_script" nextgroup=luaBlock
syn region luaBlock start="{" end="}" contai...@lua
-> does not work, because the other braces are matched too, everything 
after collections is considered Lua code

-> it seems that 'lua_script' has to be part of the start match
syn include @Lua syntax/lua.vim
syn region luaBlock start="lua_script\_s*\zs{" end="}" contai...@lua
-> but this does not work either

The problem is that the main syntax uses curly braces, the syntax region 
delimiters use curly braces and the embedded Lua syntax uses curly 
braces, too and I cannot get them distinguished.
Any ideas?

-- example

collections {
    group {
       name: "foo";
       lua_script {
          function hello ()
             print 'world'
          end
          my_table = {
             value1 = 'Lua',
             value2 = 'rocks'
          }
       }
       parts {
          name: "bar";
          type: RECT;
          description {
             state: "default" 0.0;
          }
       }
    }
}

-- example end

Cheers
Hanspeter Portner

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to