rodjek / vim-puppet

Puppet niceties for your Vim setup
Apache License 2.0
500 stars 137 forks source link

puppetTodo: is not highlighted #124

Open misaflo opened 3 years ago

misaflo commented 3 years ago

Hi,

Keywords puppetTodo (TODO, NOTE, FIXME, ...) are not highlighted if they are follow by ":".

Example:

# TODO : my text   => highlight
# TODO: my text    => not highlight
lelutin commented 3 years ago

I can reproduce this.

we seem to have somewhat the same thing as what python's default syntax script contains, but for python the case where the keyword is followed by a : does highlight corretly.

there's probably something else influencing this, but I still havent found out what

lelutin commented 3 years ago

from what I see this is caused by the value of iskeyword set in ftplugin/puppet.vim

lelutin commented 3 years ago

hmm .. trying to understand why iskeyword was set at all, I end up on commit 94a867ac5092204af317c089e0aef753b76fa73f which does not explain the reasoning why the value was set.

I'm wondering if we should remove the line that sets this variable entirely, but I currently don't know the implications that it'll have on the rest of the plugin.

currently I would venture a guess that : is included in keywords so that class and defined type names of the form module::something get matched up by syntax and/or other functionality.

lelutin commented 3 years ago

one thing that gets changed by removing : from iskeyword is movements over words (e.g. the w command currently skips over a full resource name with all colon characters in the name)

lelutin commented 3 years ago

Since this relates to the presence of : in iskeyword, it's then closeley related to #108