Skip to content

czyrar/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Neovim conf

This is my neovim configuration. Heavily inspired by kickstart.nvim.

Requirements

  • git

  • nvim v.0.11.0 or above [INSTALL]

  • cargo [INSTALL]

  • npm [INSTALL]

  • tree-sitter [INSTALL]

  • (optional) ripgrep [INSTALL]

  • (optional) fd [INSTALL]

  • (optional) fzf [INSTALL]

  • (optional) A Nerd Font. If not installed then set vim.g.have_nerd_font = false in init.lua.

Arch requisites install (not the font)

sudo pacman -S git neovim rust npm tree-sitter-cli ripgrep fd fzf

Installing

# Required
mv ~/.config/nvim{,.bak}

# Recommended
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}
mv ~/.cache/nvim{,.bak}

# Install
git clone https://github.com/czyrar/nvim.git ~/.config/nvim

What is in here?

The organization is as follows:

.
├── init.lua
├── lazy-lock.json
└── lua
    ├── autocmds.lua
    ├── keymaps.lua
    ├── options.lua
    ├── config
    │   ├── linters.lua
    │   └── lsp.lua
    ├── mappings
    │   ├── formatters.lua
    │   └── linters.lua
    ├── plugins
    │   └── ...
    └── themes
        └── ...

init.lua is a simple file which just bootstraps lazy.nvim (the package manager) and includes the files in the rest of the paths.

lazy.lock fixes the versions of the packages. Feel free to delete it and update to new versions.

lua folder

autocmds.lua include commands that execute when some action happen and are not related to any plugin. In particular:

  • Highlight when yanking.

  • Disable features in big files:

    • Disable Treesitter and LSP if filesize is bigger than 1MB.
    • Disable all syntax highlighting is filesize is bigger than 10MB.
  • Help windows open in vertical.

options.lua sets my preferred defaults:

  • Show numbers (relative) and have them fixed (no LSP/git movement).

  • Do not wrap lines.

  • By default tabs are 2 spaces.

  • Mouse may be used.

  • Omit the mode (I prefer statusline).

  • Save undo history.

  • In general have case-insensitive search.

  • Set nice markers for whitecharacters and such.

  • Preview substitutions.

  • Highlight cursor line.

  • Keep 8 lines above and below cursor.

  • Confirm before closing without save.

keymaps.lua contains my keymaps which are independent of packages. They are all properly commented. In general all keymaps may be explored with :Telescope keymaps.

config subfolder

Contains two files. linters.lua holds custom configurations for different linters while lsp.lua has custom configurations or overrides for LSP servers.

mappings subfolder

Contains two files. formatters.lua establishes a mapping between languages and formatters that can be used. linters.lua offers the same but for linters.

Be free to expand them!

plugins subfolder

One file per plugin with one exception (see below). In the correspondig file at the beginning there is a description of what each plugin does:

themes subfolder

Where purely theme plugins are located. They are loaded first of all. To change theme edit the colorscheme variable at the start of init.lua.

About

My custom neovim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages