Closed prdanelli closed 3 years ago
Can you reproduce this on shadmansaleh/lualine.nvim ?
Hello, yes it seems to have the same issue in both.
I've reduced my vimrc to the following:
call plug#begin()
Plug 'hoob3rt/lualine.nvim'
call plug#end()
lua << EOF
require'lualine'.setup{}
EOF
And the issue seems to be the same, when manually source the vimrc it works, but switching to another application, with alt tab or clicking, it seems to revert to something. I've attached a screenshot.
After sourcing:
After sourcing:
As a side note, the status bar that is being shown is there when Lualine is disabled, so it might be an nvim default?
@parelkobra did you try https://github.com/shadmansaleh/lualine.nvim ? I don't think this issue can occur there . Because it doesn't relay on autocommands to switch between inactive and active status.
Also the second screenshot I'm pretty sure you have airline installed that's why you're getting it . Uninstall that plugin before installing lualine.
If you still get the issue . Use https://gist.github.com/shadmansaleh/3aca29632e9a77a632705b62617c9dac and try reproducing the issue in an isolated environment with my fork.
I think i worked out the issue. I had used packer
in the past to test it out and it had a bunch of plugins in it getting autoloaded.
Sorry for the time i've wasted. Thank you for work on this plugin.
Self Checks
How to reproduce the problem
Inside of a .vim config file:
Switch to another window (alt tab), then switch back to nvim and the default theme will be shown and you will need to
source ~/.vimrc
.Minimal config to reproduce the issue
Config
```" left-sep " right-sep """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Nvim Configuration """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:python_host_prog = '/usr/bin/python' let g:python3_host_prog = '/usr/bin/python3' let g:ruby_host_prog = '/home/paul/.rvm/rubies/ruby-2.7.3/bin/ruby' """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " General """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set nocompatible set ttyfast set encoding=UTF-8 set fileencoding=utf-8 syntax on filetype on filetype indent on filetype plugin on set regexpengine=1 set synmaxcol=200 set updatetime=300 set timeoutlen=500 set shell=bash set ruler """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Look / Colours """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set termguicolors set background=dark lua << EOF ------------------------------------------------------------------------------- -- set colorscheme nightfox ------------------------------------------------------------------------------- local nightfox = require('nightfox') nightfox.setup({ fox = "nordfox", -- change the colorscheme to use nordfox styles = { comments = "italic", -- change style of comments to be italic keywords = "bold", -- change style of keywords to be bold functions = "italic,bold" -- styles can be a comma separated list }, colors = { red = "#FF000", -- Override the red color for MAX POWER bg_alt = "#000000", }, hlgroups = { TSPunctDelimiter = { fg = "#BF616A" }, -- Override a highlight group with the color red LspCodeLens = { bg = "#000000", style = "italic" }, } }) nightfox.load() EOF lua << EOF ------------------------------------------------------------------------------- -- LuaLine ------------------------------------------------------------------------------- require'lualine'.setup({ options = { lower = true, icons_enabled = true, theme = 'auto', component_separators = { '\\', '/' }, section_separators = { '', '' }, disabled_filetypes = {} }, sections = { lualine_a = { { 'mode', lower = false } }, lualine_b = { 'branch' }, lualine_c = { require'lsp-status'.status }, lualine_x = { 'filename', 'encoding', 'filetype' }, lualine_y = { 'progress' }, lualine_z = { 'location' } }, inactive_sections = { lualine_a = {}, lualine_b = {}, lualine_c = { 'filename' }, lualine_x = { 'location' }, lualine_y = {}, lualine_z = {} }, tabline = {}, extensions = {} }) EOF " Character line limits set colorcolumn=80,120 " Highlight the current line set cursorline " Show status line always set laststatus=2 " Treat .es6 as .js au BufNewFile,BufRead *.es6 set filetype=javascript au BufNewFile,BufRead *.rasi set filetype=css " Code folding set nofoldenable set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() set fillchars=fold:- " Keep all folds open when a file is opened augroup OpenAllFoldsOnFileOpen autocmd! autocmd BufRead * normal zR augroup END """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Behaviour """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set conceallevel=0 " Tab / space behaviour set tabstop=2 set smarttab set expandtab " Don't show -- INSERT-- set noshowmode " Search recurively set path+=** " Menu autocomplete set wildmenu set wildmode=longest:full,full " How should backspace be used set backspace=indent,eol,start " Enable mouse selection set mouse=niv " Word wrap but don't cut words set linebreak " Enable Hidden Buffers - means you can switch between buffers without saving set hidden " Use System Clipboard set clipboard=unnamedplus " Indentation set smartindent set autoindent " Don't pass messages to |ins-completion-menu|. set shortmess+=c " Turn line numbers on by default, and set relative set number set relativenumber " Always show gutter so Gitgutter doesn't jump set signcolumn=yes " Line number width set numberwidth=3 " Highlight search terms set hlsearch " Highlight terms as search is typed set incsearch set nobackup set nowritebackup " Swap / Persistent directories set swapfile set backupdir=.backup/,~/.vim/.backup,/tmp/ set directory=.swp/,~/.vim/.vim/.swapfiles/,/tmp/ set undodir=.undo/,~/.vim/.undo/,/tmp/ set undofile " Set universal ignore set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.idea/*,*/.DS_Store,*/vendor/**/*,*/.cache,*/node_modules/**/*,*/docker/**/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Plugins """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" lua << EOF ------------------------------------------------------------------------------- -- Tree Sitter ------------------------------------------------------------------------------- require'nvim-treesitter.configs'.setup({ ensure_installed = "maintained", ignore_install = {}, highlight = { enable = true, disable = { "c", "rust" }, additional_vim_regex_highlighting = true, } }) require("bufferline").setup{} EOF lua << EOF ------------------------------------------------------------------------------- -- LSP Install ------------------------------------------------------------------------------- require'lspinstall'.setup() -- important local function setup_servers() require'lspinstall'.setup() local servers = require'lspinstall'.installed_servers() for _, server in pairs(servers) do require'lspconfig'[server].setup{} end end setup_servers() -- Automatically reload after `:LspInstall