/nvim

My personal neovim configuration with a beautiful ui powered by many powerful plugins like Telescope, nvim-tree, lspconfig. Completely written in lua.

Primary LanguageLuaMIT LicenseMIT

KnidNvim

GitHub Twitter Follow

Showcase

Contents

About

  • KnidNvim is my personal neovim configuration with a beautiful ui powered by many powerful plugins like Telescope, nvim-tree, lspconfig. Completely written in lua.

  • KnidNvim has about 10+ beautiful themes. You can add more or customize anything.

  • KnidNvim is a base configuration for neovim. You can extend or something but if you want to do small changes you can edit lua/knid/config.lua file. KnidNvim tried to simplify customization for you.

Requirements

  • Neovim (>= 0.8)
  • Node
  • Use a nerd font in your terminal
  • Make sure to delete this folder ~/.local/share/nvim
  • (Optional) ripgrep is required for grep searching with Telescope.

Installation

git clone https://github.com/knid/nvim ~/.config/nvim && nvim +KnidInstall

Restart nvim after finished.

Update

Run :KnidUpdate in neovim or run nvim +KnidUpdate in your terminal.

Configuration

You can configure KnidNvim with just one file.

lua/knid/config.lua

For open run :KnidConfig or press <leader>es

Note: Default leader: <space> key

Config = {
  leader = " ",
  theme = 'onedark', -- Available Themes: onedark, aquarium, ayu, everforest, nightfox, dayfox, dawnfox, duskfox, terafox, carbonfox
  transparent = false,
  ...
  lsp = {
    auto_format = true,
    colors = {
      error = '#db4b4b',
      warning = '#e0af68',
  ...
  map = {
    custom = {
      { 'n', '<leader>sayhi', function() print('hi :>') end }
    }
  }
  ...
}

return Config

Install LSP servers

Run :Mason and install with gui

or

:MasonInstall <lspserver>

Built-in commands

  • :Run mapping: <leader>r
    • The command run a program in neovim buffer. It can be auto detect file type and run.
    • Its still in development and just support few languages (c, rust, python, c++, js)
  • :KnidInstall
    • The command install KnidNvim
  • :KnidUpdate
    • The command update KnidNvim

Mappings

Default mappings. lua/knid/core/default_maps.lua

You can add more by editing lua/knid/core/custom_maps.lua file.

OR using lua/knid/config.lua file

lua/knid/core/maps.lua

Config = {
  ...
  map = {
    disable_default = false,
    custom = {
      { 'n', '<leader>sayhi', function() print('hi :>') end }
    }
  }
    ...
}

Change Theme

Change the theme variable in lua/knid.config.lua

Config = {
  ...
  theme = 'nightfox',
  -- Available Themes: onedark, aquarium, ayu, everforest, nightfox, dayfox,
  -- dawnfox, duskfox, terafox, carbonfox
  transparent = false,
  ...
}

If you want to make transparent ui change the transparent variable.

Add plugins

KnidNvim use packer for plugin management.

You can see plugin list and add plugins by editing lua/knid/plugins/list.lua

Support

If you wanna support my work here is the donation links