Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider converting to an autoload-able function #252

Open
danielshahaf opened this issue Dec 20, 2015 · 9 comments
Open

Consider converting to an autoload-able function #252

danielshahaf opened this issue Dec 20, 2015 · 9 comments

Comments

@danielshahaf
Copy link
Member

Consider converting zsh-syntax-highlighting from a sourced script to an autoloaded function. Benefits include better isolation from calling environment and zcompile byte-compliation support.

@danielshahaf
Copy link
Member Author

Using autoload -U would prevent aliases in the calling environment from affecting z-sy-h. (See for example the following downstream bug report: https://bugs.debian.org/842994.)

@danielshahaf
Copy link
Member Author

Note also the workers/40327 changes to autoload with an absolute path argument.

@danielshahaf
Copy link
Member Author

workers/40458 mentions a useful "autoload a number of related functions" that's now possible in 5.4-to-be.

@phy1729
Copy link
Member

phy1729 commented Nov 26, 2017

Will the highlighter interface change to allow for autoloaded highlighters?

@danielshahaf
Copy link
Member Author

From a mile high view, I assume that'd be an improvement.

@danielshahaf
Copy link
Member Author

Once that's done we can also emulate -L and setopt warncreateglobal ${(k)zsyh_user_options[(I)warnnestedglobal} as in #413. (That construct expands to "warnnestedglobal" on zsh's that have that option and to nothing otherwise.)

@danielshahaf
Copy link
Member Author

Cross-referencing #688.

@danielshahaf
Copy link
Member Author

Triage: Trivial to implement (see https://github.com/okapia/zsh-viexchange/blob/339dc2d8c4d8a164c7b441d0c1e6442b0b38b3d0/zsh-viexchange.plugin.zsh#L1-L4), will help with #688 (resilience to user's setopts) and #635/#734 (loading performance): milestone 0.8.0 optimistically, but may defer this to 0.9.0 after all (e.g., if this turns out to have to be merged after redrawhook).

@danielshahaf danielshahaf added this to the 0.8.0 milestone May 22, 2020
@danielshahaf
Copy link
Member Author

milestone 0.8.0 optimistically, but may defer this to 0.9.0 after all (e.g., if this turns out to have to be merged after redrawhook).

It would be useful to merge this only after redrawhook, simply because that's the easiest way to avoid spurious conflicts in that merge. (Fixing this will involve renaming the entry point file and creating a stub in its stead; git would then conflict, rather than merge conflict-freely to the renamed file.)

@phy1729 phy1729 modified the milestones: 0.8.0, 0.8.1 Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants