🌙 Cap 04: LunarVim: IDE Modular sobre Neovim com LSP, Treesitter e Telescope - Exemplos Práticos
Configurações e códigos demonstrando a personalização profissional de ferramentas.
🗺️ Fluxo Arquitetural
flowchart TD
LVIM["🌙 LunarVim Engine"] --> LSP["Language Server Protocol (Auto-complete & Go To Definition)"]
LVIM --> TREESITTER["Treesitter (Syntax Highlighting semântico ultra-rápido)"]
LVIM --> TELESCOPE["Telescope (Fuzzy Finder de arquivos, buffers e símbolos)"]
LVIM --> WHICH_KEY["Which-Key (Guia instantâneo de atalhos na tela)"]
style LVIM fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px
style LSP fill:#e8f5e9,stroke:#4caf50,stroke-width:1px
style TELESCOPE fill:#fff3e0,stroke:#ff9800,stroke-width:1px
📄 Arquivo de Configuração / Código (config.lua)
-- ~/.config/lvim/config.lua
lvim.log.level = "warn"
lvim.format_on_save.enabled = true
lvim.colorscheme = "tokyonight"
-- Atalhos customizados
lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projetos Recentes" }
lvim.builtin.which_key.mappings["t"] = { "<cmd>ToggleTerm<CR>", "Abrir Terminal" }
🚀 Saída Esperada de Execução
LunarVim Configuration:
✓ Treesitter parsers installed: [lua, python, typescript, html, css, c]
✓ LSP Servers active: pyright, tsserver, gopls
✓ Ready for ultra-fast development in terminal