This package provides:
- refactor@0.1.0
- definitions@0.1.0
- code-actions@0.1.0
- outline-view@0.1.0
- find-references@0.1.0
- code-format.file@0.1.0
- code-format.range@0.1.0
- code-format.onSave@0.1.0
- autocomplete.provider@4.0.0
This package consumes:
Language syntax, auto-completions, formatter and build system for Nullsoft Scriptable Install System (NSIS), as well as language syntax for NSIS Language Files.

Screenshot of NSIS with Fira Mono font & the Hopscotch theme
You can further extend this package with snippets for third-party plug-ins.
Note
The following guide assumes that you're by now using Pulsar, a
community-driven fork of the Atom editor. Should you still be using Atom, use
apm command instead of ppm.
Install language-nsis from the editor's
Package Manager
or the command-line equivalent:
$ ppm install language-nsis
Change to your Atom packages directory:
Windows
# Powershell
$ cd $Env:USERPROFILE\.pulsar\packages
:: Command Prompt
$ cd %USERPROFILE%\.pulsar\packages
Linux & macOS
$ cd ~/.pulsar/packages/
Clone repository as language-nsis:
$ git clone https://github.com/idleberg/atom-language-nsis language-nsis
Inside the cloned directory, install its dependencies:
$ ppm ci
Build the source:
$ ppm run build
This package automatically installs third-party packages it depends on. You can prevent this by disabling the Manage Dependencies option in the package settings.
With most commands, you can specify available options before completion. For
instance, rather than completing RequestExecutionLevel and then specifying an
option, you can directly choose RequestExecutionLevel user from the completion
menu.
To complete
compile time commands,
variables or
predefines,
make sure to omit special characters like !, $ and brackets:
include completes to !includeINSTDIR completes to $INSTDIRNSIS_VERSION completes to ${NSIS_VERSION}However, you have to type __LINE__ to complete to ${__LINE__}.
There are several special cases for your convenience:
MB_OK completes to MessageBox MB_OK "messagebox_text"onInit completes to a Function .onInit blockLogicLib completes to !include "LogicLib.nsh"Fuzzy syntax completions are available through the “Drunken NSIS” snippets, which iron out some of the inconsistencies of the NSIS language, for instance word order.
Example:
FileRead equals ReadFileReadINIStr equals INIStrReadSectionSetText equals SetSectionTextLogSet equals SetLogFindFirst equals FirstFind${FindLine} equals ${LineFind}Scripts can be formatted using the experimental @nsis/dent package. To do so, run Format Document or adjust your settings for auto-formatting.
There are many ways to compile NSIS scripts in Atom. But before you read on,
make sure makensis is in your
PATH environment variable.
This package contains a build system to compile your NSIS scripts. To trigger a build, select “NSIS: Save & Compile” from the command-palette or use the keyboard shortcut.
If you prefer working with custom compiler arguments, you can specify them in
the
package settings.
Optionally, you can also specify the path to makensis.
This package will install an
Atom linter provider for
makensis. By default, NSIS documents get linted when opened or saved. Make
sure to refer to the
linter-makensis
documentation to learn about available lint modes and other settings.
There are several other, previously unmentioned commands available from the command-palette:
| Command | Description |
|---|---|
NSIS: Command Reference |
Look up NSIS command online |
NSIS: Open Package Settings |
Opens settings page |
NSIS: Show Version Info |
Shows current version of NSIS |
NSIS: Show Compiler Flags |
Shows output of makensis /HDRINFO |
NSIS: Convert Language File |
Converts NLF to JSON and vice versa |
This extension supports a variety of ways to provide environment variables such
as NSISDIR or NSISCONFDIR. The following precedence applies:
.env filesNote: Some operating systems require the editor to be launched from terminal in order to access system-wide environment variables.
Additionally, you can pass special environment variables prefixed with
NSIS_APP_ as definitions to your installer script.
# .env
NSIS_APP_ENVIRONMENT=development
# installer.nsi
!if ${NSIS_APP_ENVIRONMENT} == "development"
DetailPrint "Valuable Debug Information"
!endif
makensisThis work is under The MIT License.