branch: externals/bicep-ts-mode
commit 68a9de4f0e9141b9e74bb3b8aa565722c3fcbc67
Author: Jostein Kjønigsen <jost...@kjonigsen.net>
Commit: Jostein Kjønigsen <jost...@kjonigsen.net>

    Clean up syntax-table && document it better.
    
    - Explicitly add support for escape-chars
---
 bicep-ts-mode.el | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 7c01066f87..3c2b55f891 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -57,9 +57,8 @@ Changes may require an Emacs-restart to take effect."
 
 (defcustom bicep-ts-mode-default-langserver-path
   (expand-file-name ".cache/bicep/Bicep.LangServer.dll" user-emacs-directory)
-  ;; FIXME: Document the ability to use $ENV vars and glob patterns?
   "Default expression used to locate Bicep Languageserver.
-If found, added to eglot.
+If found, added to eglot.  Supports environment-variables and glob-pattterns.
 Changes may require an Emacs-restart to take effect."
   :type 'string)
 
@@ -67,14 +66,11 @@ Changes may require an Emacs-restart to take effect."
   (let ((table (make-syntax-table)))
     (modify-syntax-entry ?=  "."   table)
     (modify-syntax-entry ?:  "."   table)
-    (modify-syntax-entry ?'  "\""  table)
-    (modify-syntax-entry ?\" "."  table)
-    (modify-syntax-entry ?\n ">" table)
-
-    ;; Define `//` as a comment starter
-    (modify-syntax-entry ?/ ". 12" table)
-    ;; Define newline as the comment end
-    ;;(modify-syntax-entry ?\n ">" table)
+    (modify-syntax-entry ?\" "."  table)   ;; Double quote as punctuation
+    (modify-syntax-entry ?'  "\""  table)  ;; Single quote as string-delimiter
+    (modify-syntax-entry ?\\ "\\" table)   ;; Backslash as escape character
+    (modify-syntax-entry ?/ ". 12" table)  ;; Define `//` as a comment starter
+    (modify-syntax-entry ?\n ">" table)    ;; Newline ends comments
     table)
   "Syntax table for `bicep-ts-mode'.")
 

Reply via email to