You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Libraries like https://github.com/gnl/ghostwheel have a macro >defn for defining functions, in one of my codebases i define >defn myself, but it's implemented with malli.experimental/defn
There's no way to adjust clojure-ts-mode syntax highlighting without forking the repo, e.g.
(defconst clojure-ts--definition-keyword-regexp
(rx
line-start
(or (group (or "ns" "fn"))
(group ">def"
(+ (or alnum
;; What are valid characters for symbols? is a negative match better?
"-" "_" "!" "@" "#" "$" "%" "^" "&" "*" "|" "?" "<" ">" "+" "=" ":")))
(group "def"
(+ (or alnum
;; What are valid characters for symbols? is a negative match better?
"-" "_" "!" "@" "#" "$" "%" "^" "&" "*" "|" "?" "<" ">" "+" "=" ":"))))
line-end))
(defvar clojure-ts--function-type-regexp
(rx string-start (or ">defn" "defn" "defmethod") string-end))
There should be a general extension mechanism.
One random idea is we parse PROJECT/.clj-kondo/** edn files for :lint-as, e.g.
I would like to add a customizable variable janet-ts-indent-special-words to add extra custom values to indent-special. Mainly because I have been working on a DSL which includes a lot of defn-like macros which don't start with "def", and would like to be able to get good indentation for them without modifying janet-ts-mode directly.
Yeah we're going to have to add something similar to janet-ts-mode. Once semantic indentation is in I think I would like to consolidate some of the regular expressions and add an extension mechanism.
This also begins the process of making our symbol matching regular
expressions user extensible (see issue #15). There are more to convert
from regexps to normal lists, but I want to take my time and make sure I
get the names down correctly. It is important to get maximum reuse so
users don't have to add their fancy def-whatever to 4 different lists.
Libraries like https://github.com/gnl/ghostwheel have a macro
>defn
for defining functions, in one of my codebases i define>defn
myself, but it's implemented with malli.experimental/defnThere's no way to adjust clojure-ts-mode syntax highlighting without forking the repo, e.g.
There should be a general extension mechanism.
One random idea is we parse PROJECT/.clj-kondo/** edn files for :lint-as, e.g.
Although doing this the proper way would probably add too much complexity.
The text was updated successfully, but these errors were encountered: