From e5680fe85de536fc61ff0f2d4eadc54171d6c982 Mon Sep 17 00:00:00 2001 From: rdipardo <59004801+rdipardo@users.noreply.github.com> Date: Thu, 23 Nov 2023 02:56:19 -0500 Subject: [PATCH] Update Pascal filedef and extension mappings (#3694) * Update Pascal filedef and extension mappings #### filetypes.pascal - add line comments - pair the 'fpc' compile command with another common Free Pascal utility [^1], 'instantfpc', to build and run the current file in a single step #### filetype_extensions.conf - add Lazarus project files (*.lpr) * Replace obsolete [build_settings] with [build-menu] --- data/filedefs/filetypes.pascal | 18 ++++++++++++++---- data/filetype_extensions.conf | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/data/filedefs/filetypes.pascal b/data/filedefs/filetypes.pascal index ab0123de3f..22a7aba562 100644 --- a/data/filedefs/filetypes.pascal +++ b/data/filedefs/filetypes.pascal @@ -38,7 +38,7 @@ mime_type=text/x-pascal #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 # single comments, like # in this file -#comment_single= +comment_single=// # multiline comments comment_open={ comment_close=} @@ -59,8 +59,18 @@ context_action_cmd= # 0 is spaces, 1 is tabs, 2 is tab & spaces #type=1 -[build_settings] +[build-menu] # %f will be replaced by the complete filename # %e will be replaced by the filename without extension -compiler=fpc "%f" -run_cmd="./%e" +FT_00_LB=_Compile +FT_00_CM=fpc -s "%f" +FT_00_WD= +FT_01_LB=_Build +FT_01_CM=fpc "%f" +FT_01_WD= +FT_02_LB=_Run script +FT_02_CM=instantfpc "%f" +FT_02_WD= +EX_00_LB=_Execute +EX_00_CM="./%e" +EX_00_WD= diff --git a/data/filetype_extensions.conf b/data/filetype_extensions.conf index d8dc26e89c..728ab9f40e 100644 --- a/data/filetype_extensions.conf +++ b/data/filetype_extensions.conf @@ -56,7 +56,7 @@ Meson=meson.build;meson.options;meson_options.txt; Nim=*.nim; NSIS=*.nsi;*.nsh; Objective-C=*.m;*.mm;*.h; -Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk; +Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;*.lpr; Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot;