Fuco1 / .emacs.d

My emacs config
MIT License
69 stars 13 forks source link

Make a package for flycheck to automatically use local installations #50

Open Fuco1 opened 6 years ago

Fuco1 commented 6 years ago

I have to repeat the same code all over again and again in my personal configuration to update paths to use local installations.

(example)

;; inside setup hook
(-when-let (root (locate-dominating-file default-directory "node_modules"))
        (setq-local flycheck-javascript-eslint-executable (concat root "/node_modules/.bin/eslint"))
        (setq-local flycheck-javascript-flow-executable (concat root "/node_modules/.bin/flow"))
        (setq-local flycheck-javascript-flow-coverage-executable (concat root "/node_modules/.bin/flow")))

We should detect that this is going on and adjust the executables accordingly automatically. Virtually never would the user want to run any globally available executable if it is locally bundled with the project.

While something like this already seems to exist for cask other tools are missing.

Is this something we would want to push to the flycheck org as separate packages or even to flycheck itself? I think there's a great value in having these things just working without the users having to mess around with exec paths and stuff.