Skip to content
Nahuel Palumbo edited this page Dec 18, 2023 · 19 revisions

Welcome!

Welcome to the tour of the Wollok LSP IDE's features.

Execute Wollok

You can execute Wollok code using Wollok-CLI.

Play with objects in the REPL

Before anything, maybe you want to play with some objects.

Commands are available from the editor with the shortcut Ctrl + Shift + P o from the menu View -> Commands Palette... You can search by Wollok:

image

You can open a Wollok terminal (or REPL) and evaluate expressions in a session.

Screen.Recording.2023-03-19.at.19.57.16.mp4

For more information see https://github.com/uqbar-project/wollok-ts-cli.

Running Wollok tests

You can run Wollok tests from the Editor.

Single tests

Screen.Recording.2023-03-19.at.19.43.56.mov

Describes

Screen.Recording.2023-03-19.at.19.45.06.mov

File

Screen.Recording.2023-03-19.at.19.45.43.mov

All tests in the project

Screen.Recording.2023-03-19.at.19.51.28.mov

Running Wollok programs

Analogous to tests, you can run Wollok programs, including Wollok Game 🕹️.

Screen.Recording.2023-03-19.at.20.05.19.mp4

IDE

Validations

All validations are visible in the text editor and the Problems panel.

image

Navigation

Ways of navigating code

  • Document symbols, which can be navigated by
    • Triggering the document symbol search (Ctrl+Shift+O)

    • Navigating the document outline Ctrol+Shift+P + 'View: Focus on Outline view'. More on outline view here image

    • Navigating the symbol tree

  • Workspace symbols (triggered by Ctrl+T)
  • Go to definition: Ctrl+Click on any symbol will take you to its definition or list all the places where it was defined

Overview

overview_navegacion.mp4

Dynamic Diagram

dynamicDiagram2.mp4

Every time you start a REPL session it will activate the Dynamic Diagram: it will show objects references.

  • Built-in objects (strings, numbers, dates, in general: library definitions) appear in one color, and there's another color for custom definitions (the one that you code)
  • Root references have a thicker line (eg: seed and pepita)

Pin objects

Objects can be

  1. pinned: layout is not fully recreated, so its faster but you have to manually locate them
  2. or free: objects are relocated when a change is made to best fit the screen
dynamicDiagramPin.mp4

Further configurations

You can configure dynamic diagram options in Settings:

  • opening light mode/dark mode by default
  • whether dynamic diagram should be activated when starting a REPL session
  • and whether dynamic diagram should open in an external browser or inside Wollok LSP IDE (the default choice).

image

Autocomplete

Using the shortcut Ctrl + Space on the Editor you can access some auto-completion options. Once you select an autocomplete option, you can move using Tab key and complete every placeholder.

autocomplete.mp4

It also works for message autocompletion when you write a . character:

06-autocomplete-messages.mp4

Autocomplete tools works for describe, tests, object, classes, imports, class initializers, etc. Try it!

TODO

List what we want but do not have yet. 🏃

We accept Pull Requests! :octocat:

  • Develop Quick fixes & Refactors
  • Develop a Debugger

And less priority:

  • Develop a Static Diagram view
  • Integrate VSCode Test Runner Tool
  • Enhance validation messages: data interpolation, a better explanation of what's going on and how can you solve it, etc.
  • Enhance autocomplete tool (connect with the type system and WollokDOC)
  • Develop a Snippet extension

Work in progress (WIP)