Functional module interface #276
Replies: 1 comment 5 replies
-
Hi, caligian! First of all, great work! I'm reading through your repo, it looks quite good, there are many interesting things I'd like to (if you wouldn't mind) merge with my implementation. More on that at the end. Now I'll comment on the bits I like/would change:
Now about merging your code: I really like the utilities you came up with, and I'd also like to have your name properly in the commit history, so maybe we could coordinate something over discord? (the link to doom's is in the README) If you don't care about this or don't have the time to contribute to my implementation, I can do it myself, and probably will be doing so until you answer. Just tell me if you'd like to contribute to my repo or not. |
Beta Was this translation helpful? Give feedback.
-
As promised, I have come with a functional module interface for configuration. I have transferred the old configuration to this one and it works pretty well (for now). It might be a little buggy and packer.nvim quirks need to be followed in some places but so far, so good.
Startup time is very good. Almost feels instant as compared to my previous setup with the same exact configuration. I have tried to implement lazy-load wherever possible.
Theoretically everything can be overridden because all the settings and functions lie in a single table.
Package configurations can be overridden with ease by the user at the cost of losing all the defaults made by the system (although this can be changed. I am just not sure if I should).
New LSP setups are a matter of ease because all the user has to do is append the configuration to either doom.lsp.user_servers or doom.lsp.default_servers. If the user appends to latter, default config for that server will be used. It is mostly batteries included so little to no setup is required to setup lsp apart from actually downloading the required stuff. This works out of the box for ruby, python. However, default configurations can also be quickly installed by appending the name of the server to doom.lsp.default_servers. I have tried to include capabilities and on_attach defaults in case user only provides the path to the binary so it should work for basic cases.
I hope that we can add some nice cosmetic layers hopefully with zero overhead and provide a nice doom-like package enabling-disabling with categories locking packages to certain versions, etcetera
Some caveats:
This is certainly not final but I am hoping that all of you are ready to shower critique wherever required. Since everything is dependent on the global table, it is rather easy to reload doom quickly although I believe some more functions should be added to make this easier.
There is a utils.lua file containing some important functions: autocmd and augroup maker, basic indenting, buffer-running functions for both powershell and bash. I am also going to add a native REPL module.
Updated config:
Check out core/
Beta Was this translation helpful? Give feedback.
All reactions