How dev-harsh0218/nvim-lsp-config works
Project type and purpose
• This is a Neovim configuration repository written in Lua. It’s designed to bootstrap and configure a set of Neovim plugins focusing on LSP (Language Server Protocol) support, Treesitter syntax parsing, auto-completion, file tree navigation, and fuzzy finding.
File structure
• Top level:
• init.lua — the Neovim entry point that initializes the plugin manager and loads configs
• lazy-lock.json — lock file for your lazy plugin manager
• lua/
– config/ — site-specific settings: keymaps.lua, options.lua, registers.lua
– plugins/ — per-plugin specification and setup: autopairs.lua, colorscheme.lua, lsp-config.lua, nvim-cmp.lua, nvim-tree.lua, telescope.lua, treesitter.lua, ts-autotag.lua
• No separate “backend” or “frontend,” but a clear separation between plugin declarations (plugins/) and user preferences (config/).
README
• Describes the stacking of Neovim LSP, Treesitter, auto-completion (nvim-cmp), file tree (nvim-tree), and fuzzy finder (telescope).
a. Main components:
• Neovim Core (built-in client)
• Plugin Manager (e.g., lazy.nvim)
• Plugin Modules (each .lua under lua/plugins/)
• User Config Modules (lua/config/)
• External Services: LSP servers, language parsers
b. Relationships/interactions:
• init.lua → invokes Plugin Manager → reads lazy-lock.json + lua/plugins/*
• Plugin Manager loads each plugin at startup
• After a plugin is loaded, its corresponding config module (from lua/config/) is applied
• LSP plugins talk to external LSP servers over RPC
• Treesitter plugin fetches/compiles parser grammars
• nvim-cmp plugin requests completions from the active LSP client and snippet engine
• telescope invokes fuzzy-finder UI over Neovim buffers and file tree
c. Architectural patterns & design principles:
• Modular configuration: each feature in its own file under lua/plugins or lua/config
• Lazy loading: only load plugins or modules when needed (using lazy.nvim)
• Separation of concerns: plugin declaration vs plugin configuration vs user keybindings
d. Key technologies & libraries:
• lazy.nvim (plugin manager)
• nvim-lspconfig (LSP client)
• nvim-cmp (completion engine)
• nvim-treesitter (syntax parsing) + ts-autotag
• telescope.nvim (finder)
• nvim-tree.lua (file explorer)
• autopairs, colorscheme plugins