# VS Code Intellisense for custom package

**URL:** https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496
**Category:** New to Julia
**Tags:** package, vscode
**Created:** [March 18, 2021, 8:26pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496 "2021-03-18T20:26:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![asyrov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asyrov/32/13578_2.png) [@asyrov](https://discourse.julialang.org/u/asyrov)
#### Post date: [March 18, 2021, 8:26pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/1 "2021-03-18T20:26:55Z")

</div>

I’m developing a custom package which is located in some folder (other than `.julia/packages/...`). This package’s root folder added to JULIA\_LOAD\_PATH as:

```julia
export JULIA_LOAD_PATH=$HOME/local/packages:$JULIA_LOAD_PATH

```

It works as I expect, i.e. I can do `using MyPackage` in my scripts, but intellisense is not working in VS Code for my package as it works for standard packages.

How do I make my package visible to julia intellisense?

Thank you very much,

---

<div class="post-metadata">

### Author: ![asyrov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asyrov/32/13578_2.png) [@asyrov](https://discourse.julialang.org/u/asyrov)
#### Post date: [March 19, 2021, 4:51pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/2 "2021-03-19T16:51:30Z")

</div>

Not sure if there is a better way, but I solved it by adding my package to standard (in .julia) Project.toml with  
`] dev <path to package>`

---

<div class="post-metadata">

### Author: ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)
#### Post date: [March 20, 2021, 6:08pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/3 "2021-03-20T18:08:39Z")

</div>

Hi,

I’m having the same issue. I tried `dev`\_ing the package in both the global environment and the environment I use for my main project, and updating the LOAD\_PATH in startup.jl, and neither of those worked. Is there some other way to get VS Code to recognize a package? The code runs just fine, it’s just the autocomplete etc. that doesn’t work.

---

<div class="post-metadata">

### Author: ![asyrov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asyrov/32/13578_2.png) [@asyrov](https://discourse.julialang.org/u/asyrov)
#### Post date: [March 22, 2021, 3:16pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/4 "2021-03-22T15:16:52Z")

</div>

Run command “Julia: Restart Language Server” and see if your package is indexed (in Language Server output). Also try to re-index.

---

<div class="post-metadata">

### Author: ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)
#### Post date: [March 22, 2021, 11:38pm UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/5 "2021-03-22T23:38:24Z")

</div>

Good idea, it seems like the problem is somewhere with the extension, here’s what I get:

```julia
 Warning: Some Julia code in the VS Code extension crashed with
│ e = InvalidStateException("Channel is closed.", :closed)
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.1.37/scripts/error_handler.jl:5
ERROR: InvalidStateException("Channel is closed.", :closed)
Stacktrace:
 [1] try_yieldto(::typeof(Base.ensure_rescheduled)) at ./task.jl:656
 [2] wait at ./task.jl:713 [inlined]
 [3] wait(::Base.GenericCondition{ReentrantLock}) at ./condition.jl:106
 [4] take_buffered(::Channel{Any}) at ./channels.jl:387
 [5] take! at ./channels.jl:381 [inlined]
 [6] get_next_message(::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint,Base.PipeEndpoint}) at /Users/satvikberi/.vscode/extensions/julialang.language-julia-1.1.37/scripts/packages/JSONRPC/src/core.jl:197
 [7] macro expansion at /Users/satvikberi/.vscode/extensions/julialang.language-julia-1.1.37/scripts/packages/LanguageServer/src/languageserverinstance.jl:263 [inlined]
 [8] (::LanguageServer.var"#98#100"{LanguageServerInstance})() at ./task.jl:356

```

When I searched for similar errors it seems like this has been a recurring bug that hasn’t yet been solved, unfortunately.

---

<div class="post-metadata">

### Author: ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)
#### Post date: [March 23, 2021, 12:11am UTC](https://discourse.julialang.org/t/vs-code-intellisense-for-custom-package/57496/6 "2021-03-23T00:11:34Z")

</div>

I finally tried deleting `~/.julia` and reinstalling, that did the trick!
