From 0645f5c7743eb4753320c442d3628af12b5bc1a5 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 8 May 2021 07:05:06 -0400 Subject: [PATCH] Stash neovim config WIP --- home.nix | 28 +++++++++++++++++++++++++--- hosts/x1c7.nix | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/home.nix b/home.nix index 86091c2..a36678b 100644 --- a/home.nix +++ b/home.nix @@ -96,7 +96,8 @@ in (pkgs.vimUtils.buildVimPlugin { name = "tokyonight.nvim"; src = inputs.tokyonight; - }) + }) # This doesn't render colors well + onedark-vim # TODO: comment vim-airline @@ -112,11 +113,28 @@ in ]; extraConfig = '' + "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. + "If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support + "(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) + if (empty($TMUX)) + if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 + endif + "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > + "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > + " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > + if (has("termguicolors")) + set termguicolors + endif + endif + " papercolor-theme " set t_Co=256 " This is may or may not needed. " set background=light - let g:tokyonight_style = "day" - colorscheme tokyonight + " let g:tokyonight_style = "day" + syntax on + colorscheme onedark " Find files using Telescope command-line sugar. nnoremap ff lua require('telescope.builtin').find_files() @@ -126,6 +144,10 @@ in " IDE lua require'lspconfig'.hls.setup{} + + "Markdown + let g:vim_markdown_new_list_item_indent = 2 + ''; }; diff --git a/hosts/x1c7.nix b/hosts/x1c7.nix index d394604..738bef3 100644 --- a/hosts/x1c7.nix +++ b/hosts/x1c7.nix @@ -78,6 +78,8 @@ vlc vscode mpv + alacritty + fractal ]; services = {