doom-neovim / doom-nvim

A Neovim configuration for the advanced martian hacker
GNU General Public License v2.0
1.01k stars 107 forks source link

(next): moves `doom.settings` table into file in root dir. #349

Closed molleweide closed 2 years ago

molleweide commented 2 years ago

@connorgmeehan

I closed the previous settings PR and made a new one. This one is in sync with latest next.

  1. adds settings.lua file in root so that it becomes easy/obvious for users where to set/change doom specific settings.
  2. removes settings from core/global_doom.lua. my thought here is that since we specify defaults for each settings, it becomes more maintenance overhead to keep a duplicate default table in core. What are your thoughts on this. it is easy to add it back and do a tbl_deep_extend but now I opted for just removing the core table so that you only have the root table.
  3. loads settings in core/init.lua
  4. replaces all instances with the new doom.settings... prefix, in eg. doom.settings.leader_key.
    • doom.logging -> doom.settings.logging etc..
molleweide commented 2 years ago

below check fails for:

lua/doom/modules/core/nest/init.lua:111:19: unused variable bufnr
Error: unused variable bufnr

which I haven't touched. But this is the line fyi:

            local bufnr = type(node_settings.buffer) == "number" and node_settings.buffer
              or vim.api.nvim_get_current_buf()
molleweide commented 2 years ago

hey connor, may I ask why you closed this one? or did it autoclose upon deleting the next branch maybe.

connorgmeehan commented 2 years ago

It must have auto-closed when I deleted the next branch. If you rebase this onto main I'm happy to review and merge :)