treesit-auto icon indicating copy to clipboard operation
treesit-auto copied to clipboard

Package autoloads?

Open proofit404 opened this issue 2 years ago • 3 comments

Some users do not use use-package.

That's mean they have to (require 'treesit-auto) before they could call (global-treesit-auto-mode) in the configuration file.

To avoid this situation package could specify special auto load pragma. For example, like this.

Usually, it's good tone to set it for all interactive commands defined in the package.

Is there any specific technical reason not to set auto load comments?

proofit404 avatar May 16 '23 22:05 proofit404

I did try this, but my skill with elisp wasn't quite good enough to overcome cl-lib failing to load properly: https://github.com/renzmann/treesit-auto/issues/36#issuecomment-1474875674

If you are familiar with the proper way to get ;;;###autoload working without any errors on startup I'd love the PR for it!

renzmann avatar May 18 '23 10:05 renzmann

Does https://github.com/renzmann/treesit-auto/pull/87 solve this?

sebastiaanspeck avatar Feb 25 '24 05:02 sebastiaanspeck

No, I didn't add an autoload cookie for the global minor mode in that PR. The last sentence in that PR explains why an autoload cookie will not work with how the current code is setup. Basically, the problem is that the :predicate depends on code which will not be pulled into/available in the autoload file, which is why there are errors.

noctuid avatar Jun 08 '24 19:06 noctuid