Add a root path per project
Hi! This plugin looks really useful, but doesn't help me navigate through files for a couple of reasons:
- All the paths in our app are relative
- We use require.js for loading modules, which this plugin doesn't "see" as clickable
A nice solution for the first issue, which could be necessary for the second, is to add some sort of global root variable. For example:
/js/app.js should resolve to ~/code/myproject/web/js/app.js
Being able to navigate through a require.js declaration would also be kick ass.
define([
'dojo/on',
'dojo/dom',
'dojo/topic',
'codemirror4/lib/codemirror',
'codemirror4/mode/htmlmixed/htmlmixed'
], function(on, dom, topic, CodeMirror) {
...
Each dependency on the require statement also has it's own root, in this case /web/js/.
I'm looking around at the code and it seems like this should be feasible. What do you think? I might spend some time tonight to see if I can get this to work!
Thanks for your work so far :)
Yes , next version will be hookable. And I'm thinking how to make it workable with angular projects.
But , I have not got much time to do this for a while.
You can have a try~
Many Thanks~
As you opened this thread, I'll put my thoughts here.
I'm thinking of what is needed for hooking usage.
name
piority
match
highlight(patten:[the pattern should contain cursor] and hlGroup)
action(success/failure)
buffer(filetype/ project detection like package.json;
And is this needed???shall we put it in another plugin?
like a require.vim for nodejs?)
mapping
mostly done. you can define your own pattern validator and trigger with the filetype.
see readme.