ViiEx / nvim

My NeoVim configuration
2 stars 0 forks source link
title: README
description: Neovim Config README
authors: vchristopoulos
categories: NeoVim
created: 2023-12-12T15:00:47+0200
updated: 2023-12-12T15:10:11+0200
version: 1.1.1

Neovim Config

Introduction

This is my personal configuration of neovim with the mappings I'm more confurtable with and the plugins I like and use everyday. I'll say it first, this config is not perfect by any means. It needs a lot of fixes and a lot of work but I am pretty happy with how it turned out up till now. I'm working on it almost daily and I change/fix a lot of stuff that are either buggy or I don't like.

If this config suites your needs feel free to clone it and use it (I have installation instructions down below) or if you prefer the current state of it and don't want any sudden changes you can fork it and work from there, after that you can check if the commits I push are ok with you and if so you can pull the changes to your own branch as well.

This configuration aims to be my daily IDE and contains configurations from many different amazing people such us:

I'm developing web and mobile apps daily so my configs are mostly focused on those two areas.

This configuration is always updated with new staff, fixes ٩(◕‿◕。)۶ and features I steal... I mean borrow from other configs. I'm always trying to keep it up to date with the latest and greatest plugins and features. Do expect some breaking changes from time to time but I'll try to keep them to a minimum as I occasionally look what other people have done to get inspiration (and steal code). If you clone this config you may find it looking quite different from what the screenshots display below.

Installation

Make sure you create a backup of your current config before you proceed with the installation.

mv ~/.config/nvim ~/.config/nvim.bak

Then run the following command to clone the config.

git clone https://github.com/ViiEx/nvim.git ~/.config/nvim

Dependencies

This config uses the following dependencies:

Features

Small guide to use Which-key

I don't use Which-key since I remember all my mappings but if you want to use it you can do the following:

{
    -- ./lua/plugins/init.lua
    "folke/which-key.nvim",
    module = "which-key",
    keys = {"<leader>", '"', "'", "`"},
    config = function()
        require("plugins.config.which-key")
    end,
    init = function()
        require("core.utils").load_mappings "whichkey"
    end,
}
local present, wk = pcall(require, "which-key")

if not present then
    return
end

local options = {

  icons = {
    breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
    separator = "  ", -- symbol used between a key and it's label
    group = "+", -- symbol prepended to a group
  },

  popup_mappings = {
    scroll_down = "<c-d>", -- binding to scroll down inside the popup
    scroll_up = "<c-u>", -- binding to scroll up inside the popup
  },

  window = {
    border = "none", -- none/single/double/shadow
  },

  layout = {
    spacing = 6, -- spacing between columns
  },

  hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " },

  triggers_blacklist = {
    -- list of mode / prefixes that should never be hooked by WhichKey
    i = { "j", "k" },
    v = { "j", "k" },
  },
}

wk.setup(options)
-- Again config taken from NvChad
M.whichkey = {
    plugin = true,

    n = {
        ["<leader>wK"] = {
            function()
                vim.cmd "WhichKey"
            end,
            "which-key all keymaps",
        },
        ["<leader>wk"] = {
            function()
                local input = vim.fn.input "WhichKey: "
                vim.cmd("WhichKey " .. input)
            end,
            "which-key query lookup",
        },
    },
}

Theme

For theme I use kanagawa which is a fork of tokyonight and can be found at ./lua/plugins/config/kanagawa_conf.lua.

Showcase

Screenshot_1 Screenshot_2 Screenshot_3 Screenshot_4 Screenshot_5 Screenshot_6

Default (basic) keybindings

Keybind Description Mode
\<C-b> Go to the beginning of line i
\<C-e> Got to the end of line i
\<C-h> move left i
\<C-l> move right i
\<C-j> move down i
\<C-k> move up` i
\<C-h> window left n
\<C-l> window right n
\<C-j> window down n
\<C-k> window up n
\<C-s> save file n
\<C-c> copy whole file n
\<leader>b new buffer n
\<C-n> Open File tree n
\<leader>fe emoji explorer n
\<leader>gg ToggleTerm lazygit n
<C-`> ToggleTerm horizontal split n
\<leader>tt ToggleTerm horizontal split n
\<a-cr> Code Action n
\<leader>lr Lsp Rename n
\<leader>lf Open floating diagnostics n
\<C-/> Comment toggle linewise n
\<TAB> goto next buffer n
\<S-Tab> goto prev buffer n
\<leader>x close buffer n
\<leader>ta Toggle aerial n
\<leader>gdh Diff view file history n
\<leader>cb Set banner n
\<C-x> escape terminal mode t

For even more keybindings check the ./lua/core/mappings.lua file, or use Telescope <leader>tk to see all the keybindings.