Skip to content

echo-dave/nvimconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoVim config info and reminders

System Dependencies

Important

  • Neovim v0.10+ currently using v0.11 nightlies
  • fzf brew, apt (outdate), binary
  • ripgrep brew, apt (outdated), binary
  • some flavor of Nerd Font for your client (if running remotely it's your client terminal that needs the font not the server)

If any Treesitter parsers are missing in the :checkhealth :TSInstall <parser>

Note

  • Some tweaks are small screen specific - mostly messages
  • The coding setup is your basic HTML, CSS, Tailwind, JavaScript, and TypeScript with Svelte(Kit)
  • Configured with modular Lazy and Mason with git suppert via GitSigns and Neogit
  • :ToggleTheme swiches from catppuccin mocha (dark) to latte (light) - see theme.lua

Plugin List

#Git #Coding-Centric #UI-Related #Utility

Managers

  • lazy - plugin managing
  • mason - LSP, formatter, linter, DAP managing

Git

  • gitsigns - gutter indicator of changes, stage hunks or buffers, preview hunk changes, blame lines keymaps <leader>hp <leader>hs
  • neogit - git for nvim with log, diff, and all the normal git commands :Neogit

Coding-Centric Formatters and Code Helpers

  • comment - quickly commenting lines of code normal gbc block gcc line, visual gc, gcA at end of line
  • conform - better handling of formatters. Configured to use prettierrc for current project
  • nvim-autopairs - add closing ) ] } etc
  • nvim-cmp - nvim auto completions - <C-space> show, <C-e> close, <CR> confirm
  • nvim-surround - mappings for adding character around a selection <C-s>
  • nvim-tresitter - Nvim parser for syntax highlighting
  • todo-comments - add todos as comments to files with 'TODO:' 'BUG:' 'WARN:' etc for highlighting and searchable - integrates with telescope <leader>ft
  • trouble - diagnostics handler <leader>xx toggle diagnostics, <leader>cl toggle focus, <leader>xQ toggle quickfix list

UI Related

  • colorscheme - choice of color scheme config for catppuccin
  • dressing - some ui visual things - moves some dialogs out of the bottom left foe better visibility / readability like nvim-tree add or rename files
  • indent-blankline - set indentation guide indicators
  • lualine - status line options for git branch, diff, better mode visibility, hostname etc
  • noice - UI customizations like relocating command input and search centrally on screen some lsp popup updates and message handling - :Noice errors for a popup of error messages

Utility

  • auto-session - save and restoring working sessions - integrates with telescope
  • bufferline - buffers as tabs with status - configurable as tabs of buffers
  • markdown - markdown preview automatic in normal mode
  • vim-maximizer - toggle a split to full screen and back <leader>sm
  • nvim-tree - file explorer <C-]> set cwd, - to go up a level, a add, r rename, d delete, m mark, bmv move mark
  • telescope - searches for files, buffers, strings. todos from todo-comments, sessions from auto-session
  • which-key - popup list of key commands when you start a command - ie v for visual mode will popup with motions you can use

Keymaps

#Search #Motions #Maintenance #Spell #Others

<leader> is mapped to SPACE in the options.lua

Search

/ search buffer
:s/seach/replace/g search and replace a line
:%s/search/replace/gc search and replace buffer with confirmation
:Telescope lsp_definitions go to current function definition
<leader>ff find files
<leader>fs find strings
<leader>ft find todos

Basic Motions

f followed by character goes to next instance - prepend number to skip
0 go to start of line
$ go to end of line
a append after cursor
A append end of line
i insert before cursor
I insert start of line
]h next hunk
[h previous hunk

Maintenance

:checkhealth Lazy check health of setup and plugin dependencies
:Mason update and install LSP, formatters, linters, etc
:Lazy update and install configured plugins

Spell Correction

:set spell enable builtin spell checker
:set nospell disable spell checker
]s next misspelled
[s previous misspelled
z= suggest corrections
zg add to correct words

Others

<C-e> close auto complete without confirmation - should close lsp popups too
q close nvim-tree pane if focus otherwise <leader>ee
q close neogit and popups like :Lazy or :Mason interfaces and the :Noice errors popup
:term open a terminal
<ESC><ESC> exit insert mode in a terminal buffer
:Neogit commit :Neogit push do git things


Note

A lot of my initial setup was thanks to inspiration from Josean Martinez's setup

About

my config for nvim v.11+

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages