docs(tree-sitter): add doctor checks for flag

add in a check ala lsp, this has been applied to every module with tree
sitter support
This commit is contained in:
Jeetaditya Chatterjee 2021-10-19 19:26:26 +01:00
parent 06ed5ade3f
commit 547860e847
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91
18 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,5 @@
;;; lang/agda/doctor.el -*- lexical-binding: t; -*-
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -5,6 +5,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(when (require 'rtags nil t)
;; rtags
(when-let (bins (cl-remove-if #'rtags-executable-find

View file

@ -5,3 +5,7 @@
(let ((omnisharp-bin (or omnisharp-server-executable-path (omnisharp--server-installation-path t))))
(unless (file-exists-p omnisharp-bin)
(warn! "Omnisharp server isn't installed, completion won't work"))))
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -0,0 +1,5 @@
;;; lang/elm/doctor.el -*- lexical-binding: t; -*-
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -5,6 +5,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "guru")
(warn! "Couldn't find guru. Refactoring commands (go-guru-*) won't work"))

View file

@ -5,6 +5,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "javac")
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))

View file

@ -4,3 +4,7 @@
(assert! (or (not (featurep! +lsp))
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -3,3 +3,7 @@
(when (and (featurep! :completion ivy)
(not (executable-find "jq")))
(warn! "Couldn't find jq. counsel-jq won't work." ))
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -4,6 +4,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(when (featurep! +lsp)
(let ((args
(cond ((require 'eglot-jl nil t)

View file

@ -5,6 +5,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "ocamlmerlin")
(warn! "Couldn't find ocamlmerlin. Lookup, completion and syntax checking won't work"))

View file

@ -4,3 +4,7 @@
(assert! (or (not (featurep! +lsp))
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -4,6 +4,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(if (not (or (executable-find "python")
(executable-find "python3")))
(error! "Couldn't find python in your PATH")

View file

@ -4,6 +4,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "ruby")
(warn! "Ruby isn't installed."))

View file

@ -5,6 +5,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "rustc")
(warn! "Couldn't find rustc binary"))

View file

@ -4,6 +4,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(if (and (featurep! +lsp)
(not (executable-find "metals-emacs")))
(warn! "metals-emacs isn't installed"))

View file

@ -3,3 +3,7 @@
(when (featurep! :checkers syntax)
(unless (executable-find "shellcheck")
(warn! "Couldn't find shellcheck. Shell script linting will not work")))
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -0,0 +1,5 @@
;;; lang/swift/doctor.el -*- lexical-binding: t; -*-
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")

View file

@ -4,6 +4,10 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(assert! (or (not (featurep! +tree-sitter))
(featurep! :tools tree-sitter))
"This module requires (:tools tree-sitter)")
(unless (executable-find "js-beautify")
(warn! "Couldn't find js-beautify. Code formatting in JS/CSS/HTML modes will not work."))