leafOfTree/vim-vue-plugin

No highlighting with "wrong" indentation

suruaku opened this issue · 5 comments

As you can see in the screenshots highlighting wasn't working when I had my indentation a bit of.
I have g:vim_vue_plugin_highlight_vue_keyword=1 in my vimrc.

Berofe:
image

After:
image

Thanks for the feedback. I checked the code and realised that the highlighting only effects for the keyword with correct indentation.
It is to prevent highlighting when the inner object uses the keyword as key.

export default {
  data: {
    data: {
    }
  },
  computed: {
    name: {
    }
  }
}

I wonder if you don't have the nested cases and have to deal with some "wrong" indentation codes, maybe we can add an option to toggle it.

Okay, I get it. Could it be so that only first data object is highlighted? Since it's always the first one.

Now while testing, I also noticed that if you use async with for example mounted() it doesn't get highlighted either.

With async:
image

Without async:
image

Hi, I have to say it seems not easy to highlight only the first data object.

The async has been resolved with b8e2325 and 559d93c . Please update and see if it works.

Okay, it's not a huge issue so maybe it's better to leave it as it is. (I have no experience with vim extensions and those regex patterns look a bit scary :D)

Async works now, thanks!

You're welcome. I'll close this issue. Feel free to open another issue if you may have any problem with it.