Reputation: 19
The weird thing only happens when I open a C/C++ file. What I doing wrong here?
nvim v0.10.0-dev
tmux 3.2a
alacritty 0.13.0-dev
Ubuntu 22.04
use 'morhetz/gruvbox'
use 'nvim-treesitter/nvim-treesitter'
" Colorscheme
set termguicolors
let g:gruvbox_contrast_dark='dark'
let g:gruvbox_contrast_light='hard'
colorscheme gruvbox
hi LspCxxHlGroupMemberVariable guifg=#83a598
insdie tmux:
$ echo $TERM
screen-256color
and in alacritty:
$ echo $TERM
alacritty
in my .tmux.conf I tried
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",screen-256color:RGB"
set -sa terminal-overrides ",screen-256color:RGB"
and
set -g default-terminal "screen-256color"
set-option -sa terminal-features ',screen-256color:RGB'
These doesn't work.
If I tried this in .tmux.conf file. Some of the colors would change, but there would still be a momentary flickering.
set -g default-terminal "screen-256color"
set-option -sa terminal-features ',alacritty:RGB'
and
$ tmux source-file ~/.tmux.conf
Upvotes: 0
Views: 465
Reputation: 19
Well, I found the solution.
The reason is that there is a legacy parser from before. I didn't not clean the settings properly.
Before reinstalling Neovim, I used the :checkhealth command to check out the status.
The Nvim runtime ABI version is 14, but Parser C is 13.
vim.treesitter: require("vim.treesitter.health").check()
========================================================================
- Nvim runtime ABI version: 14
- OK Parser: bash ABI: 14, path: /home/david/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/bash.so
- OK Parser: c ABI: 13, path: /home/david/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/c.so
- OK Parser: cpp ABI: 14, path: /home/david/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/cpp.so
- OK Parser: python ABI: 14, path: /home/david/.local/share/nvim/site/pack/packer/start/nvim-treesitter/parser/python.so
- OK Parser: c ABI: 13, path: /usr/lib/x86_64-linux-gnu/nvim/parser/c.so
- OK Parser: lua ABI: 13, path: /usr/lib/x86_64-linux-gnu/nvim/parser/lua.so
- OK Parser: query ABI: 14, path: /usr/lib/x86_64-linux-gnu/nvim/parser/query.so
- OK Parser: vim ABI: 14, path: /usr/lib/x86_64-linux-gnu/nvim/parser/vim.so
- OK Parser: vimdoc ABI: 14, path: /usr/lib/x86_64-linux-gnu/nvim/parser/vimdoc.so
So, I reinstall neovim, and clean all the settings in ~/.local/share/nvim. and checkout status again. And it works!
vim.treesitter: require("vim.treesitter.health").check()
========================================================================
- INFO: Runtime ABI version : 14
- OK: Loaded parser for bash: ABI version 14
- OK: Loaded parser for c: ABI version 14
- OK: Loaded parser for cpp: ABI version 14
- OK: Loaded parser for lua: ABI version 14
- OK: Loaded parser for python: ABI version 14
- OK: Loaded parser for query: ABI version 14
- OK: Loaded parser for vim: ABI version 14
- OK: Loaded parser for vimdoc: ABI version 14
- OK: Loaded parser for c: ABI version 14
- OK: Loaded parser for help: ABI version 14
- OK: Loaded parser for lua: ABI version 14
- OK: Loaded parser for vim: ABI version 14
Upvotes: 1