LSP
Neovim for Developers
Neovim provides a fast, extensible editing environment suited to programming when configured with a small set of plugins and an LSP client. This article shows a minimal, modern setup without imposing a particular plugin manager.
Minimal init.lua
Section titled “Minimal init.lua”Place the file at ~/.config/nvim/init.lua:
-- minimal init.luavim.o.number = truevim.o.expandtab = truevim.o.shiftwidth = 2
require('plugins') -- keep plugins in a separate filerequire('lsp')This separation keeps the core settings small and the plugin configuration isolated.
Language Server Protocol (LSP)
Section titled “Language Server Protocol (LSP)”Use nvim-lspconfig to connect Neovim to language servers. Example (Lua):
local lspconfig = require('lspconfig')lspconfig.pyright.setup({})lspconfig.lua_ls.setup({})Plugins and plugin managers
Section titled “Plugins and plugin managers”Popular plugin managers include lazy.nvim and packer.nvim. A small plugin set for development includes: LSP client, completion engine (nvim-cmp), treesitter for syntax, and a file explorer.
Completion
Syntax
Testing your setup
Section titled “Testing your setup”Open a project and verify:
- Diagnostics appear for syntax/type errors.
gdorvim.lsp.buf.definition()jumps to symbol definitions.- Completion suggestions are shown automatically while typing.
Why this matters
Section titled “Why this matters”This topic is an important part of building a reliable Linux development workflow. Understanding it clearly will make later tasks easier, because it reduces guesswork and helps you recognize when a step is missing or misapplied.
Practical next steps
Section titled “Practical next steps”- Try the commands or configuration shown here in a safe test environment.
- Compare how the concepts apply across different distributions or tools.
- Keep a short note of what worked and what failed so you can diagnose future problems faster.
- Revisit the related article in the series to deepen the connections between topics.
Common pitfalls
Section titled “Common pitfalls”- Skipping verification steps and assuming the system is configured correctly.
- Copying commands without adapting paths, package names, or tool versions for your environment.
- Treating this topic as an isolated tip rather than part of a larger workflow.