Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package highlight for openSUSE:Factory 
checked in at 2022-11-13 18:08:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/highlight (Old)
 and      /work/SRC/openSUSE:Factory/.highlight.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "highlight"

Sun Nov 13 18:08:56 2022 rev:39 rq:1035466 version:4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/highlight/highlight.changes      2022-10-01 
17:42:36.657610539 +0200
+++ /work/SRC/openSUSE:Factory/.highlight.new.1597/highlight.changes    
2022-11-13 18:09:16.219546577 +0100
@@ -1,0 +2,11 @@
+Sat Nov 12 17:14:40 UTC 2022 - antoine.belv...@opensuse.org
+
+- Update to version 4.4:
+  * Added support for Zig.
+  * Added `Legacy` option in lsp.conf to add support for LSP
+    servers without capabilities report.
+  * Removed apidocs target in makefile (gl#saalen/highlight#213).
+  * CLI: Added `--ls-legacy` option.
+  * GUI: Added legacy checkbox in the LSP section.
+
+-------------------------------------------------------------------

Old:
----
  highlight-v4.3.tar.bz2

New:
----
  highlight-v4.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ highlight.spec ++++++
--- /var/tmp/diff_new_pack.0ppvDK/_old  2022-11-13 18:09:16.755549691 +0100
+++ /var/tmp/diff_new_pack.0ppvDK/_new  2022-11-13 18:09:16.759549714 +0100
@@ -18,7 +18,7 @@
 
 %bcond_without gui
 Name:           highlight
-Version:        4.3
+Version:        4.4
 Release:        0
 Summary:        Universal Source Code to Formatted Text Converter
 License:        GPL-3.0-or-later

++++++ highlight-v4.3.tar.bz2 -> highlight-v4.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/ChangeLog.adoc 
new/highlight-v4.4/ChangeLog.adoc
--- old/highlight-v4.3/ChangeLog.adoc   2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/ChangeLog.adoc   2022-11-10 20:38:39.000000000 +0100
@@ -6,6 +6,17 @@
 :toc: left
 :toclevels: 1
 
+== highlight 4.4
+
+30.10.2022
+
+  - added support for Zig
+  - added `Legacy` option in lsp.conf to add support for LSP servers without 
capabilities report
+  - removed apidocs target in makefile 
(https://gitlab.com/saalen/highlight/-/issues/213)
+  - CLI: added `--ls-legacy` option
+  - GUI: added legacy checkbox in the LSP section
+  - GUI W32: fixed issue with non standard filename encodings 
(https://gitlab.com/saalen/highlight/-/issues/215)
+
 == highlight 4.3
 
 24.09.2022
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/README.adoc 
new/highlight-v4.4/README.adoc
--- old/highlight-v4.3/README.adoc      2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/README.adoc      2022-11-10 20:38:39.000000000 +0100
@@ -1,6 +1,6 @@
 = HIGHLIGHT MANUAL
 André Simon
-v4.1, April 2021
+v4.4, October 2021
 :lang: en
 :toc: left
 :toc-title: Contents
@@ -311,6 +311,7 @@
      --ls-syntax-error          retrieve syntax error information
                                   (assumes --ls-hover or --ls-semantic)
      --ls-workspace=<dir>       set workspace directory to init. the server
+     --ls-legacy                do not require a server capabilities response
 
................................................................................
 
 === GUI OPTIONS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/README_DE.adoc 
new/highlight-v4.4/README_DE.adoc
--- old/highlight-v4.3/README_DE.adoc   2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/README_DE.adoc   2022-11-10 20:38:39.000000000 +0100
@@ -1,6 +1,6 @@
 = HIGHLIGHT HANDBUCH
 André Simon
-v4.1, April 2021
+v4.4, Oktober 2021
 :lang: de
 :toc: left
 :toc-title: Contents
@@ -301,6 +301,7 @@
      --ls-syntax-error          retrieve syntax error information
                                   (assumes --ls-hover or --ls-semantic)
      --ls-workspace=<dir>       set workspace directory to init. the server
+     --ls-legacy                do not require a server capabilities response
 
................................................................................
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/highlight-v4.3/extras/eclipse-themes/eclipse_color_themes.py 
new/highlight-v4.4/extras/eclipse-themes/eclipse_color_themes.py
--- old/highlight-v4.3/extras/eclipse-themes/eclipse_color_themes.py    
2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/extras/eclipse-themes/eclipse_color_themes.py    
2022-11-10 20:38:39.000000000 +0100
@@ -4,6 +4,9 @@
 # Script to pull one of the themes available at eclipsecolorthemes.org.
 # The retrieved XML file is converted to the highlight Lua file format.
 
+# In October 2022 eclipsecolorthemes.org went offline. See possible new source:
+# https://github.com/eclipse-color-theme/eclipse-color-theme/issues/290
+
 import requests
 import sys
 import xml.etree.ElementTree as ET
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/gui_files/ext/fileopenfilter.conf 
new/highlight-v4.4/gui_files/ext/fileopenfilter.conf
--- old/highlight-v4.3/gui_files/ext/fileopenfilter.conf        2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/gui_files/ext/fileopenfilter.conf        2022-11-10 
20:38:39.000000000 +0100
@@ -237,4 +237,5 @@
 XML (*.xml)
 Yaiff (*.yaiff)
 Yang (*.yang)
+Zig (*.zig)
 Zonnon (*.znn)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/langDefs/zig.lang 
new/highlight-v4.4/langDefs/zig.lang
--- old/highlight-v4.3/langDefs/zig.lang        1970-01-01 01:00:00.000000000 
+0100
+++ new/highlight-v4.4/langDefs/zig.lang        2022-11-10 20:38:39.000000000 
+0100
@@ -0,0 +1,54 @@
+
+Description="Zig"
+
+Categories = {"source"}
+
+Digits = [[ (?:0x|0X|0b)[0-9a-fA-F']+|\d*[\.]?\d+(?:[eE][\-\+]\d+)?[lLuU]* ]]
+
+Keywords={
+  { Id=1,
+    List={
+      "align", "allowzero", "and", "anyframe", "anytype", "asm", "async", 
"await", "break", "callconv", "catch",
+      "comptime", "const", "continue", "defer", "else", "enum", "errdefer", 
"error", "export", "extern", "fn",
+      "for", "if", "inline", "noalias", "nosuspend", "noinline", "opaque", 
"or", "orelse", "packed", "pub",
+      "resume", "return", "linksection", "struct", "suspend", "switch", 
"test", "threadlocal", "try", "union",
+      "unreachable", "usingnamespace", "var", "volatile", "while"
+    }
+  },
+  { Id=2,
+    List= {
+      "i8", "u8", "i16", "u16", "i32", "u32", "i64", "u64", "i128", "u128", 
"isize", "usize", "c_short", "c_ushort",
+      "c_int", "c_uint", "c_long", "c_ulong", "c_longlong", "c_ulonglong", 
"c_longdouble", "f16", "f32", "f64",
+      "f80", "f128", "bool", "void", "noreturn", "type", "anyerror", 
"comptime_int", "comptime_float"
+    }
+  },
+  { Id=5,
+    Regex=[[ @\w+ ]]
+  },
+  -- multiline strings
+  { Id=3,
+    Regex=[[ \\\\.+ ]]
+  },
+  { Id=4,
+    Regex=[[(\w+)\s*\(]]
+  }
+}
+
+Strings = {
+  Delimiter=[["|']],
+  Interpolation = [[ \{[\w_\?]*?\} ]],
+}
+
+Comments = {
+  {
+    Block=false,
+    Delimiter = { [[//]] }
+  }
+}
+
+IgnoreCase=false
+
+Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^|\?]]
+
+EnableIndentation=true
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/lsp.conf new/highlight-v4.4/lsp.conf
--- old/highlight-v4.3/lsp.conf 2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/lsp.conf 2022-11-10 20:38:39.000000000 +0100
@@ -7,7 +7,7 @@
 
 Servers = {
 
-  { Server="bash-language-server", Exec="bash-language-server", 
Syntax="shellscript", Options={"start"} },
+  { Server="bash-language-server", Exec="bash-language-server", 
Syntax="shellscript", Options={"start"}, Legacy=true },
 
   { Server="clangd", Exec="clangd", Syntax="c", Options={"--log=error"} },
   { Server="ccls", Exec="ccls", Syntax="c", Options={"-v=-3", "--"} },
@@ -19,6 +19,9 @@
   { Server="rust-analyzer", Exec="rust-analyzer", Syntax="rust", Delay=250, 
Options={} },
 
   { Server="pyls", Exec="pyls", Syntax="python", 
Options={"--check-parent-process"} },
+  { Server="pylsp", Exec="pylsp", Syntax="python", 
Options={"--check-parent-process"} },
+
+  { Server="pyright", Exec="pyright-langserver", Syntax="python", 
Options={"--stdio"}, Legacy=true },
 
   { Server="R", Exec="R", Syntax="r", Options={"--slave", "-e", 
"languageserver::run()"} },
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/makefile new/highlight-v4.4/makefile
--- old/highlight-v4.3/makefile 2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/makefile 2022-11-10 20:38:39.000000000 +0100
@@ -195,9 +195,6 @@
 clean-obj:
        $(MAKE) -C ./src -f ./makefile clean-obj
 
-apidocs:
-       doxygen Doxyfile
-
 completions:
        sh-completion/gen-completions bash >sh-completion/highlight.bash
        sh-completion/gen-completions fish >sh-completion/highlight.fish
@@ -213,8 +210,7 @@
        @echo "install          Copy all data files to ${hl_data_dir}."
        @echo "install-gui      Copy GUI data files to ${hl_data_dir}."
        @echo "clean            Remove object files and binaries."
-       @echo "apidocs          Generate HTML API documentation using doxygen."
-       @echo "completions      Generate shell completion scripts."
+       @echo "completions      Generate shell completion scripts."
        @echo "uninstall        Remove highlight files from system."
        @echo
        @echo "See src/makefile for compilation and linking options."
@@ -222,4 +218,4 @@
 # Target needed for redhat 9.0 rpmbuild
 install-strip:
 
-.PHONY: clean all install apidocs help uninstall install-strip clean-obj
+.PHONY: clean all install help uninstall install-strip clean-obj
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/man/highlight.1 
new/highlight-v4.4/man/highlight.1
--- old/highlight-v4.3/man/highlight.1  2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/man/highlight.1  2022-11-10 20:38:39.000000000 +0100
@@ -193,6 +193,8 @@
 retrieve syntax error information (assumes --ls-hover or --ls-semantic)
 .IP "\fB--ls-workspace\fR=<\fIdir\fR>"
 set workspace directory to initialize the server
+.IP "\fB--ls-legacy\fR"
+do not require a server capabilities response
 
 .SH ENV VARIABLES
 Highlight recognizes these variables:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/sh-completion/gen-completions 
new/highlight-v4.4/sh-completion/gen-completions
--- old/highlight-v4.3/sh-completion/gen-completions    2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/sh-completion/gen-completions    2022-11-10 
20:38:39.000000000 +0100
@@ -181,6 +181,8 @@
    :description "retrieve syntax error information (assumes --ls-hover or 
--ls-semantic)"
 parser:option "--ls-workspace"
    :description "set workspace directory to init. the server"
+parser:option "--ls-legacy"
+   :description "do not require a server capabilities response"
 
 local p = argparse "gen-completions"
 p:argument "shell"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/cli/cmdlineoptions.cpp 
new/highlight-v4.4/src/cli/cmdlineoptions.cpp
--- old/highlight-v4.3/src/cli/cmdlineoptions.cpp       2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/cli/cmdlineoptions.cpp       2022-11-10 
20:38:39.000000000 +0100
@@ -51,7 +51,8 @@
         S_OPT_REFORMAT_OPT, S_OPT_RANGE_OPT, S_OPT_BASE16, S_OPT_CATEGORIES, 
S_OPT_PIPED_FNAME,
         S_OPT_ISOLATE, S_OPT_MAX_FILE_SIZE, S_OPT_SYNTAX_SUPPORTED,
         S_OPT_LS_PROFILE, S_OPT_LS_WORKSPACE, S_OPT_LS_EXEC, S_OPT_LS_OPTION, 
S_OPT_LS_HOVER,
-        S_OPT_LS_SEMANTIC, S_OPT_LS_RAINBOW, S_OPT_LS_SYNTAX, 
S_OPT_LS_SYNTAX_ERROR, S_OPT_LS_DELAY
+        S_OPT_LS_SEMANTIC, S_OPT_LS_RAINBOW, S_OPT_LS_SYNTAX, 
S_OPT_LS_SYNTAX_ERROR,
+        S_OPT_LS_DELAY, S_OPT_LS_LEGACY
     };
 
 const Arg_parser::Option options[] = {
@@ -150,9 +151,9 @@
         { S_OPT_LS_SEMANTIC, OPT_LS_SEMANTIC, Arg_parser::no },
         { S_OPT_LS_RAINBOW, OPT_LS_RAINBOW, Arg_parser::no },
         { S_OPT_LS_SYNTAX_ERROR, OPT_LS_SYNTAX_ERROR, Arg_parser::no },
-
         { S_OPT_LS_SYNTAX, OPT_LS_SYNTAX, Arg_parser::yes },
         { S_OPT_LS_DELAY, OPT_LS_DELAY, Arg_parser::yes },
+        { S_OPT_LS_LEGACY, OPT_LS_LEGACY, Arg_parser::no },
 
         { 0, 0, Arg_parser::no }
     };
@@ -216,6 +217,7 @@
     opt_ls_semantic(false),
     opt_ls_rainbow(false),
     opt_ls_syntax_error(false),
+    opt_ls_legacy(false),
     maxFileSize(268435456),
     fallbackSyntax("txt"),
     anchorPrefix ( "l" ),
@@ -675,6 +677,9 @@
         case S_OPT_LS_SYNTAX_ERROR:
             opt_ls_syntax_error = true;
             break;
+        case S_OPT_LS_LEGACY:
+            opt_ls_legacy = true;
+            break;
         case S_OPT_LS_DELAY:
              StringTools::str2num<int> ( lsDelay, arg, std::dec );
             break;
@@ -916,6 +921,10 @@
 {
     return opt_ls_syntax_error;
 }
+bool CmdLineOptions::isLsLegacy() const
+{
+    return opt_ls_legacy;
+}
 const string &CmdLineOptions::getDataDir() const
 {
     return dataDir;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/cli/cmdlineoptions.h 
new/highlight-v4.4/src/cli/cmdlineoptions.h
--- old/highlight-v4.3/src/cli/cmdlineoptions.h 2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/cli/cmdlineoptions.h 2022-11-10 20:38:39.000000000 
+0100
@@ -138,6 +138,7 @@
 #define OPT_LS_RAINBOW       "ls-rainbow"
 #define OPT_LS_SYNTAX        "ls-syntax"
 #define OPT_LS_DELAY         "ls-delay"
+#define OPT_LS_LEGACY        "ls-legacy"
 #define OPT_LS_SYNTAX_ERROR  "ls-syntax-error"
 
 /// handle command line options
@@ -354,15 +355,18 @@
     /** \return false  */
     bool isLsRainbow () const;
 
-    /** \return false  */
+    /** \return true if the LSP semantic highlighting features should be used 
*/
     bool isLsSemantic () const;
 
-    /** \return false  */
+    /** \return true if the LSP hover features should be used  */
     bool isLsHover () const;
 
-    /** \return false  */
+    /** \return true if the LSP error message features should be used  */
     bool isLsSyntaxError () const;
 
+    /** \return true if the LSP server does not support capabilities report  */
+    bool isLsLegacy() const;
+
     /** \return max. input file size (default 256 MB) */
     off_t getMaxFileSize() const;
 
@@ -543,6 +547,7 @@
     bool opt_ls_semantic;
     bool opt_ls_rainbow;
     bool opt_ls_syntax_error;
+    bool opt_ls_legacy;
 
     off_t maxFileSize;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/cli/help.cpp 
new/highlight-v4.4/src/cli/help.cpp
--- old/highlight-v4.3/src/cli/help.cpp 2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/cli/help.cpp 2022-11-10 20:38:39.000000000 +0100
@@ -255,6 +255,7 @@
         cout<<"     --ls-syntax-error          retrieve syntax error 
information\n";
         cout<<"                                  (assumes --ls-hover or 
--ls-semantic)\n";
         cout<<"     --ls-workspace=<dir>       set workspace directory to 
init. the server\n";
+        cout<<"     --ls-legacy                do not require a server 
capabilities response\n";
         cout<<"\n\n";
 
         cout<<"If no in- or output files are specified, stdin and stdout will 
be used.\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/cli/main.cpp 
new/highlight-v4.4/src/cli/main.cpp
--- old/highlight-v4.3/src/cli/main.cpp 2022-09-28 19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/cli/main.cpp 2022-11-10 20:38:39.000000000 +0100
@@ -379,6 +379,7 @@
     std::string lsExecutable(options.getLsExecutable());         ///< server 
executable path
     std::string lsSyntax(options.getLsSyntax());                   ///< 
language definition which can be enhanced using the LS
     int lsDelay=options.getLsDelay();
+    bool lsLegacy=options.isLsLegacy();
     std::vector<std::string> lsOptions = options.getLSOptions(); ///< server 
executable start options
 
     if (lsProfile.size()) {
@@ -393,6 +394,8 @@
                 lsOptions = profile.options;
             if (lsDelay==0)
                 lsDelay = profile.delay;
+            if (lsLegacy==false)
+                lsLegacy = profile.legacy;
         } else {
             cerr << "highlight: Unknown LSP profile '"<< lsProfile << "'.\n";
             return EXIT_FAILURE;
@@ -698,15 +701,14 @@
                 }
 
                 highlight::LSResult lsInitRes=generator->initLanguageServer ( 
lsExecutable, lsOptions,
-                                                                              
options.getLsWorkspace(), lsSyntax,
-                                                                              
lsDelay,
-                                                                              
options.verbosityLevel() );
+                                                                              
options.getLsWorkspace(), lsSyntax, lsDelay,
+                                                                              
options.verbosityLevel(), lsLegacy );
                 if ( lsInitRes==highlight::INIT_BAD_PIPE ) {
                     cerr << "highlight: language server connection failed\n";
                     initError = true;
                     break;
                 } else if ( lsInitRes==highlight::INIT_BAD_REQUEST ) {
-                    cerr << "highlight: language server initialization 
failed\n";
+                    cerr << "highlight: language server initialization failed. 
Consider --ls-legacy option.\n";
                     initError = true;
                     break;
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/core/codegenerator.cpp 
new/highlight-v4.4/src/core/codegenerator.cpp
--- old/highlight-v4.3/src/core/codegenerator.cpp       2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/core/codegenerator.cpp       2022-11-10 
20:38:39.000000000 +0100
@@ -205,7 +205,7 @@
 
 LSResult CodeGenerator::initLanguageServer ( const string& executable, const 
vector<string> &options,
                                              const string& workspace, const 
string& syntax,
-                                             int delay, int logLevel )
+                                             int delay, int logLevel, bool 
legacy )
 {
     if (LSPClient.isInitialized()) {
         return LSResult::INIT_OK;
@@ -218,6 +218,7 @@
     LSPClient.setOptions(options);
     LSPClient.setSyntax(syntax);
     LSPClient.setInitializeDelay(delay);
+    LSPClient.setLegacyProtocol(legacy);
     if (!LSPClient.connect()){
         return LSResult::INIT_BAD_PIPE;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/core/datadir.cpp 
new/highlight-v4.4/src/core/datadir.cpp
--- old/highlight-v4.3/src/core/datadir.cpp     2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/core/datadir.cpp     2022-11-10 20:38:39.000000000 
+0100
@@ -233,7 +233,8 @@
         std::string serverName;              ///< server name
         std::string executable;              ///< server executable path
         std::string syntax;                  ///< language definition which 
can be enhanced using the LS
-        int delay;
+        int delay;                           ///< server delay in milliseconds 
after initialization request
+        bool legacy;                         ///< do not rely on a LS 
capabilities response
         std::vector<std::string> options;    ///< server executable start 
options
         Diluculum::LuaValue mapEntry;
 
@@ -248,6 +249,11 @@
                 delay = mapEntry["Delay"].asNumber();
             }
 
+            legacy = false;
+            if (mapEntry["Legacy"] !=Diluculum::Nil) {
+                legacy = mapEntry["Legacy"].asBoolean();
+            }
+
             if (mapEntry["Options"] !=Diluculum::Nil) {
                 int extIdx=1;
                 while (mapEntry["Options"][extIdx] !=Diluculum::Nil) {
@@ -262,6 +268,7 @@
             profile.syntax = syntax;
             profile.options = options;
             profile.delay = delay;
+            profile.legacy = legacy;
 
             lspProfiles[serverName]=profile;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/core/lspclient.cpp 
new/highlight-v4.4/src/core/lspclient.cpp
--- old/highlight-v4.3/src/core/lspclient.cpp   2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/core/lspclient.cpp   2022-11-10 20:38:39.000000000 
+0100
@@ -48,6 +48,7 @@
     hoverProvider(false),
     semanticTokensProvider(false),
     logRequests(false),
+    legacyProtocol(false),
     initDelay(0),
     msgId(1.0),
     lastErrorCode(0)
@@ -98,6 +99,11 @@
         triggerSyntax = syntax;
     }
 
+    void LSPClient::setLegacyProtocol ( bool legacy ) {
+        legacyProtocol = legacy;
+    }
+
+
     void LSPClient::signal_callback_handler(int signum){
     }
 
@@ -433,9 +439,16 @@
             return false;
         }
 
-        if (   !jsonResponse.get("result").is<picojson::object>()
-            && 
!jsonResponse.get("result").get("capabilities").is<picojson::object>()) {
+        if (legacyProtocol) {
+            hoverProvider = true;
+            return true;
+        }
+
+        if (!jsonResponse.get("result").is<picojson::object>()) {
+            return false;
+        }
 
+        if 
(!jsonResponse.get("result").get("capabilities").is<picojson::object>()) {
             return false;
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/gui-qt/mainwindow.cpp 
new/highlight-v4.4/src/gui-qt/mainwindow.cpp
--- old/highlight-v4.3/src/gui-qt/mainwindow.cpp        2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/gui-qt/mainwindow.cpp        2022-11-10 
20:38:39.000000000 +0100
@@ -537,6 +537,8 @@
                       ui->cbLSSemantic->isChecked());
     settings.setValue(ui->cbLSSyntaxErrors->property(name).toString(),
                       ui->cbLSSyntaxErrors->isChecked());
+    settings.setValue(ui->cbLSLegacy->property(name).toString(),
+                      ui->cbLSLegacy->isChecked());
 
     settings.setValue(ui->leSVGHeight->property(name).toString(),
                       ui->leSVGHeight->text());
@@ -633,6 +635,7 @@
     
ui->cbLSHover->setChecked(settings.value(ui->cbLSHover->property(name).toString()).toBool());
     
ui->cbLSSemantic->setChecked(settings.value(ui->cbLSSemantic->property(name).toString()).toBool());
     
ui->cbLSSyntaxErrors->setChecked(settings.value(ui->cbLSSyntaxErrors->property(name).toString()).toBool());
+    
ui->cbLSLegacy->setChecked(settings.value(ui->cbLSLegacy->property(name).toString()).toBool());
 
     ui->comboEncoding->insertItem(0, 
settings.value(ui->comboEncoding->property(name).toString()).toString());
     ui->comboEncoding->setCurrentIndex(0);
@@ -706,7 +709,8 @@
        std::string serverName;              ///< server name
        std::string executable;              ///< server executable path
        std::string syntax;                  ///< language definition which can 
be enhanced using the LS
-       int delay=0;
+       int delay=0;                         ///< server delay in milliseconds 
after initialization request
+       bool legacy=false;                   ///< do not rely on a LS 
capabilities response
        std::vector<std::string> options;    ///< server executable start 
options
        Diluculum::LuaValue mapEntry;
 
@@ -730,12 +734,18 @@
                delay = mapEntry["Delay"].asNumber();
            }
 
+           legacy = false;
+           if (mapEntry["Legacy"] !=Diluculum::Nil) {
+                legacy = mapEntry["Legacy"].asBoolean();
+           }
+
            highlight::LSPProfile profile;
            profile.executable = executable;
            profile.serverName = serverName;
            profile.syntax = syntax;
            profile.options = options;
            profile.delay = delay;
+           profile.legacy = legacy;
 
            lspProfiles[serverName]=profile;
 
@@ -1207,7 +1217,7 @@
         inFilePath = getWindowsShortPath(inFilePath);
 
 #endif
-        currentFile = inFilePath.toStdString();
+        currentFile = inFilePath.toLocal8Bit().data();
 
         statusBar()->showMessage(tr("Processing %1 
(%2/%3)").arg(origFilePath).arg(i+1).arg(ui->lvInputFiles->count()));
 
@@ -1251,7 +1261,7 @@
                     absOutPath = getWindowsShortPath(absOutPath);
                 }
 #endif
-                outfileName = absOutPath.toStdString();
+                outfileName = absOutPath.toLocal8Bit().data();
             } else {
                 QFileInfo outFileInfo;
                 QString fName=inFileName;
@@ -1279,7 +1289,7 @@
                     absOutPath = getWindowsShortPath(absOutPath);
                 }
 #endif
-                outfileName = absOutPath.toStdString();
+                outfileName = absOutPath.toLocal8Bit().data();
             }
 
             if (ui->cbHTMLFileNameAnchor->isChecked()) {
@@ -1782,13 +1792,13 @@
                 if (getDataFromCP) {
                     previewData= QString::fromUtf8( 
pwgenerator.generateString(savedClipboardContent.toStdString()).c_str());
                 } else {
-                    previewData= QString::fromUtf8( 
pwgenerator.generateStringFromFile(previewInputPath.toStdString()).c_str());
+                    previewData= QString::fromUtf8( 
pwgenerator.generateStringFromFile(previewInputPath.toLocal8Bit().data()).c_str());
                 }
             } else {
                 if (getDataFromCP) {
                     previewData= QString::fromStdString( 
pwgenerator.generateString(savedClipboardContent.toStdString()));
                 } else {
-                    previewData= QString::fromStdString( 
pwgenerator.generateStringFromFile(previewInputPath.toStdString()));
+                    previewData= QString::fromStdString( 
pwgenerator.generateStringFromFile(previewInputPath.toLocal8Bit().data()));
                 }
             }
 
@@ -2166,6 +2176,8 @@
             lsOptions = profile.options;
             lsDelay = profile.delay;
 
+            ui->cbLSLegacy->setChecked(profile.legacy);
+
             ui->leLSExec->setText(QString::fromStdString(lsExecutable));
         }
     }
@@ -2183,7 +2195,8 @@
     highlight::LSResult lsInitRes=generator->initLanguageServer ( 
lsExecutable, lsOptions,
                                                                   lsWorkSpace, 
lsSyntax,
                                                                   lsDelay,
-                                                                  
ui->cbLSDebug->isChecked() ? 2 : 0 );
+                                                                  
ui->cbLSDebug->isChecked() ? 2 : 0,
+                                                                  
ui->cbLSLegacy->isChecked() );
     if ( lsInitRes==highlight::INIT_OK ) {
         if (tellMe) {
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/gui-qt/mainwindow.ui 
new/highlight-v4.4/src/gui-qt/mainwindow.ui
--- old/highlight-v4.3/src/gui-qt/mainwindow.ui 2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/gui-qt/mainwindow.ui 2022-11-10 20:38:39.000000000 
+0100
@@ -78,7 +78,7 @@
      <x>0</x>
      <y>0</y>
      <width>957</width>
-     <height>19</height>
+     <height>20</height>
     </rect>
    </property>
    <widget class="QMenu" name="menu_File">
@@ -141,7 +141,7 @@
         </size>
        </property>
        <property name="currentIndex">
-        <number>4</number>
+        <number>0</number>
        </property>
        <property name="elideMode">
         <enum>Qt::ElideNone</enum>
@@ -258,6 +258,7 @@
             <widget class="QLabel" name="label_11">
              <property name="font">
               <font>
+               <weight>75</weight>
                <bold>true</bold>
               </font>
              </property>
@@ -367,6 +368,7 @@
            <property name="font">
             <font>
              <pointsize>11</pointsize>
+             <weight>75</weight>
              <bold>true</bold>
             </font>
            </property>
@@ -438,6 +440,7 @@
           <widget class="QPushButton" name="pbCopyToCP">
            <property name="font">
             <font>
+             <weight>75</weight>
              <bold>true</bold>
             </font>
            </property>
@@ -626,6 +629,7 @@
           <widget class="QLabel" name="label_15">
            <property name="font">
             <font>
+             <weight>75</weight>
              <bold>true</bold>
             </font>
            </property>
@@ -753,30 +757,6 @@
          <string>LSP</string>
         </attribute>
         <layout class="QGridLayout" name="gridLayout_5">
-         <item row="0" column="0">
-          <layout class="QHBoxLayout" name="horizontalLayout_31">
-           <item>
-            <widget class="QLabel" name="label_10">
-             <property name="text">
-              <string>Language Server:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QComboBox" name="comboLSProfiles">
-             <property name="toolTip">
-              <string>Select a Language Server profile.</string>
-             </property>
-             <property name="editable">
-              <bool>false</bool>
-             </property>
-             <property name="currentText">
-              <string notr="true"/>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
          <item row="1" column="0">
           <layout class="QHBoxLayout" name="horizontalLayout_32">
            <item>
@@ -811,6 +791,30 @@
            </item>
           </layout>
          </item>
+         <item row="0" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout_31">
+           <item>
+            <widget class="QLabel" name="label_10">
+             <property name="text">
+              <string>Language Server:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QComboBox" name="comboLSProfiles">
+             <property name="toolTip">
+              <string>Select a Language Server profile.</string>
+             </property>
+             <property name="editable">
+              <bool>false</bool>
+             </property>
+             <property name="currentText">
+              <string notr="true"/>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
          <item row="2" column="0">
           <layout class="QHBoxLayout" name="horizontalLayout_34">
            <item>
@@ -835,13 +839,6 @@
            </item>
           </layout>
          </item>
-         <item row="3" column="0">
-          <widget class="Line" name="line_6">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-          </widget>
-         </item>
          <item row="4" column="0">
           <layout class="QHBoxLayout" name="horizontalLayout_33">
            <item>
@@ -876,16 +873,10 @@
            </item>
           </layout>
          </item>
-         <item row="5" column="0">
-          <widget class="QCheckBox" name="cbLSHover">
-           <property name="toolTip">
-            <string>Run hover requests to add tooltips to your output (HTML 
only).</string>
-           </property>
-           <property name="text">
-            <string>Hover</string>
-           </property>
-           <property name="checkable">
-            <bool>true</bool>
+         <item row="3" column="0">
+          <widget class="Line" name="line_6">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
            </property>
           </widget>
          </item>
@@ -915,6 +906,29 @@
            </property>
           </widget>
          </item>
+         <item row="5" column="0">
+          <widget class="QCheckBox" name="cbLSHover">
+           <property name="toolTip">
+            <string>Run hover requests to add tooltips to your output (HTML 
only).</string>
+           </property>
+           <property name="text">
+            <string>Hover</string>
+           </property>
+           <property name="checkable">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="8" column="0">
+          <widget class="QCheckBox" name="cbLSLegacy">
+           <property name="toolTip">
+            <string>Do not require a server capabilities response</string>
+           </property>
+           <property name="text">
+            <string>Legacy Protocol</string>
+           </property>
+          </widget>
+         </item>
         </layout>
        </widget>
       </widget>
@@ -965,6 +979,7 @@
              </property>
              <property name="font">
               <font>
+               <weight>75</weight>
                <bold>true</bold>
               </font>
              </property>
@@ -986,6 +1001,7 @@
              </property>
              <property name="font">
               <font>
+               <weight>75</weight>
                <bold>true</bold>
               </font>
              </property>
@@ -1526,6 +1542,7 @@
                   <widget class="QLabel" name="label_8">
                    <property name="font">
                     <font>
+                     <weight>50</weight>
                      <bold>false</bold>
                     </font>
                    </property>
@@ -2521,7 +2538,7 @@
              </property>
              <property name="currentFont">
               <font>
-               <family>DejaVu Sans</family>
+               <family>Consolas</family>
               </font>
              </property>
             </widget>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/include/codegenerator.h 
new/highlight-v4.4/src/include/codegenerator.h
--- old/highlight-v4.3/src/include/codegenerator.h      2022-09-28 
19:52:30.000000000 +0200
+++ new/highlight-v4.4/src/include/codegenerator.h      2022-11-10 
20:38:39.000000000 +0100
@@ -129,7 +129,7 @@
     bool initTheme ( const string& themePath, bool loadSemanticStyles=false );
 
     LSResult initLanguageServer ( const string& executable, const 
vector<string> &options, const string& workspace,
-                                  const string& syntax, int delay, int 
logLevel );
+                                  const string& syntax, int delay, int 
logLevel, bool legacy = false );
 
     void exitLanguageServer ();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/include/lspclient.h 
new/highlight-v4.4/src/include/lspclient.h
--- old/highlight-v4.3/src/include/lspclient.h  2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/include/lspclient.h  2022-11-10 20:38:39.000000000 
+0100
@@ -63,6 +63,7 @@
     bool hoverProvider;
     bool semanticTokensProvider;
     bool logRequests;
+    bool legacyProtocol;
 
     std::string executable, workspace;
     std::string serverName, serverVersion;
@@ -122,6 +123,8 @@
 
     void setSyntax ( const std::string& syntax );
 
+    void setLegacyProtocol ( bool legacy );
+
     bool connect();
 
     bool runInitialize();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/include/lspprofile.h 
new/highlight-v4.4/src/include/lspprofile.h
--- old/highlight-v4.3/src/include/lspprofile.h 2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/include/lspprofile.h 2022-11-10 20:38:39.000000000 
+0100
@@ -56,6 +56,7 @@
     std::string executable;              ///< server executable path
     std::string syntax;                  ///< language definition which can be 
enhanced using the LS
     int delay;                           ///< server delay in milliseconds 
after initialization request
+    bool legacy;                         ///< do not rely on a LS capabilities 
response
     std::vector<std::string> options;    ///< server executable start options
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/highlight-v4.3/src/include/version.h 
new/highlight-v4.4/src/include/version.h
--- old/highlight-v4.3/src/include/version.h    2022-09-28 19:52:30.000000000 
+0200
+++ new/highlight-v4.4/src/include/version.h    2022-11-10 20:38:39.000000000 
+0100
@@ -31,7 +31,7 @@
 #include <string>
 
 #define HIGHLIGHT_MAJOR "4"
-#define HIGHLIGHT_MINOR "3"
+#define HIGHLIGHT_MINOR "4"
 
 #define HIGHLIGHT_VERSION  HIGHLIGHT_MAJOR "." HIGHLIGHT_MINOR
 

Reply via email to