Skip to content

jellydn/my-nvim-ide

Repository files navigation

Welcome to my-nvim-ide 👋

My personal neovim configuration.

IT Man - My Neovim IDE 2024 Version

Why another neovim configuration?

I have been using Neovim for a long time and I have tried many configurations. I have learned a lot from them and I have decided to create my own configuration. This configuration is inspired by LazyVim and other configurations (kickstart.nvim, nvchad/tinyvim) and I have added my own ideas to it.

Install Neovim

The easy way is using MordechaiHadad/bob: A version manager for neovim.

bob use nightly

Usage

git clone https://github.com/jellydn/my-nvim-ide.git ~/.config/nvim

Try with NVIM_APPNAME

Install requires Neovim 0.10.1+. Always review the code before installing a configuration.

Clone the repository and install the plugins:

git clone [email protected]:jellydn/my-nvim-ide ~/.config/my-nvim-ide

Open Neovim with this config:

NVIM_APPNAME=my-nvim-ide/ nvim

Try with Docker

docker run -w /root -it --rm alpine:latest sh -uelic '
  apk add git nodejs npm neovim fzf ripgrep build-base make musl-dev go --update
  go install github.com/jesseduffield/lazygit@latest
  git clone https://github.com/jellydn/my-nvim-ide ~/.config/nvim
  nvim
  '

Dynamic Configuration with .nvim-config.lua

This configuration allows you to dynamically enable extra plugins and languages based on project-specific settings. Here's how it works:

  1. Project-Specific Configuration File: Create a .nvim-config.lua file in the root of your project directory. This file is not tracked by Git and can be used to set project-specific settings.

  2. Enable Extra Plugins and Languages: Define which extra plugins and languages should be enabled for your project in the .nvim-config.lua file.

Example .nvim-config.lua

-- Enable extra plugins for this project
vim.g.enable_plugins = {
	["no-neck-pain"] = "yes",
  lspsaga = "yes"
}

-- Enable extra languages for this project
vim.g.enable_langs = {
  python = "yes"
}

-- Turn off auto start of eslint LSP, then you could run `ToggleEslint` to on/off
vim.g.lsp_eslint_enable = "no"

-- Use ts_ls for Typescript LSP
vim.g.typescript_lsp = "ts_ls"

Cheatsheet

Here are the keybinding groups configured using the which-key.nvim plugin:

Keybinding Description
<leader><tab> Tabs
<leader>a AI chat
<leader>b Buffer operations
<leader>c Code actions
<leader>d Debug actions
<leader>f File/find operations
<leader>g Git operations
<leader>o Open task runner
<leader>q Quit/session management
<leader>r Refactoring operations
<leader>s Search operations
<leader>t Toggle options
<leader>u UI operations
<leader>w Window management
<leader>x Diagnostics/quickfix
[ Previous operations
] Next operations
g Goto operations
gs Surround operations
z Fold operations

For a detailed list of all keybindings, you can press <leader> in Neovim to bring up the which-key menu.

Screenshots

Screenshot

Image from Gyazo

Features

  • Core
    • Coding
      • Cmp for completion
      • Snippets with LuaSnip
      • Copilot
      • Refactoring
      • Ts comments
      • Neogen for code annotation
      • Lightbulb for code actions (VS Code like)
    • Colorscheme (Kanagaga)
    • Editor
      • Better escape with jj or jk
      • Auto close buffer after 30 minutes of inactivity
      • Git signs
      • Tabline with bufferline
      • Whichkey
      • Noice
      • Toggle Term
      • Trouble
      • Flash
      • Mini icon
      • Mini statusline
      • Mini bufremove
      • Mini surround
      • Mini pairs
      • Mini indent for indenting
      • Edgy for layout management
      • Setup Folding with conform.nvim
    • Lspconfig
      • Lspconfig
      • Mason
    • Treesitter
      • Treesitter
      • Mini Cursorword
      • Ts autotag
  • Plugins
    • Biome
    • Cloak for secure .env with overlay
    • conform for formatting
    • copilot-chat
    • dashboard
    • eslint
    • Fzf for file search
    • hurl
    • vim-jsdoc for JSDoc comments
    • markdown
    • nvim-lint
    • nvim-notify
    • oil for file explorer
    • overseer to run tasks
    • quick-code-runner for running code
    • spectre for search and replace
    • ssr for structure search and replace
    • symbol-usage for symbol usage
    • vimtest and neotest for running test
    • tmux-navigator for tmux navigation
    • treesj for join block of codes
    • typecheck for Typescript type checking
    • undotree for undo history
    • vscode for vscode integration
    • zenmode & twilight for coding in distraction free mode
  • Extras
    • aerial for code navigation
    • avante for AI chat
    • grug-far for search and replace
    • harpoon for quickly navigate between buffers
    • hardtime for learning VIM motion
    • lspsaga for LSP actions
    • mini-hipatterns for highlighting patterns
    • multicursor
    • no-neck-pain for center the layout
    • nvim-ufo for folding
    • package-info for npm package information
    • screenkey for showing key press
    • snipe for quick jump between buffer
    • statuscol for status color
    • wakatime for tracking time

Neovide

# .config/neovide/config.toml
fork = true # Detach from the terminal instead of waiting for the Neovide process to terminate.
frame = "buttonless" # Transparent decorations including a transparent bar.
maximized = true # Maximize the window on startup, while still having decorations and the status bar of your OS visible.
title-hidden = true

Fonts

I recommend using the following repo to get a "Nerd Font" (Font that supports icons)

getnf

Uninstall

  rm -rf ~/.config/nvim
  rm -rf ~/.local/share/nvim
  rm -rf ~/.cache/nvim
  rm -rf ~/.local/state/nvim

Tips

  • Improve key repeat on Mac OSX, need to restart
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 14
  • VSCode on Mac

To enable key-repeating, execute the following in your Terminal, log out and back in, and then restart VS Code:

# For VS Code
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
# For VS Code Insider
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false
# If necessary, reset global default
defaults delete -g ApplePressAndHoldEnabled
# For Cursor
defaults write com.todesktop.230313mzl4w4u92 ApplePressAndHoldEnabled -bool false

Also increasing Key Repeat and Delay Until Repeat settings in System Preferences -> Keyboard.

Key repeat rate

  • Disable full stop with double-space if you see the delay with <space>-<space>

Which-key

Resources

IT Man - LazyVim Power User Guide

IT Man - Talk #33 NeoVim as IDE [Vietnamese]

IT Man - Talk #35 #Neovim IDE for Web Developer

IT Man - Step-by-Step Guide: Integrating Copilot Chat with Neovim [Vietnamese]

IT Man - Power up your Neovim with Gen.nvim

IT Man - Boost Your Neovim Productivity with GitHub Copilot Chat

IT Man - Get to know GitHub Copilot Chat in #Neovim and be productive IMMEDIATELY

IT Man - Enhance Your Neovim Experience with LSP Plugins

IT Man - Bringing Zed AI Experience to Neovim with codecompanion.nvim

Show your support

Give a ⭐️ if this project helped you!

About

My personal neovim configuration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages