vim-vimlparser
vim-vimlparser copied to clipboard
Add support for runtimepath adjustment
vint cannot lint py/pycompiler.vim / js/jscompiler.vim properly, because they are using a hack to import the s: scope of another file (call extend(s:, vimlparser#import())).
vimlint is able to parse this, since it adds $PWD to the runtimepath (https://github.com/syngan/vim-vimlint/blob/c8b9cd9d8a0fb6dc69667d32819aeef503cff55c/bin/vimlint.sh#L33).
I think this should somehow get supported / done automatically by vimlparser instead - probably based on the file's path, i.e. it should add foo to &rtp in case foo/autoload/bar/baz.vim is parsed.
You can add such functionality on your own using generated AST. I think it's out of scope for vimlparser.
i.e. it should be handled by vim-lint or vint, not vimlparser which should focus on "parsing" Vim script.