tscpp / vscode-knockout-binding-support

VS Code extension which provides support for Knockout bindings in HTML files.
MIT License
4 stars 1 forks source link

Go to definition #3

Open NoelAbrahams opened 1 year ago

NoelAbrahams commented 1 year ago

Hi

Thanks for your extension.

Is there any way to implement a form of 'go to definition'?

For example, given the following HTML file:

inputs/my-input.html

    <input type="text" data-bind="textInput: myValue" />
    <p data-bind="text: 'should be that'"></p>
    <button data-bind="click: () => doThis()">Clear</button>

A go to definition on myValue or doThis() should navigate to the corresponding view model.

Locating the view model could be based on convention, ie the file containing the view model should have the same name and should be in the same folder, eg

inputs/my-input.html
inputs/my-input.ts

inputs/my-input.ts


class MyInput {

 public myValue: string;
 public doThis = () => { ... };

}
tscpp commented 1 year ago

Thank you for taking your time to write this issue.

Initially, I had high hopes of providing full language support, including the ability to go to definitions when I created this extension. However, I soon realized that implementing such features was much more complex than I had initially thought.

I must regretfully inform you that I don't foresee any immediate developments in this regard. My usage of Knockout has significantly declined, and at this point, working on this extension isn't a top priority for me.

I hope this doesn't come across as a big disappointment. Thank you for your understanding.