From 062040bdcdc940aa36a4169e6546ebbd643bb8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 30 Nov 2024 21:09:11 -0300 Subject: [PATCH] Added perl LSP support and some syntax highlighting improvements. --- bin/assets/plugins/lspclient.json | 7 +++++++ .../src/eepp/ui/doc/languages/perl.cpp | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/bin/assets/plugins/lspclient.json b/bin/assets/plugins/lspclient.json index 16bb3a2cb..2bc618403 100644 --- a/bin/assets/plugins/lspclient.json +++ b/bin/assets/plugins/lspclient.json @@ -375,6 +375,13 @@ "command": "fortls --hover_signature --hover_language fortran --use_signature_help --incremental_sync", "file_patterns": ["%.f$", "%.f90$", "%.f95$"], "rootIndicationFileNames": [".fortls"] + }, + { + "language": "perl", + "name": "PerlNavigator", + "url": "https://github.com/bscan/PerlNavigator", + "command": "perlnavigator", + "file_patterns": ["%.pm$", "%.pl$"] } ] } diff --git a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/perl.cpp b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/perl.cpp index e0385d66f..0516b66a6 100644 --- a/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/perl.cpp +++ b/src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/perl.cpp @@ -21,7 +21,20 @@ void addPerl() { }, { + { "if", "keyword" }, + { "elsif", "keyword" }, + { "else", "keyword" }, + { "unless", "keyword" }, + { "while", "keyword" }, + { "until", "keyword" }, + { "foreach", "keyword" }, + { "for", "keyword" }, + { "do", "keyword" }, { "atan2", "keyword" }, + { "next", "keyword" }, + { "last", "keyword" }, + { "redo", "keyword" }, + { "goto", "keyword" }, { "endhostent", "keyword" }, { "sysread", "keyword" }, { "last", "keyword" }, @@ -88,7 +101,7 @@ void addPerl() { { "flock", "keyword" }, { "endprotoent", "keyword" }, { "-X", "keyword" }, - { "system", "keyword" }, + { "system", "function" }, { "select", "keyword" }, { "localtime", "keyword" }, { "index", "keyword" }, @@ -215,7 +228,7 @@ void addPerl() { { "shmctl", "keyword" }, { "sin", "keyword" }, { "semctl", "keyword" }, - { "exit", "keyword" }, + { "exit", "function" }, { "getppid", "keyword" }, { "-O", "keyword" }, { "shmget", "keyword" }, @@ -228,7 +241,7 @@ void addPerl() { { "vec", "keyword" }, { "-A", "keyword" }, { "getgrnam", "keyword" }, - { "exec", "keyword" }, + { "exec", "function" }, { "-o", "keyword" }, { "msgctl", "keyword" }, { "msgget", "keyword" },