/neovim_import

Neovim setup & configurations for an Ubuntu/Debian system

Primary LanguageLua

Environment setup

  1. Remove tmp files and old configs

     sudo rm /usr/local/bin/nvim
     sudo rm -r /usr/local/share/nvim/
    
  2. Create ".config/nvim"

     mkdir -p ~/.config/nvim
    
  3. Download and install any Nerd font (eg "Jetbrains mono")

     mkdir ~/.local/share/fonts
     unzip SourceCodePro.zip -d ~/.local/share/fonts/
     fc-cache ~/.local/share/fonts
    
  4. Set a newely installed font as active on the terminal

  5. Install additional dependencies
    // Clipboard providers for Wayland(wl-clip) and X11(xclip)

     sudo apt install wl-clip xclip
    
  6. Install neovim

Import configuration

    git clone https://github.com/iarosb/neovim_import.git ~/.config/nvim --depth 1

Plugins overview

Core functionality:

          Telescope,
          Lspconfig,
          Cmp,
          Treesitter + Treesitter-playground,
          Lazy.nvim - note that a project structure slightly differs from the one recommended by the LazyNvim devs

Quality of life features:

          Harpoon - environment-aware way of marking buffers for instant navigation between them
          Nvim-tree - better visual navigation in large projects

          Zen-mode - instant switch between bird's eye view of your project and performing a code surgery
          Comment.nvim - toggle comments on selection

          Gitsigns - Git integration for buffers
          ibl - better indentation
          Lualine(bar) - customizable bar full of useful widgets
          Fugitive - Git integration for Vim
          Rhubarb - a plugin for fugitive.vim
          Sleuth - Automatic detection for the |BufNewFile|, |BufReadPost|, and |BufFilePost| events.
          Which-key - show Neovim-wide info on keybindings
          lspkind - better LSP suggestion window(icons, color etc)

Utility functions and keymaps:

  • [1] function SetTransparency(transparent bool) true - sets "bg" to "none" making the desktop visibile false - sets global colorcsheme as a provider for "bg" value

  • [2] <leader>bd - run ":bd" against all buffers but the one active. Respects unsaved changes

My workflow:

  • Terminal access:
             1. :term OR :terminal command
             2. Tmux: open new pane OR open new window
             3. Open a new terminal window to the side. Perfectly combines with tiling window managers
             4. Open a floating terminal window: see projects like "vim-floaterm"

  • FS navigation:          1. Nvim-tree
             2. Harpoon
             3. :e path

  • Buffer management:

  • LSP: