Thanks to visit codestin.com
Credit goes to github.com

Skip to content

iocanel/nvim

Repository files navigation

Neovim Configuration

A comprehensive Neovim configuration using Lua and the lazy.nvim plugin manager, optimized for modern software development with extensive language support and debugging capabilities.

🌐 Supported Languages

Language LSP DAP Treesitter Tests Status
Java βœ… βœ… βœ… βœ… Java
Go βœ… βœ… βœ… βœ… Go
Python βœ… βœ… βœ… βœ… Python
JavaScript βœ… βœ… βœ… βœ… JavaScript
TypeScript βœ… βœ… βœ… βœ… TypeScript
Rust βœ… βœ… βœ… βœ… Rust
C/C++ βœ… βœ… βœ… βœ… C/C++
Vue βœ… βœ… βœ… βž– N/A
Lua βœ… βž– βœ… βž– N/A
HTML/CSS βœ… βž– βœ… βž– N/A
PHP βœ… βž– βž– βž– N/A
Solidity βœ… βž– βž– βž– N/A

Quick Install

curl -fsSL https://raw.githubusercontent.com/iocanel/nvim/main/setup.sh | bash

Then use the editor with invim:

invim .              # Open current directory
invim myfile.txt     # Edit a specific file

πŸ—οΈ Core Building Blocks

Plugin Manager

  • lazy.nvim - Modern plugin manager with lazy loading support

Language Server Protocol (LSP)

Syntax Highlighting

Debug Adapter Protocol (DAP)

πŸš€ Key Features

Java Development Excellence

  • JDTLS Integration: Advanced Java LSP with Eclipse JDT support
  • JPA Utilities: Entity navigation and DTO generation
  • Remote Debugging: DAP configuration for remote Java debugging
  • Maven Integration: Custom Maven commands and operations
  • Standalone Projects: Quick Eclipse project setup with JdtStandalone

AI-Powered Development

  • Multiple AI Assistants: Avante, ChatGPT, Copilot, Codeium integration
  • Intelligent Code Completion: Enhanced completion with AI suggestions
  • Code Generation: Template-based code generation for multiple languages

Advanced Git Integration

  • Fugitive: Comprehensive Git commands
  • Gitsigns: Git decorations and hunk operations
  • Neogit: Magit-inspired Git interface
  • Octo: GitHub integration for PRs and issues

Navigation & Search

  • Telescope: Fuzzy finder for files, buffers, and more
  • Hop: Lightning-fast cursor movement
  • Neo-tree: Modern file explorer

Templates & Productivity

  • Template System: Ready-to-use templates for various languages and frameworks
  • Auto-save: Automatic file saving to prevent data loss
  • Multiple Cursors: Efficient multi-cursor editing
  • Toggle Terminal: Integrated terminal management

⌨️ Key Mappings

Leader Key: <Space>

πŸ“‚ Open Operations (<leader>o)

Keymap Action Description
<leader>of Telescope find_files Open files with fuzzy search
<leader><space> Telescope find_files Quick file access
<leader>ob Telescope buffers Open buffer list
<leader>or Telescope oldfiles Open recent files
<leader>od Telescope zoxide Open directory with zoxide
<leader>oc ToggleTerm Open terminal
<leader>ot Neotree Open file tree

πŸ” Search Operations (<leader>s)

Keymap Action Description
<leader>sf Telescope find_files Search files
<leader>sg Telescope live_grep Search with grep
<leader>sw Telescope grep_string Search current word
<leader>sb Telescope current_buffer Search in current buffer
<leader>sh Telescope help_tags Search help documentation
<leader>sd Telescope diagnostics Search diagnostics

πŸͺŸ Window Operations (<leader>w)

Keymap Action Description
<leader>wsh horizontal split Split window horizontally
<leader>wsv vertical split Split window vertically
<leader>wjh <C-w>h Jump to left window
<leader>wjv <C-w>v Jump to right window
<leader>wc quit Close current window
<leader>wp winpick.select Pick window interactively

🌳 Git Operations (<leader>g)

Keymap Action Description
<leader>gc Git commit Create git commit
<leader>gs Gitsigns stage_buffer Stage current buffer
<leader>ghn Gitsigns next_hunk Go to next hunk
<leader>ghp Gitsigns prev_hunk Go to previous hunk
<leader>ghs Gitsigns stage_hunk Stage current hunk
<leader>ghu Gitsigns undo_stage_hunk Undo stage hunk
<leader>ghr Gitsigns reset_hunk Reset current hunk
<leader>gg Neogit Open Neogit interface
<leader>gt Tardis git Git time machine
<leader>gO Octo Open Octo GitHub interface

GitHub Operations (<leader>go)

Keymap Action Description
<leader>gopl Octo pr list List pull requests
<leader>gopc Octo pr checkout Checkout pull request
<leader>gopm Octo pr merge Merge pull request
<leader>gopd Octo pr diff Show PR diff
<leader>gopR Octo pr reload Reload pull request
<leader>gopb Octo pr browser Open PR in browser
<leader>goprs OctoReviewStartOrSubmit Start or submit review
<leader>goprc Octo review close Close review
<leader>goprd Octo review discard Discard review
<leader>goil Octo issues list List issues
<leader>goic Octo issue close Close issue
<leader>goiR Octo issue reload Reload issue
<leader>goib Octo issue browser Open issue in browser
<leader>goru Octo reaction thumbs_up Add thumbs up reaction
<leader>gord Octo reaction thumbs_down Add thumbs down reaction
<leader>gort Octo reaction tada Add tada reaction
<leader>gorh Octo reaction heart Add heart reaction
<leader>gorr Octo reaction rocket Add rocket reaction
<leader>gorp Octo reaction party Add party reaction
<leader>goa Octo actions Show Octo actions

πŸ› οΈ LSP Operations (<leader>l)

Keymap Action Description
<leader>lrn vim.lsp.buf.rename Rename symbol
<leader>lca vim.lsp.buf.code_action Show code actions
<leader>lgd vim.lsp.buf.definition Go to definition
<leader>lgr Telescope lsp_references Go to references
<leader>lgi vim.lsp.buf.implementation Go to implementation
<leader>ltd vim.lsp.buf.type_definition Go to type definition
<leader>ldh vim.lsp.buf.hover Show hover documentation
<leader>lds vim.lsp.buf.signature_help Show signature help
<leader>lf vim.lsp.buf.format Format buffer

πŸ› Debug Operations (<leader>d)

Keymap Action Description
<leader>dd DebugDwim Smart debug start
<leader>da attach_to_remote Attach to remote debugger
<leader>dc DapContinue Continue execution
<leader>di DapStepIn Step into function
<leader>do DapStepOver Step over line
<leader>dO DapStepOut Step out of function
<leader>db DapToggleBreakpoint Toggle breakpoint
<leader>dr DapToggleRepl Toggle REPL
<leader>dui dapui.toggle Toggle debug UI

πŸ”„ Toggle Operations (<leader>t)

Keymap Action Description
<leader>tt Neotree toggle Toggle file tree
<leader>tu Telescope undo Toggle undo tree
<leader>ts TemplateSelect Select and insert template

✨ Editor Operations (<leader>e)

Keymap Action Description
<leader>es statusline_toggle Toggle status line
<leader>en linenumber_toggle Toggle line numbers
<leader>ef focus_toggle Toggle focus mode

πŸ€– AI Assistant Operations (<leader>c)

Keymap Action Description
<leader>cpc CopilotChat Open Copilot chat
<leader>cpf CopilotChatFix Copilot fix suggestions
<leader>cpe CopilotChatExplain Copilot explanations

πŸ“ Project Structure

β”œβ”€β”€ init.lua                 # Main entry point
β”œβ”€β”€ lua/
β”‚   β”œβ”€β”€ config/             # Core configuration
β”‚   β”‚   β”œβ”€β”€ options.lua     # Neovim options and settings
β”‚   β”‚   β”œβ”€β”€ keymaps.lua     # Key mappings and bindings
β”‚   β”‚   β”œβ”€β”€ lazy.lua        # Plugin manager setup
β”‚   β”‚   β”œβ”€β”€ java.lua        # Java-specific utilities
β”‚   β”‚   └── dap/            # Debug adapter configurations
β”‚   β”œβ”€β”€ plugins/            # Plugin specifications
β”‚   └── themes/             # Color scheme configurations
β”œβ”€β”€ templates/              # Language-specific templates
β”œβ”€β”€ tests/                  # Language-specific test suites
└── ftplugin/               # Filetype-specific configurations

πŸš€ Quick Start

  1. Prerequisites: Ensure you have Neovim 0.9+ installed
  2. Clone: Place this configuration in your Neovim config directory
  3. Install: Run nvim and lazy.nvim will automatically install plugins
  4. Language Support: Use :Mason to install additional language servers
  5. Templates: Use <leader>ts to explore available code templates

πŸ§ͺ Testing

The configuration includes comprehensive tests for all supported languages:

# Run all tests
make test

# Test specific language
make test_java
make test_go
make test_python
# ... etc

🎨 Customization

  • Themes: Multiple themes available in lua/themes/
  • Templates: Add custom templates in templates/ directory
  • Java Utilities: Extend Java-specific features in lua/config/java.lua
  • Key Mappings: Customize bindings in lua/config/keymaps.lua

This configuration prioritizes developer productivity with intelligent defaults, comprehensive language support, and efficient workflows. The extensive testing suite ensures reliability across all supported languages and features.

About

My neovim configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages