Skip to content

All the Lua files for my macOS/neovim development setup

Notifications You must be signed in to change notification settings

hsetlik/nvim-rc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hayden's Neovim RC

If you want to use this config, clone this repo inside the ~/.config directory on macOS. Make sure that the top level folder just inside ~/.config is called nvim.

My setup is based largely on these videos by Josean Martinez

Features

In making the move from VSCode to Neovim, I wanted to take advantage of Neovim's performance, extensibility, and keyboard based workflow without losing the user-friendly bells and whistles of VSCode. For the sort of work I do, I decided on this list of features I would need

  • Fuzzy finder
  • File tree
  • Git commands and diff view
  • Basic programming text utilities (indentation, automatically adding the closing ) or }, etc.)
  • Auto-complete with full LSP support
  • Ability to run CMake configure and build commands from inside the editor

Keymap Cheat Sheet

Window Splitting and Tabs

  • "leadersv": Split window vertically
  • "leadersx": Close split window
  • "leaderx": Close current tab
  • "leaderxo": Close all other tabs
  • "leader=": Next tab
  • "leader-": Previous tab

Comments

  • "gcc": Toggle current line as single-line comment
  • "gbc": Toggle current line as multi-line comment
  • "gc": Toggle selection as single-line
  • "gb": Toggle selection as multi-line
  • "gco": Insert comment on previous line
  • "gcO": Insert comment on next line
  • "gcA": Insert comment at the end of the current line

File Tree

  • "leadere": Toggle file tree
  • "leaderec": Show current file in tree
  • "Ctrlt": Open selected result in new tab
  • "a": Create file
  • "r": Rename file
  • "d": Delete file

Fuzzy Finding

  • "leaderff": Search for files in cwd
  • "leaderfr": Search for recent files
  • "leaderfs": Search for string in cwd
  • "leaderfc": Search for string under cursor in cwd
  • "Ctrlt": Open selected result in new tab
  • "Ctrlv": Open selected result in vertical split

LSP

  • "gR": Show references in Telescope
  • "gd": Jump to declaration
  • "gD": Show declaration in Telescope
  • "gi": Show implementations in Telescope
  • "gt": Show type definitions in Telescope
  • "leaderca": Show available code actions
  • "leaderrn": Smart rename
  • "leaderD": Show buffer diagnostics in Telescope
  • "leaderd": Show line diagnostics in Telescope
  • "[d": Jump to previous diagnostic
  • "]d": Jump to next diagnostic
  • "K": Show documentation for symbol under cursor if available
  • "leaderrs": Restart LSP

CMake

  • "leadercg": CMakeGenerate
  • "leadercB": Select build target
  • "leadercb": Build current target
  • "leadercR": Select run target
  • "leadercr": Run current target

Git

  • "leadergA": Stage all changes
  • "leadergs": View git status info
  • "leadergc": Commit
  • "leadergp": Push
  • "leadergd": View diff of current file

Formatting

  • "leaderfm": Format current file or selection

Plugins

The config is all written in Lua and the plugins are managed by Lazy The current set of plugins installed:

About

All the Lua files for my macOS/neovim development setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages