kaicataldo / material.vim

🎨 A port of the Material color scheme for Vim/Neovim
MIT License
610 stars 71 forks source link

Airline theme is not loaded #54

Closed cxor closed 2 years ago

cxor commented 4 years ago

As for title, the bundled airline theme does not work in my configuration. Moreover, when executing the command :AirlineTheme material to temporarily set the theme as the one to use, I get as output airline: these is an error in theme material. I use neovim, and in my configuration I set the variable airline_theme as suggested.

I upload my neovim configuration as a txt, since Github complains if I leave the ".vim" extension. init.vim.txt

kaicataldo commented 4 years ago

Would appreciate it if you just pasted the contents of init.vim into the issue. Thanks!

sboldon commented 3 years ago

I am having the same problem, using just regular vim not neovim.

kaicataldo commented 3 years ago

We'll need more details to debug this. What error are you seeing? What version of Vim are you using? What does the relevant part of your configuration look like?

sboldon commented 3 years ago

When trying :AirlineTheme material I get the error airline: There is an error in theme "material". If I attempt to set the theme with let g:airline_theme = 'material' in my vimrc, I get this error when starting vim airline: Could not resolve airline theme "material". Themes have been migrated to github.com/vim-airline/vim-airline-themes.

I'm using Vim 8.2 on Mac. Here's relevant vimrc settings for the plugin.

" ** kaicataldo/material.vim
set background=dark   
if (has('termguicolors')) 
  set termguicolors
endif

if !has('nvim')           
  let &t_ZH="\e[3m"
  let &t_ZR="\e[23m"
endif

let g:material_theme_style = 'palenight'
let g:material_terminal_italics = 1
colorscheme material

" ** vim-airline
let g:airline_theme = 'material'            
set laststatus=2                             
let g:airline_powerline_fonts = 1           
let g:airline_detect_paste = 1             
let g:airline#extensions#tabline#enabled = 1  
let g:airline#extensions#ale#enabled = 1       
let g:airline#extensions#hunks#non_zero_only = 1

Let me know if any other info would be helpful!

kaicataldo commented 3 years ago

Thank you. I wonder if someone who uses Airline can dig into this a bit? I haven't used it for years, so someone more familiar with it could probably get it done quicker!

Otherwise I'll try to fix it myself ASAP, but I'm currently pretty swamped.

Goku-San commented 3 years ago

Hello @sboldon, just saw this, hope its not to late.

I use airline. Have you checked the path to the airline theme ?? I used vim-plug to install the theme.

My path to the theme is airline $HOME/.vim/autoload/plugged/material.vim/autoload/airline/themes/material.vim lightline $HOME/.vim/autoload/plugged/material.vim/autoload/lightline/colorscheme/material_vim.vim

The paths for lightline and airline are different.
So check the path for the theme, for what ever plugin manager you use. This is just an idea.

I tired these settings ( yours ) from above and they work just fine.

let g:material_theme_style = 'palenight'
let g:material_terminal_italics = 1

Edit...

Also another idea... Since you use MacVim or even through terminal ( Itrem2, I believe), you don't need

if (has('termguicolors')) 
  set termguicolors
endif

Just go with set termguicolors and after that set background=dark.

kaicataldo commented 2 years ago

I'm going to go ahead and close this as a stale issue, but if anyone is still having issues please feel free to open a new one.