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

refactor (user custom): Proposal for enhancing user customization experience #931

Merged
merged 56 commits into from
Aug 25, 2023

Conversation

misumisumi
Copy link
Collaborator

I proposed user custom isolation in #885, but changed many parts because it was an override using opts in lazy.nvim.
In #888, it was pointed out that the default definition might be read after the user definition if the lazy.nvim method is passed to opts.
In addition, it was pointed out that it would be possible to consider a configuration that can be overridden without making major changes to the current configuration, so we considered it again and implemented it.
At that time, I created a new branch, so I will throw a PR again.
Closing the previous PR.

Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several general comments:

lua/core/event.lua Outdated Show resolved Hide resolved
lua/core/event.lua Outdated Show resolved Hide resolved
lua/core/options.lua Outdated Show resolved Hide resolved
lua/core/pack.lua Outdated Show resolved Hide resolved
lua/core/pack.lua Outdated Show resolved Hide resolved
lua/modules/utils/init.lua Outdated Show resolved Hide resolved
lua/modules/utils/init.lua Outdated Show resolved Hide resolved
lua/modules/utils/init.lua Outdated Show resolved Hide resolved
lua/modules/utils/keymap.lua Outdated Show resolved Hide resolved
lua/modules/utils/keymap.lua Outdated Show resolved Hide resolved
Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes may require an update.

@misumisumi misumisumi force-pushed the add-user-custom-function branch 2 times, most recently from 57e91ca to ae7fb55 Compare August 9, 2023 07:27
Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com>
Signed-off-by: MiSumiSumi <dragon511southern@gmail.com>
@Jint-lzxy
Copy link
Collaborator

@CharlesChiuGit I fixed several trivial formatting issues and added some comments. Now the folder structure section aligns pretty well :)

fs-ss

@misumisumi
Copy link
Collaborator Author

@Jint-lzxy
I would appreciate it if you could reply to my review about load_plugins.

@misumisumi
Copy link
Collaborator Author

@Jint-lzxy @CharlesChiuGit
I think that bug_report.yml needs a check item to check if it has been started without user.
Also, if user is the cause, it is necessary to direct to custom-config.yml.

@Jint-lzxy
Copy link
Collaborator

Jint-lzxy commented Aug 19, 2023

I would appreciate it if you could reply to my review about load_plugins.

@misumisumi Oh sorry I missed that review, there are too many replies flying around this thread. May I ask which specific review you're referring to?

@misumisumi
Copy link
Collaborator Author

Please review the lua/modules/utils/init.lua just above.

@Jint-lzxy
Copy link
Collaborator

Jint-lzxy commented Aug 19, 2023

I think that bug_report.yml needs a check item to check if it has been started without user.
Also, if user is the cause, it is necessary to direct to custom-config.yml.

a789e3c

@Jint-lzxy
Copy link
Collaborator

Please review the lua/modules/utils/init.lua just above.

This looks pretty good to me lol

@misumisumi
Copy link
Collaborator Author

This looks pretty good to me lol

Do you mean that it's better to delete it?

@Jint-lzxy
Copy link
Collaborator

Do you mean that it's better to delete it?

I reviewed this version of utils/init.lua (which is marked as changed since your last review) and don't think we need to change anything. Have u pushed ur changes to GitHub?

@misumisumi
Copy link
Collaborator Author

No, I didn't change anything.
I got it.
thank you.

@CharlesChiuGit
Copy link
Collaborator

@CharlesChiuGit I fixed several trivial formatting issues and added some comments. Now the folder structure section aligns pretty well :)

LGTM!

@CharlesChiuGit
Copy link
Collaborator

Are we still waiting for the new wiki to complete?

@Jint-lzxy
Copy link
Collaborator

Are we still waiting for the new wiki to complete?

Yeah we're still waiting for that

@misumisumi
Copy link
Collaborator Author

@Jint-lzxy @CharlesChiuGit
Started a discussion about updating the wiki.

Signed-off-by: ayamir <lgt986452565@gmail.com>
Signed-off-by: ayamir <lgt986452565@gmail.com>
@ayamir
Copy link
Owner

ayamir commented Aug 25, 2023

Can we merge it now?

@misumisumi
Copy link
Collaborator Author

The code has been reviewed and the wiki has been edited, so it should be fine.

@ayamir ayamir merged commit 188a73e into ayamir:main Aug 25, 2023
2 checks passed
singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this pull request Aug 27, 2023
…erience (ayamir#931)

* feat(utils): Add `load_plugin` function

* feat(pack.lua): Added loading of user custom plugins

* feat(ui): Changes to `load_plugin()`

* feat(tool): Changes to `load_plugin()`

* feat(editor): Changes to `load_plugin()`

* feat(lang): Changes to `load_plugin()`

* feat(completion): Changes to `load_plugin()`

* feat(keymap): Adding user overrides for keymap

* feat(pack): Add `lua/user/modules/configs` to package.path (WARNING: Don't create a file with the same name as `lua/modules/configs`)

* feat(event): Supports user-defined events

* feat(options): Supports user-defined options

* feat(settings): Supports user-defined settings

* hotfix(pack): Incorrect value is added when there is no user-defined plugin

* Revert "feat(keymap): Adding user overrides for keymap"

This reverts commit b127042.

* feat(keymap): Defining user keymaps with the override function introduced in 372d3c9

* feat(keymap): Support unset keymap.

* Apply suggestions from code review

Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com>
Signed-off-by: MiSumiSumi <dragon511southern@gmail.com>

* fix(pack): Change user_module_dir location and implement 'string:sub' according to module location

* hotfix(utils): Fixed a bug that could not be loaded when vimscript plugins were overridden.

* feat(utils): Create `config_extend` function

* add(user): Create user config directory

* feat(keymap): add `keymap.replace` function

* add(user/keymap): Create user config directory for keymap

* fix: cleanups & fixups

* chore: remove unused function

* feat(pack): add custom loader for user plugin config

* feat(pack): add `disabled_plugins` to settings

* update(.gitignore): add `lua/user`

* fix(utils): Fixed an issue where lists with values were replaced instead of expanded

* feat(lsp): Support user override for lsp settings

* feat(utils): add `load_config()` to resolve and load `user.configs`

* Revert "feat(utils): add `load_config()` to resolve and load `user.configs`"

This reverts commit f95d110.

* feat(modules/keymap): just remove the keymap

* refactor(mason-*): Separating `mason-*` from `lspconfig` and `null-ls`

* feat(mason_*_handler): If there is a user definition, it is read with priority

* fix(pack): Abolish custom loader and add `lua/user` to rtp

* add(user): Make `lsp-servers` and `dap-clients` directory

* fix(user/keymap): Add override `core.keymap`

* rename: Move `lsp-servers` and `dap-clients` under `user/configs`

* chore: update comments

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore: update comments

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore: cleanup

* style: Change position of user override

* feat(issue template): add user config debug template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore(issue template): fix new template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* test fix

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix(issue template): syntax error

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix(issue template): syntax error

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fixup(ISSUE_TEMPLATE): fix formatting&linting issues

* fixup(IS_TEMPL): proper redirections to correct template

* fix merge conflicts

* feat: add colorscheme setting to example user settings.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* feat: update tutor and settings.

Signed-off-by: ayamir <lgt986452565@gmail.com>

---------

Signed-off-by: MiSumiSumi <dragon511southern@gmail.com>
Signed-off-by: Charles Chiu <charleschiu@hey.com>
Signed-off-by: ayamir <lgt986452565@gmail.com>
Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com>
Co-authored-by: Charles Chiu <charleschiu@hey.com>
Co-authored-by: ayamir <lgt986452565@gmail.com>
leavers pushed a commit to leavers/nvimdots that referenced this pull request Aug 31, 2023
…erience (ayamir#931)

* feat(utils): Add `load_plugin` function

* feat(pack.lua): Added loading of user custom plugins

* feat(ui): Changes to `load_plugin()`

* feat(tool): Changes to `load_plugin()`

* feat(editor): Changes to `load_plugin()`

* feat(lang): Changes to `load_plugin()`

* feat(completion): Changes to `load_plugin()`

* feat(keymap): Adding user overrides for keymap

* feat(pack): Add `lua/user/modules/configs` to package.path (WARNING: Don't create a file with the same name as `lua/modules/configs`)

* feat(event): Supports user-defined events

* feat(options): Supports user-defined options

* feat(settings): Supports user-defined settings

* hotfix(pack): Incorrect value is added when there is no user-defined plugin

* Revert "feat(keymap): Adding user overrides for keymap"

This reverts commit b127042.

* feat(keymap): Defining user keymaps with the override function introduced in 372d3c9

* feat(keymap): Support unset keymap.

* Apply suggestions from code review

Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com>
Signed-off-by: MiSumiSumi <dragon511southern@gmail.com>

* fix(pack): Change user_module_dir location and implement 'string:sub' according to module location

* hotfix(utils): Fixed a bug that could not be loaded when vimscript plugins were overridden.

* feat(utils): Create `config_extend` function

* add(user): Create user config directory

* feat(keymap): add `keymap.replace` function

* add(user/keymap): Create user config directory for keymap

* fix: cleanups & fixups

* chore: remove unused function

* feat(pack): add custom loader for user plugin config

* feat(pack): add `disabled_plugins` to settings

* update(.gitignore): add `lua/user`

* fix(utils): Fixed an issue where lists with values were replaced instead of expanded

* feat(lsp): Support user override for lsp settings

* feat(utils): add `load_config()` to resolve and load `user.configs`

* Revert "feat(utils): add `load_config()` to resolve and load `user.configs`"

This reverts commit f95d110.

* feat(modules/keymap): just remove the keymap

* refactor(mason-*): Separating `mason-*` from `lspconfig` and `null-ls`

* feat(mason_*_handler): If there is a user definition, it is read with priority

* fix(pack): Abolish custom loader and add `lua/user` to rtp

* add(user): Make `lsp-servers` and `dap-clients` directory

* fix(user/keymap): Add override `core.keymap`

* rename: Move `lsp-servers` and `dap-clients` under `user/configs`

* chore: update comments

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore: update comments

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore: cleanup

* style: Change position of user override

* feat(issue template): add user config debug template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* chore(issue template): fix new template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix template

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* test fix

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix(issue template): syntax error

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fix(issue template): syntax error 

Signed-off-by: Charles Chiu <charleschiu@hey.com>

* fixup(ISSUE_TEMPLATE): fix formatting&linting issues

* fixup(IS_TEMPL): proper redirections to correct template

* fix merge conflicts

* feat: add colorscheme setting to example user settings.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* feat: update tutor and settings.

Signed-off-by: ayamir <lgt986452565@gmail.com>

---------

Signed-off-by: MiSumiSumi <dragon511southern@gmail.com>
Signed-off-by: Charles Chiu <charleschiu@hey.com>
Signed-off-by: ayamir <lgt986452565@gmail.com>
Co-authored-by: 冷酔閑吟 <50296129+Jint-lzxy@users.noreply.github.com>
Co-authored-by: Charles Chiu <charleschiu@hey.com>
Co-authored-by: ayamir <lgt986452565@gmail.com>
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.

[doc] Wiki update about user custom. About improvement of user customization experience.
4 participants