-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor (user custom): Proposal for enhancing user customization exp…
…erience (#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: 冷酔閑吟 <[email protected]> Signed-off-by: MiSumiSumi <[email protected]> * 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 <[email protected]> * chore: update comments Signed-off-by: Charles Chiu <[email protected]> * chore: cleanup * style: Change position of user override * feat(issue template): add user config debug template Signed-off-by: Charles Chiu <[email protected]> * chore(issue template): fix new template Signed-off-by: Charles Chiu <[email protected]> * fix template Signed-off-by: Charles Chiu <[email protected]> * test fix Signed-off-by: Charles Chiu <[email protected]> * fix(issue template): syntax error Signed-off-by: Charles Chiu <[email protected]> * fix(issue template): syntax error Signed-off-by: Charles Chiu <[email protected]> * 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 <[email protected]> * feat: update tutor and settings. Signed-off-by: ayamir <[email protected]> --------- Signed-off-by: MiSumiSumi <[email protected]> Signed-off-by: Charles Chiu <[email protected]> Signed-off-by: ayamir <[email protected]> Co-authored-by: 冷酔閑吟 <[email protected]> Co-authored-by: Charles Chiu <[email protected]> Co-authored-by: ayamir <[email protected]>
- Loading branch information
1 parent
8631738
commit 188a73e
Showing
87 changed files
with
642 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Custom (User) Config Issue | ||
description: Problems when trying to implement your custom config | ||
labels: [usage] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
_Before requesting:_ Make sure you've read through our [Wiki: Usage](https://github.com/ayamir/nvimdots/wiki/Usage) before you start to add things to nvimdots! | ||
- type: checkboxes | ||
id: is-latest-commit | ||
attributes: | ||
label: "Version confirmation" | ||
description: "The local configuration is up-to-date in the current branch and this issue _persists_." | ||
options: | ||
- label: "Confirm" | ||
required: true | ||
- type: checkboxes | ||
id: prerequisites-done | ||
attributes: | ||
label: "Following prerequisites" | ||
description: "I've checked everything mentioned in [Wiki: Prerequisites](https://github.com/ayamir/nvimdots/wiki/Prerequisites)." | ||
options: | ||
- label: "Confirm" | ||
required: true | ||
|
||
- type: input | ||
id: nvim-version | ||
attributes: | ||
label: "Neovim version" | ||
description: "Paste the output of `nvim --version` here" | ||
placeholder: "NVIM v0.10.0-dev-873+g71ad771ea" | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: branch-info | ||
attributes: | ||
label: "Branch info" | ||
description: "This issue template mainly targets `main` branch. Check the output of `git rev-parse --abbrev-ref HEAD` if you're not sure." | ||
options: | ||
- main (Default/Latest) | ||
- 0.8 (Legacy) | ||
- 0.7 (Deprecated) | ||
- 0.10 (Nightly) | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: folder-structure-ta | ||
attributes: | ||
label: "Minimal (user) folder structure required to reproduce the issue" | ||
description: "Note: You only need to describe where the *new/modified files* are. This section will be automatically formatted." | ||
render: console | ||
placeholder: | | ||
└── lua/ | ||
├── core/ | ||
├── keymap/ default keymaps | ||
├── modules/ default plugins and plugin configs | ||
└── user custom configs root directory | ||
├── configs/ custom plugin config folder | ||
│ ├── dap-clients/ custom dap client config folder | ||
│ ├── lsp-servers/ custom lsp server config folder | ||
│ └── your-config.lua your plugin configs (if applicable) | ||
├── keymap/ custom keymap folder | ||
│ └── your-config.lua your keymap overrides (if applicable) | ||
├── plugins/ custom plugin folder | ||
│ └── your-config.lua your plugins (if applicable) | ||
├── event.lua custom `core/events.lua` overrides | ||
├── options.lua custom `core/options.lua` overrides | ||
└── settings.lua custom `core/settings.lua` overrides | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: repro-steps | ||
attributes: | ||
label: "Minimal config with steps on how to reproduce the issue" | ||
description: "Note: Issues without any information will be closed directly" | ||
placeholder: | | ||
This is my custom config (`specs.lua`): | ||
```lua | ||
return { | ||
popup = { | ||
delay_ms = 20, | ||
} | ||
} | ||
``` | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: "Expected behavior" | ||
description: "Describe the behavior you expect" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: extras | ||
attributes: | ||
label: Additional information | ||
description: If applicable, you may include logs, images, or videos to help explain your problem | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lua/modules/plugins/custom.lua | ||
lua/modules/configs/custom | ||
lua/user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
return function() | ||
require("codeium").setup({}) | ||
require("modules.utils").load_plugin("codeium", {}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
return function() | ||
require("copilot_cmp").setup({}) | ||
require("modules.utils").load_plugin("copilot_cmp", {}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.