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",
"noremap",
"norl",
"noto",
"nside",
"numhl",
"nvim",
@ -164,7 +165,8 @@
"yamlls",
"yinfei",
"yinq",
"ymbols"
"ymbols",
"fonts-noto-color-emoji"
],
"ignoreWords": [],
"allowCompoundWords": true,

View File

@ -27,6 +27,7 @@ External Requirements:
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
- 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
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
- Language Setup:
- If you want to write Typescript, you need `npm`
- 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
# Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim-linux64
sudo mkdir -p /opt/nvim-linux64
sudo chmod a+rX /opt/nvim-linux64
sudo tar -C /opt -xzf 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-linux-x86_64
sudo mkdir -p /opt/nvim-linux-x86_64
sudo chmod a+rX /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
# 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><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,33 +656,28 @@ require('lazy').setup({
return
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 })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf })
end,
})
end
-- 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
vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds({ group = 'kickstart-lsp-highlight', buffer = event2.buf })
end,
})
-- Removed extra 'end' that prematurely closed the callback function
-- The following code creates a keymap to toggle inlay hints in your code
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
map('<leader>th', function()
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!
-- I promise not to create any merge conflicts in this directory :)
--

View File

@ -1,22 +1,22 @@
# 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.
-- 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.
-- autopairs
-- https://github.com/windwp/nvim-autopairs

View File

@ -1,22 +1,22 @@
# 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.
-- 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.
-- debug.la
--

View File

@ -64,7 +64,7 @@ return {
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>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>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
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' })
-- Toggles
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,
},
},

View File

@ -1,22 +1,22 @@
# 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.
-- 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.
return {

View File

@ -1,37 +1,55 @@
# Neovim Configuration Active Context
# Active 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
- Created Memory Bank structure
- Initialized core documentation files
- Established project organization
- Documented core configuration patterns
- Analyzed plugin configurations:
- LSP and completion setup
- Debugging infrastructure
- Linting framework
- Auto-pairs integration
## Current Focus
- Setting up base configuration structure
- Documenting existing setup
- Planning plugin organization
## Current Goals
1. Verify tool installation and compatibility:
- LSP servers for configured languages
- Debug adapters
- Linting tools
## Active Decisions
1. Using modular Lua configuration
2. Implementing lazy plugin loading
3. Organizing debug capabilities
2. Review and optimize:
- LSP configurations
- Debug adapter configurations
- Linting rules
- Keymaps and shortcuts
## Next Steps
1. Review existing plugin configurations
2. Document current plugin setup
3. Evaluate debug integration
4. Plan performance optimizations
3. Enhance documentation:
- Plugin-specific configurations
- Language-specific setups
- Custom keybindings
## Open Questions
1. Which plugins need custom configurations?
2. Are there any performance bottlenecks?
3. What debug adapters are required?
4. How to optimize startup time?
1. Are all required language servers properly configured?
2. Are there any performance bottlenecks in the current setup?
3. Should additional language support be added?
4. Are the current keymaps optimal for the workflow?
5. Would any additional plugins benefit the setup?
## Implementation Notes
- Need to document plugin dependencies
- Consider startup performance
- Review debug configuration needs
- Plan LSP server setup
## Focus Areas
1. Plugin Configuration Optimization
- Review lazy-loading strategies
- Verify event triggers
- 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
## 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
1. Complex plugin management
2. Development environment setup time
3. Code navigation efficiency
4. Debug workflow integration
5. Configuration maintainability
1. Complex plugin management and configuration
2. Code debugging setup and integration
3. Consistent code linting across projects
4. Efficient text editing through auto-pairing
5. Configuration organization and maintenance
## Intended Usage
- Primary development environment for coding
- Plugin management through Lua modules
- Integrated debugging capabilities
- Efficient code navigation and completion
- Custom keybindings and commands
## Expected Functionality
1. Plugin Management
- Organized plugin configurations in separate files
- Clear dependency management
- Easy plugin addition and removal
2. Development Tools
- Integrated debugging capabilities
- Code linting and static analysis
- Automatic bracket/quote pairing
3. Configuration Structure
- Modular organization
- Clear separation of concerns
- Easy maintenance and updates
## User Experience Goals
1. Fast and responsive editing
2. Intuitive plugin management
3. Clear error feedback
4. Efficient code navigation
5. Seamless 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
1. Fast and responsive editing experience
2. Intuitive plugin functionality
3. Consistent behavior across different file types
4. Clear error and diagnostic feedback
5. Smooth debugging experience

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
[2024-02-22 13:01] Memory Bank initialization
The project has:
1. Comprehensive LSP Configuration
- Multiple language servers
- Completion integration
- Diagnostic support
### What Works
- Basic directory structure
- Core documentation setup
- Initial project organization
2. Debug Infrastructure
- DAP setup for multiple languages
- Custom keymaps
- Integrated debug UI
### In Progress
1. Documentation of existing setup
2. Plugin configuration review
3. Debug capability assessment
3. Code Quality Tools
- File-type specific linters
- Format-on-save capability
- Treesitter integration
### Known Issues
- Need to document current plugin dependencies
- Debug configuration needs review
- Performance optimization opportunities
- LSP setup documentation needed
4. Development Workflow
- Fuzzy finding with Telescope
- Git integration
- Efficient navigation keymaps
## Next Steps
1. Tool Verification
- [ ] Test LSP server installations
- [ ] Verify debug adapter functionality
- [ ] Validate linter configurations
### Short Term
1. Review and document current plugin setup
2. Assess debug integration status
3. Document LSP configuration
4. Map performance bottlenecks
2. Configuration Optimization
- [ ] Review lazy-loading strategies
- [ ] Optimize startup time
- [ ] Evaluate plugin dependencies
### Medium Term
1. Optimize plugin loading
2. Enhance debug capabilities
3. Improve LSP integration
4. Add custom keybindings
3. Documentation Enhancement
- [ ] Add usage guides
- [ ] Document custom keymaps
- [ ] Create troubleshooting guide
### Long Term
1. Create comprehensive documentation
2. Implement performance improvements
3. Extend debug functionality
4. Enhance plugin ecosystem
4. Potential Improvements
- [ ] Additional language support
- [ ] Performance optimizations
- [ ] Enhanced UI configurations
## Completed Work
[2024-02-22]
- Created Memory Bank structure
- Initialized core documentation
- Established project organization
## Known Issues
- Need to verify all LSP servers are properly configured
- Debug adapter compatibility needs testing
- Linter configurations need validation
- 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
## 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
1. Modular plugin management
2. Efficient code navigation and editing
3. Debugging capabilities
4. Code completion and LSP support
5. Clean and maintainable configuration structure
1. Maintain a modular and organized plugin configuration
2. Ensure efficient code editing capabilities
3. Provide robust debugging support
4. Implement code linting functionality
5. Configure auto-pairing for brackets and quotes
## Project Goals
- Create a well-organized Neovim configuration
- Implement efficient plugin management
- Establish consistent coding patterns
- Enable debugging capabilities
- Maintain documentation for future reference
## Goals
- Create a maintainable and extensible Neovim configuration
- Optimize development workflow through carefully selected plugins
- Ensure smooth integration between different plugin functionalities
- Maintain clear documentation of configuration choices and patterns
## Success Criteria
1. Working plugin system
2. Functional debugging setup
3. Clear configuration structure
4. Documented setup and usage
5. Maintainable codebase
## Technical Stack
- Neovim
- Lua programming language
- Kickstart framework
- Various Neovim plugins (debug, lint, autopairs, etc.)
## 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
## Architecture Overview
### Directory Structure
```
.
├── init.lua # Main entry point
├── lua/
│ ├── custom/ # Custom configurations
│ │ └── plugins/ # Plugin-specific settings
│ └── kickstart/ # Core functionality
│ └── plugins/ # Plugin management
├── init.lua # Main configuration entry point
└── lua/
└── kickstart/
└── plugins/ # Plugin-specific configurations
├── debug.lua # DAP debugging setup
├── lint.lua # nvim-lint configuration
└── autopairs.lua # Auto-pairing setup
```
## Design Patterns
## Core Patterns
### Plugin Management
- Module-based plugin organization
- Lazy loading for performance
- Plugin-specific configuration isolation
- Conditional plugin loading
### Plugin Organization
- Lazy.nvim for plugin management and lazy loading
- Modular plugin configuration files
- Clear separation of concerns per plugin
- Event-based plugin loading for better startup time
### Configuration Patterns
1. Modular Configuration
- Separate files for different concerns
- Clear dependency management
- Isolated plugin configurations
### LSP Integration
- Mason.nvim for LSP server management
- Comprehensive language server configurations
- Integrated completion with nvim-cmp
- Automatic server installation and setup
2. Event-Driven Setup
- Lazy plugin loading
- Event-based initialization
- Conditional feature enabling
### Development Tools Integration
1. Debugging System
- nvim-dap for debug adapter protocol support
- Language-specific debug configurations (Go, Python)
- Integrated debug UI with nvim-dap-ui
- Custom keymaps for debug operations
3. Error Handling
- Protected calls for plugin setup
- Fallback configurations
- Clear error reporting
2. Linting Framework
- File-type specific linters
- Automatic lint on events (BufEnter, BufWritePost, InsertLeave)
- 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
1. Core System
- init.lua loads core modules
- Establishes basic editor settings
- Sets up plugin management
1. Plugin Manager (lazy.nvim) → Plugin Configurations
2. LSP Layer → Language Servers → Code Intelligence
3. Debug Adapters → DAP UI → User Interface
4. Linters → Diagnostic Framework → Error Reporting
2. Plugin System
- Managed through lua/custom/plugins
- Isolated plugin configurations
- Dependency handling
3. Debug Integration
- 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
## Design Decisions
1. Event-driven plugin loading for performance
2. Modular configuration for maintainability
3. Extensive use of built-in LSP capabilities
4. Integration between complementary tools (LSP, DAP, Linters)
5. Custom keymaps for efficient workflow

View File

@ -1,58 +1,85 @@
# Neovim Configuration Technical Context
## Technologies Used
1. Core Technologies:
- Neovim - Core editor
- Lua - Configuration language
- Kickstart Framework - Configuration foundation
- lazy.nvim - Plugin manager
### Core
- Neovim (>= 0.8.0)
- Lua (>= 5.1)
- Git (for plugin management)
2. LSP Technologies:
- mason.nvim - LSP/DAP/Linter manager
- nvim-lspconfig - LSP configuration
- nvim-cmp - Completion engine
- LuaSnip - Snippet engine
### Plugin Management
- lazy.nvim (plugin manager)
- LSP configurations
- Treesitter for syntax
- Debug Adapter Protocol (DAP)
3. Development Tools:
- nvim-dap - Debug Adapter Protocol
- nvim-lint - Linting framework
- nvim-treesitter - Syntax highlighting
- nvim-autopairs - Auto-pairing
- telescope.nvim - Fuzzy finding
## 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
1. Neovim installation
2. Git for plugin management
3. Language servers for LSP
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
2. Language Support Dependencies:
- Language servers (managed by mason.nvim)
- Debug adapters (managed by mason-nvim-dap)
- Linters (managed by mason-nvim-lint)
## Technical Constraints
1. Performance Considerations:
- Lazy loading for improved startup time
- Event-based plugin loading
- Efficient LSP configuration
### Performance
- Lazy loading required for plugins
- Careful management of startup time
- Efficient event handling
2. System Requirements:
- Sufficient memory for LSP servers
- Storage space for installed tools
- Compatible terminal emulator
### Compatibility
- Neovim version requirements
- LSP server compatibility
- Debug adapter requirements
3. Integration Limitations:
- LSP server availability
- Debug adapter compatibility
- Linter tool requirements
### Dependencies
- External language servers
- System-level development tools
- Plugin-specific requirements
## Configuration Architecture
1. Plugin Management:
- Lazy loading based on events/commands
- Clear dependency specifications
- Plugin-specific configurations
## Development Tools
1. LSP Servers
2. Debug Adapters
3. Treesitter Parsers
4. Code Formatters
5. Linters
2. Language Support:
- Extensive LSP server configurations
- Language-specific formatters
- Custom debugging setups
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