Skip to content

Add g:loaded_elixir #573

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

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Conversation

sodapopcan
Copy link
Collaborator

This is a very simple commit that adds and checks g:loaded_elixir.

I'm developing a plugin that partially depends on this one and I have found no other reliable way to detect this plugin has been loaded. I've added it to plugin/ so that it is set at load time as opposed to autoload time to avoid load order bugs.

Thanks!

@jbodah jbodah merged commit 62da2e8 into elixir-editors:master Jul 6, 2024
@jparise
Copy link
Contributor

jparise commented Jul 9, 2024

This change appears to break vim-plug's on-demand loading mechanism.

This Plug call:

Plug 'elixir-editors/vim-elixir', {'for': 'elixir'}

... was previously sufficient to lazily load this plugin for both direct Elixir buffers (filetype elixir) as well as indirect usages, such as embedding the elixir syntax in fenced markdown code blocks via g:markdown_fenced_languages = ['elixir'].

The latter no longer works unless you also load vim-elixir for markdown buffers (Plug 'elixir-editors/vim-elixir', {'for': ['elixir', 'markdown']}).

I think the issue is more about the plugin/elixir.vim file itself rather than the g:loaded_elixir guard within it. I still see the issue if that file is entirely empty.

I don't have an alternate solution to propose, but it seems like this current approach is exposing some kind of flaw.

@sodapopcan
Copy link
Collaborator Author

Interesting! I need to read up more on this but I'm totally happy to have this reverted.

Thanks for speaking up @jparise and apologies for messing with your workflow.

@jbodah
Copy link
Collaborator

jbodah commented Jul 9, 2024

Reverted in #575

jparise added a commit to jparise/dotfiles that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants