From 8c0fb0bc95807f02852e982b04a7d9914caeecb7 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 8 May 2021 01:53:21 -0400 Subject: [PATCH] WIP vim config --- flake.lock | 19 ++++++++++++++++++- flake.nix | 6 ++++++ home.nix | 28 +++++++++++++++++++++++----- 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 61c3996..b027188 100644 --- a/flake.lock +++ b/flake.lock @@ -277,7 +277,8 @@ "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_5", + "tokyonight": "tokyonight" } }, "rust-overlay": { @@ -299,6 +300,22 @@ "type": "github" } }, + "tokyonight": { + "flake": false, + "locked": { + "lastModified": 1620382079, + "narHash": "sha256-ny87pRVy9mWAz+aSBWToj9NntGARDgmCKW2zhLIK25E=", + "owner": "folke", + "repo": "tokyonight.nvim", + "rev": "529e6d9f325c82c0b40f8d8b329c6c310a6114c3", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "tokyonight.nvim", + "type": "github" + } + }, "utils": { "locked": { "lastModified": 1617631617, diff --git a/flake.nix b/flake.nix index c8bf84b..760532a 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,12 @@ himalaya.url = "github:soywod/himalaya"; emacs-overlay.url = "github:nix-community/emacs-overlay"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + + #Vim plugins + tokyonight = { + url = "github:folke/tokyonight.nvim"; + flake = false; + }; }; outputs = inputs@{ self, home-manager, nixpkgs, ... }: diff --git a/home.nix b/home.nix index efd2bf4..86091c2 100644 --- a/home.nix +++ b/home.nix @@ -82,11 +82,25 @@ in ]; plugins = with pkgs.vimPlugins; [ + # Language support vim-nix vim-markdown - # status bar / tabline + + # IDE support + completion-nvim # A async completion framework aims to provide completion to neovim's built in LSP written in Lua + lsp-status-nvim + nvim-treesitter # syntax highlighting + nvim-lspconfig + + # Theme + (pkgs.vimUtils.buildVimPlugin { + name = "tokyonight.nvim"; + src = inputs.tokyonight; + }) + + # TODO: comment vim-airline - papercolor-theme + # papercolor-theme fzf-vim ale telescope-nvim @@ -99,15 +113,19 @@ in extraConfig = '' " papercolor-theme - set t_Co=256 " This is may or may not needed. - set background=light - colorscheme PaperColor + " set t_Co=256 " This is may or may not needed. + " set background=light + let g:tokyonight_style = "day" + colorscheme tokyonight " Find files using Telescope command-line sugar. nnoremap ff lua require('telescope.builtin').find_files() nnoremap fg lua require('telescope.builtin').live_grep() nnoremap fb lua require('telescope.builtin').buffers() nnoremap fh lua require('telescope.builtin').help_tags() + + " IDE + lua require'lspconfig'.hls.setup{} ''; };