Pascal language support for Sublime Text's LSP plugin, powered by the Pascal Language Server.
- Clone or download this repository
- Create a directory named
PasLSin your Sublime TextPackagesdirectory:- macOS:
~/Library/Application Support/Sublime Text/Packages/PasLS - Linux:
~/.config/sublime-text/Packages/PasLS - Windows:
%APPDATA%\Sublime Text\Packages\PasLS
- macOS:
- Copy all files from this repository into that directory
- Restart Sublime Text
- The Pascal Language Server binary will be automatically downloaded from GitHub releases
By default, PasLS will automatically download and manage the pasls binary from GitHub releases. The binary is stored in $CACHE/Package Storage/PasLS.
Automatic Installation (Recommended):
- Set
"manageBinary": truein settings (default) - The plugin will download the appropriate binary for your platform
- Updates are checked and applied automatically
Manual Installation:
- Set
"manageBinary": falsein settings - Build pasls yourself following the build instructions
- Configure the full path to your binary in the
commandsetting
Binary Naming Convention:
For automatic installation to work, GitHub releases should include platform-specific binaries:
- macOS Intel:
pasls-darwin-x86_64 - macOS Apple Silicon:
pasls-darwin-aarch64 - Linux:
pasls-linux-x86_64 - Windows:
pasls-win64-x86_64.exe
The plugin will automatically detect your platform and download the appropriate binary. If no platform-specific binary is found, you must build pasls manually and use manual installation mode.
You must set up the required environment variables for the Pascal compiler. The binary path is configured automatically unless you're using manual installation mode.
- Open Sublime Text preferences:
Preferences > Package Settings > PasLS > Settings - Configure your environment variables in the user settings:
Automatic Binary Management (Default):
{
"env": {
"FPCDIR": "/usr/local/share/fpcsrc",
"FPCTARGET": "darwin",
"FPCTARGETCPU": "x86_64",
"LAZARUSDIR": "/usr/share/lazarus",
"PP": "/usr/local/lib/fpc/3.2.2/ppcx64"
}
}Manual Binary Management:
{
"manageBinary": false,
"command": ["/path/to/pascal-language-server/pasls"],
"env": {
"FPCDIR": "/usr/local/share/fpcsrc",
"FPCTARGET": "darwin",
"FPCTARGETCPU": "x86_64",
"LAZARUSDIR": "/usr/share/lazarus",
"PP": "/usr/local/lib/fpc/3.2.2/ppcx64"
}
}You can also use the Command Palette: Preferences: PasLS Settings
Note: Do not configure PasLS in Preferences > Package Settings > LSP > Settings under the clients section. That section is only for language servers that don't have their own package.
You can override settings per project by adding LSP settings to your .sublime-project file:
{
"folders": [
{
"path": "."
}
],
"settings": {
"LSP": {
"PasLS": {
"enabled": true,
"command": ["/path/to/pasls"],
"env": {
"FPCDIR": "/usr/local/share/fpcsrc",
"FPCTARGET": "linux",
"FPCTARGETCPU": "x86_64"
},
"initializationOptions": {
"fpcOptions": [
"-Fu/path/to/your/units",
"-Fi/path/to/your/includes",
"-dDEBUG"
],
"symbolDatabase": "$(tmpdir)/myproject-symbols.db"
}
}
}
}
}