Open jasonjckn opened 1 year ago
Sort of related to:
There should be a general extension mechanism.
FWIW, for janet-ts-mode there was a similar request:
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.
So we did this.
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.
As for reading files, maybe reading cljfmt configuration files (based on the current project) would be worthwhile. See https://github.com/weavejester/cljfmt#configuration
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.