branch: externals/bicep-ts-mode
commit 28191e9fdbf95fb8f3a0f30dc368ec5f0a57629d
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 | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 7c01066f87..5cbcddb14f 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -57,24 +57,20 @@ 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)
 
 (defvar bicep-ts-mode--syntax-table
   (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)
+    (modify-syntax-entry ?:  "."    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