about summary refs log tree commit diff
path: root/pkgs/devhell
diff options
context:
space:
mode:
authordevhell <devhell@mailfresser.de>2021-07-10 13:28:12 +0100
committerdevhell <devhell@mailfresser.de>2021-07-10 13:30:17 +0100
commit123328440266080f6f53df3c8107e97f293d62f0 (patch)
tree5cc4fe0dfe477b3505e479415260c2a59d2924b1 /pkgs/devhell
parent56b1bf3a933569456c24e1c635b1b6dc6f3affb3 (diff)
pkgs/vim: Replace vim-css-color with vim-hexokinase
As @aszlig mentioned earlier, this looks like a better plugin. It does
everything I need it to. This commit also enables `termguicolors` which
wasn't the case prior, and without it `vim-hexokinase` cannot function
properly.
Diffstat (limited to 'pkgs/devhell')
-rw-r--r--pkgs/devhell/vim/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/devhell/vim/default.nix b/pkgs/devhell/vim/default.nix
index 60b7318e..f9746bc5 100644
--- a/pkgs/devhell/vim/default.nix
+++ b/pkgs/devhell/vim/default.nix
@@ -21,7 +21,7 @@ pkgs.vim_configurable.overrideAttrs (drv: {
         vim-mucomplete
         vim-signify
         vim-toml
-        vim-css-color
+        vim-hexokinase
       ];
       opt = [ vimtex ];
     };
@@ -48,6 +48,11 @@ pkgs.vim_configurable.overrideAttrs (drv: {
       set laststatus=2
       set signcolumn=number
       set timeout timeoutlen=5000 ttimeoutlen=100
+      if exists('+termguicolors')
+        let &t_8f="\<Esc>[38;2;%lu;%lu;%lum"
+        let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"
+        set termguicolors
+      endif
 
       filetype plugin indent on
       colorscheme tender
@@ -79,6 +84,11 @@ pkgs.vim_configurable.overrideAttrs (drv: {
       " vimtex Settings
       let g:tex_flavor = 'latex'
 
+      " hexokinase Settings
+      let g:Hexokinase_highlighters = ['backgroundfull']
+      let g:Hexokinase_refreshEvents =
+        \ ['TextChanged', 'TextChangedI', 'InsertLeave', 'BufRead']
+
       " Autoload
       autocmd FileType tex :packadd vimtex
     '';