Merge branch 'nvim-lua-master'

Signed-off-by: juliano.barbosa <julianomb@gmail.com>
This commit is contained in:
Juliano Barbosa 2025-02-25 11:21:27 -03:00
commit 7b16aa7576
14 changed files with 353 additions and 330 deletions

View File

@ -110,6 +110,7 @@
"noinsert", "noinsert",
"noremap", "noremap",
"norl", "norl",
"noto",
"nside", "nside",
"numhl", "numhl",
"nvim", "nvim",
@ -164,7 +165,8 @@
"yamlls", "yamlls",
"yinfei", "yinfei",
"yinq", "yinq",
"ymbols" "ymbols",
"fonts-noto-color-emoji"
], ],
"ignoreWords": [], "ignoreWords": [],
"allowCompoundWords": true, "allowCompoundWords": true,

View File

@ -27,6 +27,7 @@ External Requirements:
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) - Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
- Language Setup: - Language Setup:
- If you want to write Typescript, you need `npm` - If you want to write Typescript, you need `npm`
- If you want to write Golang, you will need `go` - If you want to write Golang, you will need `go`
@ -212,14 +213,14 @@ sudo apt update
sudo apt install make gcc ripgrep unzip git xclip curl sudo apt install make gcc ripgrep unzip git xclip curl
# Now we install nvim # Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux64 sudo rm -rf /opt/nvim-linux-x86_64
sudo mkdir -p /opt/nvim-linux64 sudo mkdir -p /opt/nvim-linux-x86_64
sudo chmod a+rX /opt/nvim-linux64 sudo chmod a+rX /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux64.tar.gz sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
# make it available in /usr/local/bin, distro installs to /usr/bin # make it available in /usr/local/bin, distro installs to /usr/bin
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
``` ```
</details> </details>
<details><summary>Fedora Install Steps</summary> <details><summary>Fedora Install Steps</summary>

View File

@ -1,23 +1,3 @@
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
--[[ --[[
===================================================================== =====================================================================
@ -676,7 +656,6 @@ require('lazy').setup({
return return
end end
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf, buffer = event.buf,
@ -697,12 +676,8 @@ require('lazy').setup({
vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf }) vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf })
end, end,
}) })
end -- Removed extra 'end' that prematurely closed the callback function
-- The following code creates a keymap to toggle inlay hints in your code
-- The following code creates a keymap to toggle inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map('<leader>th', function() map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))

View File

@ -1,23 +1,3 @@
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-- You can add your own plugins here or in other files in this directory! -- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --

View File

@ -1,22 +1,22 @@
# MIT License -- MIT License
# --
# Permission is hereby granted, free of charge, to any person obtaining a copy -- Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal -- of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights -- in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is -- copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: -- furnished to do so, subject to the following conditions:
# --
# The above copyright notice and this permission notice shall be included in all -- The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software. -- copies or substantial portions of the Software.
# --
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. -- SOFTWARE.
-- autopairs -- autopairs
-- https://github.com/windwp/nvim-autopairs -- https://github.com/windwp/nvim-autopairs

View File

@ -1,22 +1,22 @@
# MIT License -- MIT License
# --
# Permission is hereby granted, free of charge, to any person obtaining a copy -- Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal -- of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights -- in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is -- copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: -- furnished to do so, subject to the following conditions:
# --
# The above copyright notice and this permission notice shall be included in all -- The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software. -- copies or substantial portions of the Software.
# --
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. -- SOFTWARE.
-- debug.la -- debug.la
-- --

View File

@ -64,7 +64,7 @@ return {
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' }) map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
@ -74,7 +74,7 @@ return {
end, { desc = 'git [D]iff against last commit' }) end, { desc = 'git [D]iff against last commit' })
-- Toggles -- Toggles
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' }) map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
end, end,
}, },
}, },

View File

@ -1,22 +1,22 @@
# MIT License -- MIT License
# --
# Permission is hereby granted, free of charge, to any person obtaining a copy -- Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal -- of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights -- in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is -- copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: -- furnished to do so, subject to the following conditions:
# --
# The above copyright notice and this permission notice shall be included in all -- The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software. -- copies or substantial portions of the Software.
# --
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. -- SOFTWARE.
return { return {

View File

@ -1,37 +1,55 @@
# Neovim Configuration Active Context # Active Context
## Current Session Context ## Current Session Context
[2024-02-22 13:00] Initial Memory Bank setup [2024-02-22 16:47]
Completed initial analysis of Neovim configuration based on kickstart framework.
## Recent Changes ## Recent Changes
- Created Memory Bank structure - Created Memory Bank structure
- Initialized core documentation files - Documented core configuration patterns
- Established project organization - Analyzed plugin configurations:
- LSP and completion setup
- Debugging infrastructure
- Linting framework
- Auto-pairs integration
## Current Focus ## Current Goals
- Setting up base configuration structure 1. Verify tool installation and compatibility:
- Documenting existing setup - LSP servers for configured languages
- Planning plugin organization - Debug adapters
- Linting tools
## Active Decisions 2. Review and optimize:
1. Using modular Lua configuration - LSP configurations
2. Implementing lazy plugin loading - Debug adapter configurations
3. Organizing debug capabilities - Linting rules
- Keymaps and shortcuts
## Next Steps 3. Enhance documentation:
1. Review existing plugin configurations - Plugin-specific configurations
2. Document current plugin setup - Language-specific setups
3. Evaluate debug integration - Custom keybindings
4. Plan performance optimizations
## Open Questions ## Open Questions
1. Which plugins need custom configurations? 1. Are all required language servers properly configured?
2. Are there any performance bottlenecks? 2. Are there any performance bottlenecks in the current setup?
3. What debug adapters are required? 3. Should additional language support be added?
4. How to optimize startup time? 4. Are the current keymaps optimal for the workflow?
5. Would any additional plugins benefit the setup?
## Implementation Notes ## Focus Areas
- Need to document plugin dependencies 1. Plugin Configuration Optimization
- Consider startup performance - Review lazy-loading strategies
- Review debug configuration needs - Verify event triggers
- Plan LSP server setup - Check dependency chains
2. Language Support
- Validate LSP configurations
- Test debugging setups
- Verify linting rules
3. Performance Monitoring
- Startup time
- Memory usage
- Plugin load times

View File

@ -1,33 +1,34 @@
# Neovim Configuration Product Context # Neovim Configuration Product Context
## Purpose ## Purpose
This Neovim configuration exists to provide a powerful, customizable development environment that enhances productivity through modern editor features and efficient workflow patterns. This Neovim configuration exists to provide a robust, efficient, and maintainable development environment using the kickstart framework as a foundation. It aims to enhance the editing experience while maintaining good performance and extensibility.
## Problems Solved ## Problems Solved
1. Complex plugin management 1. Complex plugin management and configuration
2. Development environment setup time 2. Code debugging setup and integration
3. Code navigation efficiency 3. Consistent code linting across projects
4. Debug workflow integration 4. Efficient text editing through auto-pairing
5. Configuration maintainability 5. Configuration organization and maintenance
## Intended Usage ## Expected Functionality
- Primary development environment for coding 1. Plugin Management
- Plugin management through Lua modules - Organized plugin configurations in separate files
- Clear dependency management
- Easy plugin addition and removal
2. Development Tools
- Integrated debugging capabilities - Integrated debugging capabilities
- Efficient code navigation and completion - Code linting and static analysis
- Custom keybindings and commands - Automatic bracket/quote pairing
3. Configuration Structure
- Modular organization
- Clear separation of concerns
- Easy maintenance and updates
## User Experience Goals ## User Experience Goals
1. Fast and responsive editing 1. Fast and responsive editing experience
2. Intuitive plugin management 2. Intuitive plugin functionality
3. Clear error feedback 3. Consistent behavior across different file types
4. Efficient code navigation 4. Clear error and diagnostic feedback
5. Seamless debugging experience 5. Smooth debugging experience
6. Easy configuration updates
## Design Principles
1. Modularity: Separate concerns for easier maintenance
2. Performance: Optimize for speed and responsiveness
3. Clarity: Clear structure and documentation
4. Extensibility: Easy to add new features
5. Reliability: Stable and predictable behavior

View File

@ -1,46 +1,66 @@
# Neovim Configuration Progress # Project Progress
## Work Done
- [x] Initial Memory Bank setup
- [x] Core documentation structure
- [x] Analysis of main configuration (init.lua)
- [x] Documentation of plugin configurations:
- [x] Debug setup (nvim-dap)
- [x] Linting framework (nvim-lint)
- [x] Auto-pairs configuration
- [x] LSP integration
## Current Status ## Current Status
[2024-02-22 13:01] Memory Bank initialization The project has:
1. Comprehensive LSP Configuration
- Multiple language servers
- Completion integration
- Diagnostic support
### What Works 2. Debug Infrastructure
- Basic directory structure - DAP setup for multiple languages
- Core documentation setup - Custom keymaps
- Initial project organization - Integrated debug UI
### In Progress 3. Code Quality Tools
1. Documentation of existing setup - File-type specific linters
2. Plugin configuration review - Format-on-save capability
3. Debug capability assessment - Treesitter integration
### Known Issues 4. Development Workflow
- Need to document current plugin dependencies - Fuzzy finding with Telescope
- Debug configuration needs review - Git integration
- Performance optimization opportunities - Efficient navigation keymaps
- LSP setup documentation needed
## Next Steps ## Next Steps
1. Tool Verification
- [ ] Test LSP server installations
- [ ] Verify debug adapter functionality
- [ ] Validate linter configurations
### Short Term 2. Configuration Optimization
1. Review and document current plugin setup - [ ] Review lazy-loading strategies
2. Assess debug integration status - [ ] Optimize startup time
3. Document LSP configuration - [ ] Evaluate plugin dependencies
4. Map performance bottlenecks
### Medium Term 3. Documentation Enhancement
1. Optimize plugin loading - [ ] Add usage guides
2. Enhance debug capabilities - [ ] Document custom keymaps
3. Improve LSP integration - [ ] Create troubleshooting guide
4. Add custom keybindings
### Long Term 4. Potential Improvements
1. Create comprehensive documentation - [ ] Additional language support
2. Implement performance improvements - [ ] Performance optimizations
3. Extend debug functionality - [ ] Enhanced UI configurations
4. Enhance plugin ecosystem
## Completed Work ## Known Issues
[2024-02-22] - Need to verify all LSP servers are properly configured
- Created Memory Bank structure - Debug adapter compatibility needs testing
- Initialized core documentation - Linter configurations need validation
- Established project organization - Some keymaps may need refinement
## Upcoming Work
1. Full system testing
2. Performance benchmarking
3. Documentation updates
4. User workflow optimization

View File

@ -1,25 +1,30 @@
# Neovim Configuration Project Brief # Neovim Configuration Project Brief
## Project Overview ## Project Overview
Custom Neovim configuration project focused on creating an optimized, maintainable, and feature-rich development environment using Lua. A Neovim configuration setup based on the kickstart framework, aimed at creating an efficient and feature-rich development environment.
## Core Requirements ## Core Requirements
1. Modular plugin management 1. Maintain a modular and organized plugin configuration
2. Efficient code navigation and editing 2. Ensure efficient code editing capabilities
3. Debugging capabilities 3. Provide robust debugging support
4. Code completion and LSP support 4. Implement code linting functionality
5. Clean and maintainable configuration structure 5. Configure auto-pairing for brackets and quotes
## Project Goals ## Goals
- Create a well-organized Neovim configuration - Create a maintainable and extensible Neovim configuration
- Implement efficient plugin management - Optimize development workflow through carefully selected plugins
- Establish consistent coding patterns - Ensure smooth integration between different plugin functionalities
- Enable debugging capabilities - Maintain clear documentation of configuration choices and patterns
- Maintain documentation for future reference
## Success Criteria ## Technical Stack
1. Working plugin system - Neovim
2. Functional debugging setup - Lua programming language
3. Clear configuration structure - Kickstart framework
4. Documented setup and usage - Various Neovim plugins (debug, lint, autopairs, etc.)
5. Maintainable codebase
## Project Scope
- Plugin configuration and management
- Key mapping setup
- Code editing enhancements
- Development tool integration
- Performance optimization

View File

@ -1,65 +1,59 @@
# Neovim Configuration System Patterns # Neovim Configuration System Patterns
## Architecture Overview ## Architecture Overview
### Directory Structure
``` ```
. .
├── init.lua # Main entry point ├── init.lua # Main configuration entry point
├── lua/ └── lua/
│ ├── custom/ # Custom configurations └── kickstart/
│ │ └── plugins/ # Plugin-specific settings └── plugins/ # Plugin-specific configurations
│ └── kickstart/ # Core functionality ├── debug.lua # DAP debugging setup
│ └── plugins/ # Plugin management ├── lint.lua # nvim-lint configuration
└── autopairs.lua # Auto-pairing setup
``` ```
## Design Patterns ## Core Patterns
### Plugin Management ### Plugin Organization
- Module-based plugin organization - Lazy.nvim for plugin management and lazy loading
- Lazy loading for performance - Modular plugin configuration files
- Plugin-specific configuration isolation - Clear separation of concerns per plugin
- Conditional plugin loading - Event-based plugin loading for better startup time
### Configuration Patterns ### LSP Integration
1. Modular Configuration - Mason.nvim for LSP server management
- Separate files for different concerns - Comprehensive language server configurations
- Clear dependency management - Integrated completion with nvim-cmp
- Isolated plugin configurations - Automatic server installation and setup
2. Event-Driven Setup ### Development Tools Integration
- Lazy plugin loading 1. Debugging System
- Event-based initialization - nvim-dap for debug adapter protocol support
- Conditional feature enabling - Language-specific debug configurations (Go, Python)
- Integrated debug UI with nvim-dap-ui
- Custom keymaps for debug operations
3. Error Handling 2. Linting Framework
- Protected calls for plugin setup - File-type specific linters
- Fallback configurations - Automatic lint on events (BufEnter, BufWritePost, InsertLeave)
- Clear error reporting - Configurable linter selection per filetype
- Integration with LSP diagnostics
3. Code Completion
- nvim-cmp as completion engine
- LSP-based completions
- Snippet integration
- Auto-pairs integration for brackets/quotes
## Component Relationships ## Component Relationships
1. Core System 1. Plugin Manager (lazy.nvim) → Plugin Configurations
- init.lua loads core modules 2. LSP Layer → Language Servers → Code Intelligence
- Establishes basic editor settings 3. Debug Adapters → DAP UI → User Interface
- Sets up plugin management 4. Linters → Diagnostic Framework → Error Reporting
2. Plugin System ## Design Decisions
- Managed through lua/custom/plugins 1. Event-driven plugin loading for performance
- Isolated plugin configurations 2. Modular configuration for maintainability
- Dependency handling 3. Extensive use of built-in LSP capabilities
4. Integration between complementary tools (LSP, DAP, Linters)
3. Debug Integration 5. Custom keymaps for efficient workflow
- Separate debug configuration
- Language-specific adapters
- Custom debug commands
## Technical Decisions
1. Lua-based configuration for:
- Better performance
- More powerful customization
- Cleaner syntax
2. Modular structure for:
- Easier maintenance
- Better organization
- Simplified updates

View File

@ -1,58 +1,85 @@
# Neovim Configuration Technical Context # Neovim Configuration Technical Context
## Technologies Used ## Technologies Used
1. Core Technologies:
- Neovim - Core editor
- Lua - Configuration language
- Kickstart Framework - Configuration foundation
- lazy.nvim - Plugin manager
### Core 2. LSP Technologies:
- Neovim (>= 0.8.0) - mason.nvim - LSP/DAP/Linter manager
- Lua (>= 5.1) - nvim-lspconfig - LSP configuration
- Git (for plugin management) - nvim-cmp - Completion engine
- LuaSnip - Snippet engine
### Plugin Management 3. Development Tools:
- lazy.nvim (plugin manager) - nvim-dap - Debug Adapter Protocol
- LSP configurations - nvim-lint - Linting framework
- Treesitter for syntax - nvim-treesitter - Syntax highlighting
- Debug Adapter Protocol (DAP) - nvim-autopairs - Auto-pairing
- telescope.nvim - Fuzzy finding
## Development Setup ## Development Setup
1. Required Components:
- Neovim >= 0.8.0
- Git for plugin management
- Lua >= 5.1
- Python 3.11.9 (configured for Neovim)
- (Optional) Nerd Font for icons
### Requirements 2. Language Support Dependencies:
1. Neovim installation - Language servers (managed by mason.nvim)
2. Git for plugin management - Debug adapters (managed by mason-nvim-dap)
3. Language servers for LSP - Linters (managed by mason-nvim-lint)
4. Compilation tools for Treesitter
5. Debug adapters for debugging
### Configuration Structure
1. Main Configuration
- init.lua: Entry point
- lua/custom/: Custom configurations
- lua/kickstart/: Core functionality
2. Plugin Management
- Lazy-loaded plugins
- Plugin-specific settings
- Custom plugin configurations
## Technical Constraints ## Technical Constraints
1. Performance Considerations:
- Lazy loading for improved startup time
- Event-based plugin loading
- Efficient LSP configuration
### Performance 2. System Requirements:
- Lazy loading required for plugins - Sufficient memory for LSP servers
- Careful management of startup time - Storage space for installed tools
- Efficient event handling - Compatible terminal emulator
### Compatibility 3. Integration Limitations:
- Neovim version requirements - LSP server availability
- LSP server compatibility - Debug adapter compatibility
- Debug adapter requirements - Linter tool requirements
### Dependencies ## Configuration Architecture
- External language servers 1. Plugin Management:
- System-level development tools - Lazy loading based on events/commands
- Plugin-specific requirements - Clear dependency specifications
- Plugin-specific configurations
## Development Tools 2. Language Support:
1. LSP Servers - Extensive LSP server configurations
2. Debug Adapters - Language-specific formatters
3. Treesitter Parsers - Custom debugging setups
4. Code Formatters
5. Linters 3. User Interface:
- Terminal-based UI
- Status line integration
- Diagnostic displays
- Debug UI integration
## Tool Configuration
1. Debug Adapters:
- delve for Go
- debugpy for Python
- Custom keymaps (F1-F7, leader keys)
2. Linters:
- dockerfile: hadolint
- json: jsonlint
- markdown: markdownlint
- python: pylint
- terraform: tflint
3. Formatters:
- Managed through conform.nvim
- Language-specific formatting tools
- Format-on-save capabilities