kvrohit / substrata.nvim

A cold, dark color scheme for Neovim
124 stars 6 forks source link

Neovim Theme Background Transparency in Alacritty #5

Closed yonderbread closed 2 years ago

yonderbread commented 3 years ago

Not sure if this is a neovim, alacritty, or substrata neovim theme issue but would you have any idea how to set the background transparency for this theme so that it matches the margins in my alacritty theme? Here's what it looks like right now: image

yonderbread commented 3 years ago

Here's my init.vim by the way:

" Basic vim settings
set noswapfile
set nobackup
set encoding=UTF-8
set showmatch
set hlsearch
set expandtab
set shiftwidth=4
set autoindent
set number
set ruler
set cursorline
syntax enable
filetype plugin indent on
filetype plugin on

" Plugins
call plug#begin(stdpath('config') . '/plugged')

Plug 'yonderbread/vim-pigments'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'jiangmiao/auto-pairs'
Plug 'scrooloose/nerdcommenter'
Plug 'sbdchd/neoformat'
Plug 'davidhalter/jedi-vim'
Plug 'scrooloose/nerdtree'
Plug 'neomake/neomake'
Plug 'terryma/vim-multiple-cursors'
Plug 'machakann/vim-highlightedyank'
Plug 'tmhedberg/SimpylFold'
Plug 'morhetz/gruvbox'
Plug 'cocopon/iceberg.vim'
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
Plug 'kvrohit/substrata.nvim'

call plug#end()

colorscheme substrata
"colorscheme gruvbox
"set background=dark
" set background=light

let g:deoplete#enable_at_startup = 1
let g:airline_theme='iceberg'
"let g:airline_theme='ayu_dark'
"let g:airline_theme='desertink'
" Enable alignment
let g:neoformat_basic_format_align = 1
" Enable tab to space conversion
let g:neoformat_basic_format_retab = 1
" Enable trimmming of trailing whitespace
let g:neoformat_basic_format_trim = 1
"close the autcomplete preview window automatically
" disable autocompletion, because we use deoplete for completion
let g:jedi#completions_enabled = 0
" open the go-to function in split, not another buffer
let g:jedi#use_splits_not_buffers = "right"
" set pylint as python linter
let g:neomake_python_enabled_makers = ['pylint']
" fix yank colors
hi HighlightedyankRegion cterm=reverse gui=reverse
" increase yank highlight duration in ms
let g:highlightedyank_highlight_duration = 1000
" Set up powerline fonts for airline
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif
let g:airline_symbols.maxlinenr = ' '
let g:airline_symbols.linenr = ' '
let g:airline_symbols.colnr = ' '

autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
" navigate autocomplete list with TAB
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
" Turn on 256 bit colors
set termguicolors

" iamcco/markdown-preview.nvim
" COMMAND REFERENCE:
" :MarkdownPreview - Start preview
" :MarkdownPreviewStop - Stop preview
let g:mkdp_auto_start = 0
let g:mkdp_auto_close = 1
let g:mkdp_refresh_slow = 0
let g:mkdp_command_for_global = 0
let g:mkdp_open_to_the_world = 0
let g:mkdp_preview_options = {
    \ 'mkit': {},
    \ 'katex': {},
    \ 'uml': {},
    \ 'maid': {},
    \ 'disable_sync_scroll': 0,
    \ 'sync_scroll_type': 'middle',
    \ 'hide_yaml_meta': 0,
    \ 'sequence_diagrams': {},
    \ 'flowchart_diagrams': {},
    \ 'content_editable': v:false,
    \ 'disable_filename': 0
    \ }
let g:mkdp_page_title = '「${name}」'
let g:mkdp_filetypes = ['markdown']
"let g:mkdp_markdown_css = expand('~/.config/nvim/markdown.css')
"let g:mkdp_highlight_css = ''
"let g:mkdp_port = ''
"let g:mkdp_open_ip = ''
"let g:mkdp_browser = ''
"let g:mkdp_echo_preview_url = 0
"let g:mkdp_browserfunc = ''
kvrohit commented 3 years ago

There is no transparency support for this theme at the moment. Will take this as a TODO item.

yonderbread commented 2 years ago

@kvrohit Ah I see, well thank you!

kvrohit commented 2 years ago

@yonderbread I have implemented the transparency support in the following branch: https://github.com/kvrohit/substrata.nvim/tree/transparency-support

Since I do not use this much myself, I would love to get some feedback from you if you want to try it out. You can use your package manager to install the plugin from this branch.

For vim-plug you can do the following:

Plug 'kvrohit/substrata.nvim', { 'branch': 'transparency-support' }

Additionally, you need to set let g:substrata_transparent = 1 in your init.vim.

kvrohit commented 2 years ago

@yonderbread This is now merged into main so you don't need to use the special branch settings. Updating the plugin should be sufficient. Set let g:substrata_transparent = 1 to enable transparency.

yonderbread commented 2 years ago

Sorry I'm seeing this so late. I will have to give this a try! Will get back to you. :D Thanks btw