Skip to content

niksingh710/nvix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image


Neovim Configuration

Welcome to my Neovim configuration, inspired and powered by Nixvim.
This setup is a port of my previous configuration, which you can find here.
I've switched to using nix for its many advantages, which far outweigh any drawbacks.

GitHub repo size GitHub Org's stars GitHub forks GitHub last commit

Type Status
bare Simple Most minimal Config to get running quickly. (Contains fzf and neo-tree)
base A Complete Set for Development and ideal for use
full Also contails all of the above + tex stuff (They are heavy on download, few gigs)

bare config is meant to use with nix run on virtual system or somewhere I wanna get the job done quickly
base config is the default package and it is meat to be used normally.
full config contains tex/latex setup the package download is heavy that's why it is not recommended to have always.

Layout
 ./
├──  config/
│  ├──  base/
│  ├──  core/
│  └──  default.nix
├──  lang/
│  ├──  default.nix
│  ├──  lua.nix
│  └──  shell.nix
├──  lib/
│  ├──  default.nix
│  └──  icons.nix
├──  pkgs/
│  └──  default.nix
├──  variables/
│  └──  default.nix
├──  flake.lock
├──  flake.nix
├──  LICENSE
└──  README.md
  • Every file in a dir is imported by default.nix. You don't need to import them manually.
  • The lib/default.nix file is responsible for importing all utility functions and modules.
  • The general.nix file contains small plugins that do not require extensive configuration.

I have added files in config/lang still not working :womp:. Ensure you have done git add <newfile> that's how flakes work. (git restore --staged . to revert). [Same for any new file.]

How to update plugins to latest version? -> nix flake update should do that. Also I regularly update the flake.lock file.

Installation

Ensure that you have nix installed on your system and flakes enabled.

Nix pkg manager installation

# This is multiuser installation of nix requires sudo
sh <(curl -L https://nixos.org/nix/install) --daemon
Quick run

As the config is based on flakes you can run it quickly without any long code snippet.

nix run "github:niksingh710/nvix"
How I use it on my nix config
# inputs
nvix.url = "github:niksingh710/nvix";

# Overlay
nvix = inputs.nvix.packages.${pkgs.system}.<type>.extend {
    config.colorschemes.tokyonight.settings.transparent = true;
};

home.packages = [
    nvix
];
To run a specific config
nix run "github:niksingh710/nvix#bare"
nix run "github:niksingh710/nvix#base"
nix run "github:niksingh710/nvix#full"
Installing on non-NixOS systems
nix profile install "github:niksingh710/nvix"
Installing on NixOS systems
# flake input (ensure it is using unstable input of nixpkgs as i prefer that)
{
  inputs.nvix = {
    url = "github:niksingh710/nvix";
    inputs.nixpkgs.follows = "nixpkgs";
  };
}

# flake module pkg install or home-manager package (in my config i manager system variable)
# you may need to adjust that accordingly.
  [
    inputs.nvix.packages.${system}.default
  ];

Previews

Note

The Screenshots are taken after I have installed my configs via my ndots.
I utilize extend feature of nixvim there to update my colorscheme and have the one from wallpaper.

image image
image image
image image
Telescope

image

Tip to get this kind of blend on any theme.

    vim.api.nvim_exec([[
      function! CustomTelescopeHighlights() abort
        " Fetching colors from core Neovim highlight groups
        let fg = synIDattr(hlID('Normal'), 'fg')
        let bg0 = synIDattr(hlID('Normal'), 'bg')
        let bg1 = synIDattr(hlID('NormalFloat'), 'bg')
        let orange = synIDattr(hlID('WarningMsg'), 'fg')
        let purple = synIDattr(hlID('Statement'), 'fg')
        let green = synIDattr(hlID('String'), 'fg')
        let red = synIDattr(hlID('ErrorMsg'), 'fg')

        " Setting custom highlights for Telescope
        call nvim_set_hl(0, 'TelescopeMatching', {'fg': orange})
        call nvim_set_hl(0, 'TelescopeSelection', {'fg': fg, 'bg': bg1, 'bold': v:true})
        call nvim_set_hl(0, 'TelescopePromptPrefix', {'bg': bg1})
        call nvim_set_hl(0, 'TelescopePromptNormal', {'bg': bg1})
        call nvim_set_hl(0, 'TelescopeResultsNormal', {'bg': bg0})
        call nvim_set_hl(0, 'TelescopePreviewNormal', {'bg': bg0})
        call nvim_set_hl(0, 'TelescopePromptBorder', {'bg': bg1, 'fg': bg1})
        call nvim_set_hl(0, 'TelescopeResultsBorder', {'bg': bg0, 'fg': bg0})
        call nvim_set_hl(0, 'TelescopePreviewBorder', {'bg': bg0, 'fg': bg0})
        call nvim_set_hl(0, 'TelescopePromptTitle', {'bg': purple, 'fg': bg0})
        call nvim_set_hl(0, 'TelescopeResultsTitle', {'fg': bg0})
        call nvim_set_hl(0, 'TelescopePreviewTitle', {'bg': green, 'fg': bg0})
        call nvim_set_hl(0, 'CmpItemKindField', {'bg': red, 'fg': bg0})

        " Make cmp menu transparent
        call nvim_set_hl(0, 'PMenu', {'bg': 'NONE'})
      endfunction

      " Call the function to apply the custom highlights
      call CustomTelescopeHighlights()
    ]], false)
Dashboard

image

Lualine

image

Releases

No releases published

Packages

No packages published

Languages