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

Improved plugins config table handling #1356

Merged
merged 3 commits into from
Feb 6, 2023

Conversation

jgmdev
Copy link
Member

@jgmdev jgmdev commented Jan 29, 2023

  • Now it supports automatically loading/requiring a previously disabled plugin by using config.plugins.plugin_name = true or config.plugins.plugin_name = {...} dropped because of concerns of loading priority issues

  • Warns user if trying to disable a plugin that is already enabled when doing config.plugins.plugin_name = false and also prevents replacing the current plugin config table with the false value to mitigate runtime issues.

  • Uses a merge strategy by default when assigning a table to a plugin config to prevent a user from removing a plugin default config values as experienced and explained on this issue settings disables the drawwhitespace plugin lite-xl-plugins#158

  • This change is basically backwards compatible, but will require a change on the settings ui plugin on how it checks for already enabled plugins, since rawget will no longer be a working hack or workaround for this.

* Now it supports automatically loading/requiring a previously
  disabled plugin by using `config.plugins.plugin_name = true`

* Warns user if trying to disable a plugin that is already
  enabled when doing `config.plugins.plugin_name = false` and also
  prevents replacing the current plugin config table with the false
  value to mitigate runtime issues.

* Uses a merge strategy by default when assigning a table to a plugin
  config to prevent a user from removing a plugin default config values
  as experienced and explained on this issue #lite-xl-plugins/158

* This change is basically backwards compatible, but will require a
  change on the settings ui plugin on how it checks for already
  enabled plugins, since rawget will no longer be a working hack
  or workaround for this.
@jgmdev jgmdev force-pushed the PR/config-changes branch from 16069a2 to 51f2e06 Compare January 29, 2023 07:44
@jgmdev
Copy link
Member Author

jgmdev commented Feb 6, 2023

Discussed this with Adam and Guldo on discord and there was an agreement on this PR been ok if the automatic require was removed as pointed above for the concern of plugins loading order getting messed. That was addressed so merging as testing for various days haven't caused any issues.

@jgmdev jgmdev merged commit 5b2538e into lite-xl:master Feb 6, 2023
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Aug 19, 2023
* Warns user if trying to disable a plugin that is already
  enabled when doing `config.plugins.plugin_name = false` and also
  prevents replacing the current plugin config table with the false
  value to mitigate runtime issues.
* Uses a merge strategy by default when assigning a table to a plugin
  config to prevent a user from removing a plugin default config values
  as experienced and explained on this issue lite-xl-plugins#158
* This change is basically backwards compatible, but will require a
  change on the settings ui plugin on how it checks for already
  enabled plugins, since rawget will no longer be a working hack
  or workaround for this.
* As suggested by Adam dropped loaded key and switched to package.loaded
takase1121 pushed a commit to takase1121/lite-xl that referenced this pull request Aug 19, 2023
* Warns user if trying to disable a plugin that is already
  enabled when doing `config.plugins.plugin_name = false` and also
  prevents replacing the current plugin config table with the false
  value to mitigate runtime issues.
* Uses a merge strategy by default when assigning a table to a plugin
  config to prevent a user from removing a plugin default config values
  as experienced and explained on this issue lite-xl-plugins#158
* This change is basically backwards compatible, but will require a
  change on the settings ui plugin on how it checks for already
  enabled plugins, since rawget will no longer be a working hack
  or workaround for this.
* As suggested by Adam dropped loaded key and switched to package.loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant