Skip to content

richtong/nvim

Repository files navigation

Rich's Nvim

This NVIM is inspired by LazyVIM, but built by hand to remove some of the things in it. You can always access LunarVim which is quite close by running lvim. Overally, it is very hard to make this all work, so instead, I'm going to try to just get the LazyVim Starter working

💤 LazyVim Starter

A starter template for LazyVim. Refer to the documentation to get started. This is forked at nvim.lazyvim

Decomposing the LazyVim Starter

This uses Lazy.nvim to install components

Major components for an IDE so Mason > Nvim-lspconfig, nvim-telescope, nvim-treesitter

  • Mason - Manager for LSP, DAP (Debug Adapter Protocol), linters, formatters, it needs plugins to add LSPs, DSPs, Linters and Formatters. so it need Nvim-lspconfig, nvim-dap. In the old days CoC grew into this by adding an LSP plugin system since code completion, linting and formatting are highly related.
  • Nvim-lspconfig - configuration helper for the native Language Server Protocol. It adds some standard keystrokes like -] to goto definition and C-X, C-O to do manual completion. YOu need an autocompletion plugin to do this automatically. [d and ]d is go to previous and next. Use :LspInfo to control it. With opts.servers, you can add things like pyright or typescript etc. LSPs provide syntax, they provide linting and other things.
  • Nvim-telescope - A fuzzy finder like fzf and has modular components and can use fzf underneath. \fp finds telescope plugins
  • Nvim-treesitter - much smarter highlighting as it understands the abstract symbol tree for code and so coloring works well.

Note sure why this is needed above what mason adds

  • Nvim-cmp - Code completion manager can use LSPs, needs a snippet engine like vsnip, luasnip, ultisnips or snippy and use cmp-emoji to add Emoji completions. Source downstream components. This is like CoC in the vim days.

Here are some optional things that are not in LazyVim

  • nvim-lint to add dedicated linters if the ones in LSPs aren't good enough. This is alot like ALE in the old vim days.
  • formatter.nvim - not sure whey this is needed with both treesitter and nvim-lspconfig
  • nvim-dap - Set breakpoints with nvim-dap-ui - Adds pretty UI

Things that are still missing

  • Codeium or other ai thingies which act like big code adders so can conflict with mason tools.
  • Avante - attempts to emulate VS Code cursor

LunarVim

This is another opiniated versino so goo to analyze it LunarVim and not surprisingly it uses the same base components

Base components that are the same as LazyVim

There are things for completions:

Additional components it has:

For file trees browsing like nerdtree:

For help

New files vs lazyvim starter that I probably need to look at but not install at first

Comparison with .vimrc as of August 2024

There are two different installations in the .vimrc:

Things to merge in:

  • I truly hate the space as the LEADER key, so change back to the Backslash
  • vim-colors-solarized. Gruvbox is kind of ugly
  • machakann/vim-sandwich. I use this an incredible about like saW to add quotes around a word
  • iamcco/markddown-preview.nvim. I do a lot of markdown and this is useful
  • airblade/vim-gitgutter - this is actually very useful
  • pdrohdz/vim-yaml-folds - use za and zR to open and close vim-yaml-folds
  • ygddroot/indentline - shows small vertical for tabs, great for python and yaml

Things I'm not sure about:

  • preservim/nerdcommenter - Note says this is for mypy. Note sure
  • preservim/nerdtree - the tree view at the starter
  • preservim/nerdtree-git-plugin

The duplicates that I don't need:

  • Vim-airline. I as using powerline, but this broke, so returned

Things that are rarely used and I can drop:

  • preservim/vim-solarized8. 24-bit true color got graphical interface versions of vim
  • tpope/vim-git-plugin - Let's you do :G commit, but I don't use much
  • madox2/vim-ai - :AI gives you chatgpt, use ai plugin instead

neovim

This is the later installation that uses CoC for the LSP

  • exafunction/codeium.vim. Should use this more C-[ and M=] for next suggestion

Thing I don't need which is COC since we are using the native LSP:

  • neoclide/coc.nvim
  • neclide/coc-ruff

vim

This uses syntastsic since vim is single threaded and does not allow async. I haven't used this in a while

  • vim-syntastic/syntastic

About

Rich's fine Neovim configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published