Nova

Extensions


Readme

WebHare extension for Nova

Experimental WebHare extension for Nova. This extension provides syntax definitions for HareScript and Witty files and a language client which connects to a WebHare installation.

Features

This extension provides:

  • Syntax highlighting for HareScript and Witty files
  • File diagnostics for HareScript and Witty files and supported XML files
  • Code actions to automatically add missing LOADLIBs and rmove unused LOADLIBs
  • Document formatter for supported XML files
  • Documentation popups on hover
  • Jump to definition
  • A sidebar which can be used to retrieve stack traces
  • A few clips for inserting common code fragments

Installation

  • Install the dev module in WebHare using wh module get webhare/dev
  • Install runkit by cloning the repository and following the README instructions
  • Install the WebHare extension in Nova through the Extension Library (Cmd+Shift+2 or Extensions > Extension Library…)

Configuration

The extension can be configured in the extension preferences.

Options

Show Documentation Issues Check the checkbox to show diagnostics for documentation issues.

Show Stack Traces For Workspace Only Check the checkbox to filter out retrieved stack traces that don't reference files within the current workspace. This setting can be overridden in project-specific settings.

Debug Log Level The WebHare lsp module can log debugging information to the debug log with an lsp:server log source value. This setting can be used to control the amount of information that is being logged, from 0 (log only errors) to 3 (log everything). This is a project-specific setting.

Language Server Settings

WebHare Runkit Path The path of the runkit binary, defaults to ~/projects/webhare-runkit/bin/runkit.

Development

  • Clone the webhare-language-nova repository
  • Install the dependencies by running npm install within the repository
  • Start a watch that automatically runs rollup to compile the TypeScript source by running npm run watch within the repository
  • Open the repository directory as a project in Nova
  • Activate the project as an extension by choosing Extensions > Activate Project as Extension (if the WebHare extension is already installed through the Extension Library, deactivate that extension first)
  • Making any changes to the source files will automatically reload the extension

Changelog

0.3.1 – 2024-01-26

Things that are nice to know

  • Added 'Copy WebHare Resource Path' command

0.3.0 – 2024-01-25

Incompatibilities and deprecations

  • Switched to the new language server built into the dev module For this to work, the dev module should be up to date and runkit should be installed and working. If runkit isn't installed into ~/projects/webhare-runkit, set the path to the runkit binary in the extension's settings.

Things that are nice to know

  • Added 'Object comment' clip

Things that are fixed

  • Removed the window/showDocument workaround, as Nova supports this natively now

0.2.0 - 2023-05-15

Things that are nice to know

  • Add an option to automatically format known XML files on saving
  • Add a Run Task for HareScript files

Things that are fixed

  • Improved the detection of the relevant stack trace item, so newer file types (e.g. TypeScript) are recognized

0.1.8 - 2022-02-15

Things that are nice to know

  • Add support LSP 3.16's window/showDocument request, which is called by the dev module's OpenReveal hook
  • Add a 'WebHare Preferences' command to open the WebHare extension preferences for the current workspace

0.1.7 - 2021-12-13

Things that are nice to know

  • Add 'Organize LOADLIBs' code action for HareScript files
  • Add a 'Format Document' command for supported XML files

0.1.6 - 2021-05-31

Things that are nice to know

  • Make server debug loglevel configurable
  • Switch to using @webhare/language-server

0.1.5 - 2021-05-21

Things that are nice to know

  • Fix double clicking a stack trace error message
  • Fix openFile and getParent implementation based on updated TypeScript types

0.1.4 - 2021-05-12

Things that are nice to know

  • Install webhare-language-server module locally instead of relying on a globally available webhare-language-server
  • Add support for XML file diagnostics for supported files
  • Syntax highlighting improvements
  • Add option to enable/disabled documentation diagnostics

0.1.0 - 2021-04-22

Initial release

Things that are nice to know

  • HareScript and Witty syntax highlighting
  • HareScript and Witty file diagnostics
  • Show stack trace in sidebar
  • Add some HareScript and XML code clips