Giter Club home page Giter Club logo

docs's Introduction

Julia

Build and Test Docs

This VS Code extension provides support for the Julia programming language.

Getting started

Installing Julia/VS Code/VS Code Julia extension

  1. Install Julia for your platform: https://julialang.org/downloads/
  2. Install VS Code for your platform: https://code.visualstudio.com/download At the end of this step you should be able to start VS Code.
  3. Choose Install in the VS Code Marketplace; or paste in browser's address bar to open this direct VS Code link vscode:extension/julialang.language-julia or manually install with:
    1. Start VS Code.
    2. Inside VS Code, go to the extensions view either by executing the View: Show Extensions command (click View->Command Palette...) or by clicking on the extension icon on the left side of the VS Code window.
    3. In the extensions view, simply search for the term julia in the marketplace search box, then select the extension named Julia and click the install button. You might have to restart VS Code after this step.

Configure the Julia extension

If you have installed Julia into a standard location on Mac or Windows, or if the Julia binary is on your PATH, the Julia VS Code extension should automatically find your Julia installation and you should not need to configure anything.

If the extension does not find your Julia installation automatically, or if you want to use a different Julia installation than the default one, you can set the julia.executablePath to point to the Julia executable that the extension should use. In that case the extension will always use that version of Julia. To edit your configuration settings, execute the Preferences: Open User Settings command (you can also access it via the menu File->Preferences->Settings), and then make sure your user settings include the julia.executablePath setting. The format of the string should follow your platform specific conventions, and be aware that the backlash \ is the escape character in JSON, so you need to use \\ as the path separator character on Windows.

Features

The extension currently provides:

Documentation

The documentation has sections that describe the features of this extension (including e.g. keyboard shortcuts). This repo also has legacy docs in the wiki.

Questions, Feature requests and contributions

  1. If you face any issues, please open an issue here.
  2. For some known issues and their solutions, please visit the known issues and workarounds.
  3. If there is already an issue opened related to yours, please leave an upvote/downvote on the issue.
  4. Contributions are always welcome! Please see our contributing guide for more details.

Data/Telemetry

The Julia extension for Visual Studio Code collects usage data and sends it to the development team to help improve the extension. Read our privacy policy to learn more and how to disable any telemetry.

docs's People

Contributors

atsushisakai avatar aviatesk avatar bgctw avatar bozenkhaa avatar davidanthoff avatar govinddixit avatar hyrodium avatar jbrinchmann avatar jefffessler avatar kdheepak avatar kronosthelate avatar kylebutts avatar logankilpatrick avatar mariusdrulea avatar nilsmartel avatar pauljurczak avatar pfitzseb avatar pitmonticone avatar sbgidlow avatar theronione avatar tlienart avatar tpgillam avatar yashagrawal3107 avatar zhubonan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Default Key bindings

New users of Julia sometimes are also new users to vscode and have no clue
about things such as Cntrl+Shift+P and key bindings, and even what the below really means

great if we can have a picture of default bindings (in mac? linux? windows?)

image

still a new user wants to know only

  • execute this line
  • execute the whole file
    and has no clue what a cell is. (To be clear, a new user can probably guess that a cell
    is a group of lines, but in vscode, it's hard to tell, exactly which lines constitute a cell
    because there is no visual -- i have to look for ##
    (in jupyter, pluto, mathematica etc it is visually obvious, but not in vscode)

also a link to https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf
is mildly useful (a bit too much for a new user, and doesn't have the most important
Julia bindings above, but still useful)

[Docs] Julia VS Code Extension

The complete project will contain the creation of documentation of various sections from scratch and updating existing docs alongside some good to have tasks.

Sections Covered

  • Getting Started guide PR: #12
  • Home page (In progress)
  • Formatter (will pick next)
  • Debugger PR: #13
  • Julia markdown (In progress)
  • Hover and Linter (will pick next)

Other Tasks

  • Add gitignore PR: #9
  • Add contributing guide PR: #21 (done by @aviatesk will add other things to it if required)
  • Change Update header to What's New #18
  • Add FAQs section (In progress)
    I will continue to work on other sections and tasks as discussed and will add them here. This can serve as a single place to keep track of the project.

cc: @davidanthoff @ZacLN

No Julia build tasks

Hi,

I'm using vscode 1.51.1 with an active Julia extension (v 1.5). My OS is Linux x64 5.3.0-7648-generic. I'm following the instructions to create a custom sysimage within vscode (as to my knowledge creating an image outside of vscode creates instabilities). However, when I select "Run Build Task", there is no task to create a custom sysimage for julia, nor are there any tasks available at all. Is this an error in the documentation? Or is the documentation only for specific OS's?

run and debug does nothing?

Not sure why this just started happening, but hitting "Run and Debug" doesn't do anything, no errors or other messages. How can I diagnose this? Thanks

Play button needs Code Runner

Anyone going through the steps in Getting Started will get to "To run the Hello World program, click Run: Julia File in Terminal play button in the top-right side of the editor." and wonder why they don't have a play button like in the picture. After an hour's googling I realized I needed to install the Code Runner extension, not mentioned in these docs. I wasn't sure exactly how I should change the docs to eliminate this problem.

Also just below that currently it says "To learn more about the Julia language, see Juilalang.org"

Doc preview didn't get built

Was expecting to see doc preview for #23 at https://www.julia-vscode.org/docs/previews/PR23, but it hasn't arrived.

Drilling into https://github.com/julia-vscode/docs/pull/23/checks?check_run_id=1044713988 we see errors:

2020-08-29T08:32:55.2884560Z [command]julia --color=yes --project=docs/ docs/make.jl
2020-08-29T08:33:02.7677598Z [ Info: SetupBuildDirectory: setting up build directory.
2020-08-29T08:33:04.2157953Z [ Info: Doctest: running doctests.
2020-08-29T08:33:05.7605935Z [ Info: ExpandTemplates: expanding markdown templates.
2020-08-29T08:33:07.4394985Z [ Info: CrossReferences: building cross-references.
2020-08-29T08:33:08.9462921Z [ Info: CheckDocument: running document checks.
2020-08-29T08:33:09.4859345Z [ Info: Populate: populating indices.
2020-08-29T08:33:11.5542814Z [ Info: RenderDocument: rendering document.
2020-08-29T08:33:12.7381333Z [ Info: HTMLWriter: rendering HTML pages.
2020-08-29T08:33:18.4852059Z ┌ Info: Deployment criteria for deploying preview build from GitHub Actions:
2020-08-29T08:33:18.4852494Z │ - ✔ ENV["GITHUB_REPOSITORY"]="julia-vscode/docs" occurs in repo="github.com/julia-vscode/docs"
2020-08-29T08:33:18.4852734Z │ - ✔ ENV["GITHUB_REF"] corresponds to a PR number
2020-08-29T08:33:18.4853405Z │ - ✔ `push_preview` keyword argument to deploydocs is `true`
2020-08-29T08:33:18.4853754Z │ - ✔ ENV["GITHUB_ACTOR"] exists
2020-08-29T08:33:18.4853989Z │ - ✔ ENV["DOCUMENTER_KEY"] exists exists
2020-08-29T08:33:18.4854195Z └ Deploying: ✔
2020-08-29T08:33:20.6177344Z Initialized empty Git repository in /tmp/jl_eoVAZM/.git/
2020-08-29T08:33:20.7231956Z Failed to add the RSA host key for IP address '140.82.113.4' to the list of known hosts (/home/runner/.ssh/known_hosts).
2020-08-29T08:33:20.7820500Z Load key "/home/runner/work/docs/docs/docs/.documenter": invalid format
2020-08-29T08:33:20.7821047Z [email protected]: Permission denied (publickey).
2020-08-29T08:33:20.7831600Z fatal: Could not read from remote repository.
2020-08-29T08:33:20.7831717Z 
2020-08-29T08:33:20.7831821Z Please make sure you have the correct access rights
2020-08-29T08:33:20.7831917Z and the repository exists.
2020-08-29T08:33:20.7864969Z ┌ Error: Git failed to fetch [email protected]:julia-vscode/docs
2020-08-29T08:33:20.7865627Z │ This can be caused by a DOCUMENTER_KEY variable that is not correctly set up.
2020-08-29T08:33:20.7866189Z │ Make sure that the environment variable is properly set up as a Base64-encoded string
2020-08-29T08:33:20.7866629Z │ of the SSH private key. You may need to re-generate the keys with DocumenterTools.
2020-08-29T08:33:20.7867045Z └ @ Documenter ~/.julia/packages/Documenter/PLD7m/src/Documenter.jl:502
2020-08-29T08:33:21.3130674Z ┌ Error: Failed to push:
2020-08-29T08:33:21.3131727Z │   exception =
2020-08-29T08:33:21.3132079Z │    failed process: Process(`git fetch upstream`, ProcessExited(128)) [128]
2020-08-29T08:33:21.3132286Z │    
2020-08-29T08:33:21.3132492Z │    Stacktrace:
2020-08-29T08:33:21.3132739Z │     [1] pipeline_error at ./process.jl:525 [inlined]
2020-08-29T08:33:21.3133392Z │     [2] #run#565(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
2020-08-29T08:33:21.3133653Z │     [3] run at ./process.jl:438 [inlined]
2020-08-29T08:33:21.3134250Z │     [4] (::Documenter.var"#git_commands#24"{String,SubString{String},String,Array{Any,1},Bool,String,String})(::String) at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:500
2020-08-29T08:33:21.3134791Z │     [5] (::Documenter.var"#23#29"{String})() at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:598
2020-08-29T08:33:21.3135731Z │     [6] cd(::Documenter.var"#23#29"{String}, ::String) at ./file.jl:104
2020-08-29T08:33:21.3136174Z │     [7] #22 at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:598 [inlined]
2020-08-29T08:33:21.3136788Z │     [8] withenv(::Documenter.var"#22#28"{String,String}, ::Pair{String,String}) at ./env.jl:161
2020-08-29T08:33:21.3137282Z │     [9] (::Documenter.var"#21#27"{String,SubString{String},String})(::String, ::IOStream) at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:597
2020-08-29T08:33:21.3137725Z │     [10] mktemp(::Documenter.var"#21#27"{String,SubString{String},String}, ::String) at ./file.jl:611
2020-08-29T08:33:21.3138129Z │     [11] mktemp(::Function) at ./file.jl:609
2020-08-29T08:33:21.3138734Z │     [12] #git_push#18(::String, ::String, ::String, ::SubString{String}, ::String, ::Array{Any,1}, ::Bool, ::Documenter.GitHubActions, ::String, ::typeof(Documenter.git_push), ::String, ::String, ::String) at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:582
2020-08-29T08:33:21.3139320Z │     [13] #git_push at ./none:0 [inlined]
2020-08-29T08:33:21.3139599Z │     [14] #15 at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:456 [inlined]
2020-08-29T08:33:21.3140176Z │     [15] #mktempdir#18(::String, ::typeof(mktempdir), ::Documenter.var"#15#17"{SubString{String},String,String,String,String,String,String,Array{Any,1},Bool,Documenter.GitHubActions,String}, ::String) at ./file.jl:634
2020-08-29T08:33:21.3140626Z │     [16] mktempdir(::Function, ::String) at ./file.jl:632 (repeats 2 times)
2020-08-29T08:33:21.3141313Z │     [17] (::Documenter.var"#14#16"{String,String,String,String,String,Nothing,String,Array{Any,1},Bool,Documenter.GitHubActions,String})() at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:455
2020-08-29T08:33:21.3141921Z │     [18] cd(::Documenter.var"#14#16"{String,String,String,String,String,Nothing,String,Array{Any,1},Bool,Documenter.GitHubActions,String}, ::String) at ./file.jl:104
2020-08-29T08:33:21.3142528Z │     [19] #deploydocs#13(::String, ::String, ::String, ::String, ::String, ::Nothing, ::Nothing, ::String, ::String, ::Array{Any,1}, ::Bool, ::Documenter.GitHubActions, ::Bool, ::typeof(deploydocs)) at /home/runner/.julia/packages/Documenter/PLD7m/src/Documenter.jl:432
2020-08-29T08:33:21.3143040Z │     [20] (::Documenter.var"#kw##deploydocs")(::NamedTuple{(:repo, :push_preview),Tuple{String,Bool}}, ::typeof(deploydocs)) at ./none:0
2020-08-29T08:33:21.3143314Z │     [21] top-level scope at /home/runner/work/docs/docs/docs/make.jl:36
2020-08-29T08:33:21.3143554Z │     [22] include at ./boot.jl:328 [inlined]
2020-08-29T08:33:21.3144004Z │     [23] include_relative(::Module, ::String) at ./loading.jl:1105
2020-08-29T08:33:21.3144430Z │     [24] include(::Module, ::String) at ./Base.jl:31
2020-08-29T08:33:21.3145082Z │     [25] exec_options(::Base.JLOptions) at ./client.jl:287
2020-08-29T08:33:21.3145306Z │     [26] _start() at ./client.jl:460
2020-08-29T08:33:21.3145543Z └ @ Documenter ~/.julia/packages/Documenter/PLD7m/src/Documenter.jl:603
2020-08-29T08:33:22.8236487Z Cleaning up orphan processes

Create Getting Started guide

The creation of a "Getting started in Julia using VS Code" guide will help more quickly onboard folks into the Julia Community from other languages who may already use VS Code.

Would you like to work on this?

Yes

cc @davidanthoff

Proper way to specify the sys_image in additional args

Current:

"julia.additionalArgs": [
        "-JC:\\temp\\sys_custom.so",
    ],

Shall be:

"julia.additionalArgs": [
        "-J", "C:\\temp\\sys_custom.so",
    ],

Bug?:
@pfitzseb the config bellow does not work, but I think it's related to vscode itself, not to the julia extension. Notice the space between J and the path to the sys image.

"julia.additionalArgs": [
        "-J C:\\temp\\sys_custom.so",
    ],

PR here: #77

Add gitgnore to the project

A gitignore file needs to be added to the project. It will help us to ignore the files which are not required to be pushed to the repo

Would you like to work on the issue?

Yes

cc @davidanthoff

Auto-formatting of code fails with a simple task

As part of my code hygiene customs, I break lines every 79 characters. But the auto-formatting feature of the package doesn't allow me to do it in the following context (the code is irrelevant since what matters is what the autoformatting part does):

I want to concatenate two vectors in the following way:

vector_to_concatenate = [
    repeat([foo], foo_times); 
    repeat([bar], bar_times)
]

But when I save the file, the autocorrect erases the semi-colon ; needed for the concatenation. Obviously, in this example, I wouldn't need to break line since I can write

vector_to_concatenate = [repeat([foo], foo_times); repeat([bar], bar_times)]

But if the variable names are longer, making this line > 79 characters, I would not want to have it as a single line. Is this something that can be easily fixed?

Thanks in advance for your help. I'm a big fan of what you guys are doing!

create documentation for home page

  • The creation of a "Home page" guide will help our users to get a complete overview of all the sections of the documentation at a single place.
  • It will help them to easily navigate to various section of the doc
  • Will also contain meta-information regarding the extension

Would you like to work on this?

Yes

cc @davidanthoff

Julia Extension does not work / compile - what is the solution

The FAQ: docs/src/faq.md does not say what to do. This folder has normal write permissions - the extension made it itself. So does not seem to be the problem.

The Language Server failed to precompile.
Please make sure you have permissions to write to the LS depot path at
	/home/morten/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1

┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/error_handler.jl:15
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to "/home/morten/.config/Code/User/globalStorage/julialang.language-julia/lsdepot/v1/compiled/v1.9/LanguageServer/jl_IHNStU".
Stacktrace:
 [1] top-level scope
   @ ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/languageserver/main.jl:77
 [2] include(mod::Module, _path::String)
   @ Base ./Base.jl:457
 [3] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:307
 [4] _start()
   @ Base ./client.jl:522
[Error - 5:31:19 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 5:31:19 PM] The Julia Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 5:31:19 PM] Julia Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 5:31:19 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Done on a clean install of :

  • Pop_OS! 22.04 LTS,
  • clean install of Julia v1.9.1,
  • clean install of VS Code v1.80.1 and
  • Julia extension v1.47.2

Include headings level 3 in the menu, on click

Level 3 headings titles contain pretty important information as well and shall be outlined to the user for a better visibility. Maybe any heading shall be visible in the menu, regardless of the level. Shouldn't be an issue because these are displayed only on click. But at least Level 3 headings shall be included, see the use-cases bellow.

In Use-case1 the Debugger menu only shows Example, while important items like Ways to start the debugger are left in the page as details. It is clear the users miss this information, as we have to tell them over and over again to debug in the repl mode, see here: https://discourse.julialang.org/t/debugging-extremely-slow/53801/49.

In Use-case2 the Debugger menu shows Settings to speed-up the debugger. The options available shall be quickly visible in the menu: (ALL_MODULES_EXCEPT_MAIN, sys_images, Example).

Use-case1:
image

Use-case2:
image

Extend the VScode debugger how to setup launch.json so that the debugger automatically loads my develop environment

Hi all,

I've been developping package locally, for this example I cloned the CSV package and made some commits that I'd like to debug; and I've loaded them into my 'develop' environment:
image
When I currently hit 'debug file in new process' the debugger will complain that the current environment doesn't have the package included. I think I can avoid this issue by just loading my 'develop' environment instead which already has the package added.
image
now I'd like to load this environment when starting up the debugger, but by default the debugger load the 'v1.9' environment, which contains no breakpoints and so my debugger doesn't stop. So is there a way to define this via the 'launch.json' file? I could not find this in the current documentation
image
I figured out myself that I can just select the 'develop' environment using the button on the VScode taskbar. And then run the debugger. So I'll add this to the documentation lateron so that others don't have to figure this out again.

Old Changelog in docs

I just noticed that the changelog is not updated with every release.
In particular the dev-docs show an older changelog than the stable/v1.5/v1.5.10 docs.
I think I understand why this is (because it's a different repo), but maybe there is a way to fix this.

How to add command-line options when launch Julia?

Hi there,

I am trying to debug Julia codes in vscode, but could not figure out a proper way to run codes with command-line options, for example, "julia --handle-signals=no test.jl". Could someone show me an example how to do so? Thanks.

Debugger gets out of lines sync if we add or remove lines

If in a debug session one remove or adds lines and restart another debugging session the debugger starts to jump/stop at lines that may even not exist (blank lines). This is a quite annoying bug because it forces us to restart the Julia REPL and the consequent package recompilation (which can be be quite long).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.