LSP hint for install typescript type definition files in TypeScript file is not working
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### 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.
```Typescript
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
Contributor guide
Research direction
Reproduce the TypeScript example importing lodash without @types/lodash in NetBeans and inspect the LSP install-type-definition hint. Done means activating the hint runs the corresponding npm install action and installs the requested type definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100