I'm working on frontend project, we're using root alias, like:
import from '~/src/components/button';
instead of:
import from '../../../../../components/button';
But when I try to import from ~/
, my nvim
is not able to autocomplete the path.
How can I let my nvim to know from where it should suggest the path?
~
. Depending on the context, to get~
to resolve you have to useexpand('~/some/file')
rather than just'~/some/file'
.~
as my project root, but I can redefine it to@/
or something else.~
is probably a bad choice because of the confusion with home dir~
.)