You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nuxt projects don't have a /src directory. This plugin won't jump to files in my projects. I believe this will cause other projects to fail to find files, such as maybe next.js.
The issue is that src is hard-coded for file search. I believe the solution would be to use tsconfig.js settings for baseUrl, paths, include, and exclude.
Additional information. This is just me poking around at ways to deal with it.
Here's a way to reliably and easily resolve a module (e.g. @/services/user) within a node project with a tsconfig.js file.
Unfortunately, tsconfig-path removes the file extension, so you have to check for .js or .ts. Also, it doesn't work with node_modules.
I think there might be a better way than above. I poked around at the source of tsc, but gave up after a while due to complexity. Maybe I'll tacklet it again later.
Workarounds I'm using:
Coc and Neovim's LSP have a "goto-definition" command that can be used instead
Relative paths work with regular Vim. import user from '../services/user'
Also btw, json_decode(string) was added to Vim 8.
The text was updated successfully, but these errors were encountered:
Nuxt projects don't have a
/src
directory. This plugin won't jump to files in my projects. I believe this will cause other projects to fail to find files, such as maybe next.js.The issue is that
src
is hard-coded for file search. I believe the solution would be to use tsconfig.js settings forbaseUrl
,paths
,include
, andexclude
.Additional information. This is just me poking around at ways to deal with it.
Here's a way to reliably and easily resolve a module (e.g.
@/services/user
) within a node project with atsconfig.js
file.Unfortunately, tsconfig-path removes the file extension, so you have to check for
.js
or.ts
. Also, it doesn't work withnode_modules
.I think there might be a better way than above. I poked around at the source of
tsc
, but gave up after a while due to complexity. Maybe I'll tacklet it again later.Workarounds I'm using:
import user from '../services/user'
Also btw,
json_decode(string)
was added to Vim 8.The text was updated successfully, but these errors were encountered: