Skip to content
MickTheRus edited this page May 4, 2023 · 2 revisions

The file layouit

.
β”œβ”€β”€ init.lua                -- The entrypoint for the configuration
β”œβ”€β”€ lazy-lock.json          -- Version Control
└── lua                     
    β”œβ”€β”€ autocommands.lua    -- Autocommands
    β”œβ”€β”€ keymaps.lua         -- Keymaps for neovim
    β”œβ”€β”€ Lazy.lua            -- Auto installation and configuration of 
    β”œβ”€β”€ options.lua         -- Neovim settings
    β”œβ”€β”€ settings            -- LSP settings
    β”‚Β Β  β”œβ”€β”€ lua_ls.lua
    β”‚Β Β  └── pyright.lua
    β”œβ”€β”€ user                -- Auto loaded configurations
    β”‚Β Β  β”œβ”€β”€ alpha.lua
    β”‚Β Β  β”œβ”€β”€ autopairs.lua
    β”‚Β Β  β”œβ”€β”€ bufferline.lua
    β”‚Β Β  β”œβ”€β”€ cmp.lua
    β”‚Β Β  β”œβ”€β”€ colorscheme.lua
    β”‚Β Β  β”œβ”€β”€ comment.lua
    β”‚Β Β  β”œβ”€β”€ dap.lua
    β”‚Β Β  β”œβ”€β”€ dapui.lua
    β”‚Β Β  β”œβ”€β”€ gitsigns.lua
    β”‚Β Β  β”œβ”€β”€ illuminate.lua
    β”‚Β Β  β”œβ”€β”€ indentline.lua
    β”‚Β Β  β”œβ”€β”€ lsp.lua
    β”‚Β Β  β”œβ”€β”€ lualine.lua
    β”‚Β Β  β”œβ”€β”€ mason.lua
    β”‚Β Β  β”œβ”€β”€ null-ls.lua
    β”‚Β Β  β”œβ”€β”€ nvim-dev-icons.lua
    β”‚Β Β  β”œβ”€β”€ nvim-tree.lua
    β”‚Β Β  β”œβ”€β”€ project.lua
    β”‚Β Β  β”œβ”€β”€ telescope.lua
    β”‚Β Β  β”œβ”€β”€ toggleterm.lua
    β”‚Β Β  β”œβ”€β”€ treesitter.lua
    β”‚Β Β  └── which-key.lua
    └── utils               -- Anything that can be accesed by anything (LSP names, DAP)
        └── init.lua

Why have a separate folder for configs?

  • We use a separate folder for plugins configurations to avoid loading loop.
    I.E: Having a file lua/dap.lua and tryin to configure dap will call that file instead of the actual plugin.

Why aren't LSP settings under lua/user/lsp/settings anymore like they are in neovim-from-scratch?

  • The simple reason is that Lazy tries to source them as separate configs like it does with mason.lua only it errors out. While it is possible to stop Lazy from sourcing the file, LSP might try to pick it up as a settings instead.

Why have autocommands, options, and keymaps been moved out of lua/user?

A) Lazy needs a map leader which is being set inside the keymaps.lua.
B) Lazy cannot load those files because they don't return the proper data like plugin configs do.
C) We do not require lazy loading in these and it's nice to have decent defaults.

What is the utils folder for?

A) As of right now it is not used for much other than being sourced by mason-lspconfig and nvim-lspconfig to configure and install necesarry language servers.
B) Mainly to be sourced when a little function needed to filter specific text input or such by a lot of different plugins.

Clone this wiki locally