netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

LSP hint for install typescript type definition files in TypeScript file is not working

Open Chris2011 opened this issue 2 years ago • 1 comments

Description

If you have this piece of TypeScript code and not installed @types/lodash, NetBeans shows an editor hint, which seems to come from the LSP with message: "Install '@types/lodash". When I hit enter, nothing happens, so it should do an npm i as mentioned in the hint.

import {
  trim
} from 'lodash';

export default class Test {
  public fun(sql: string): string {
    let formattedSql: string;

    formattedSql = sql
      .replace(/\n/g, ' ')
      .replace(/\t/g, ' ')
      .replace(/ +/g, ' ');

    formattedSql = trim(formattedSql);

    return formattedSql;
  };
}

Use case/motivation

Using the feature which is already shown

Related issues

No response

Are you willing to submit a pull request?

Maybe, will have a look

Code of Conduct

Yes

Chris2011 avatar Jan 17 '23 19:01 Chris2011

Sry I changed the Yes/no for pull request to maybe :D. I will have a look at it and if I can handle it, I will create a PR. If yes will the answere here at the end, than change it back to yes. But if someone else knows it best, just do it, I'm not working on it currently.

Chris2011 avatar Jan 17 '23 19:01 Chris2011