Civet icon indicating copy to clipboard operation
Civet copied to clipboard

LSP: Auto import

Open itsMapleLeaf opened this issue 1 year ago • 2 comments

The VSCode extension doesn't seem to suggest auto-imports at the moment. I rely on them heavily, and would love to see support for them.

itsMapleLeaf avatar Jan 18 '24 22:01 itsMapleLeaf

And possibility to configure it, for example: import like this:

import { prop } from 'lib'

or like this:

{ prop } from 'lib'

and if it type only:

type { SomeType } from 'lib'
import type { SomeType } from 'lib'
import { type SomeType } from 'lib'
{ type SomeType } from 'lib'

or combined with type:

type { SomeType, someFunc } from 'lib'
import type { SomeType }, { someFunc } from 'lib'
import { type SomeType, someFunc } from 'lib'
{ type SomeType, someFunc } from 'lib'

mixty1 avatar Jan 19 '24 11:01 mixty1

Another vote for this from me . It seems that VSCode can spot a civet file but, ctrl + spaceing a reference doesn't add the import declaration at the top. When manually writing it there's a 'cannot find module' error annotation.

crystalthoughts avatar May 31 '24 08:05 crystalthoughts