abzcoding / lvim

🧑‍🚀 Bloated LunarVim 🚀
MIT License
471 stars 65 forks source link

Invalid Config #14

Closed Uzaaft closed 2 years ago

Uzaaft commented 2 years ago

Experiencing the following error message with NVIM v0.6.0-dev+627-gb5b025f6a and LuaJIT 2.1.0-beta3. This is an issue on my local machine with just your code, not my own repository. Attempted to grep and find the files that are mentioned, but no results. Any idea what might cause this error?

‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
12:02:48 [WARN ] lvim: 'Invalid configuration: vim/shared.lua:247: invalid "behavior": table: 0x7fdb01d3d758' file="init.lua", line=
80
Highlight group 'Normal' has no background highlight.

Please provide an RGB hex value or highlight group with a background value for 'background_colour' option

Defaulting to #000000
Press ENTER or type command to continue
abzcoding commented 2 years ago

hmm 🤔 can you try removing your ~/.config/lvim/plugin folder and do a :PackerCompile

also check ~/.cache/nvim/lvim.log for possible errors

Uzaaft commented 2 years ago

The only warnings that are in lvim.log are of this particular isue. Removing ~/.config/lvim/plugin and doing a :PackerCompile did not fix the issue.

abzcoding commented 2 years ago

can you try lvim.builtin.notify = false and doing a :PackerSync and :LvimCacheReset to make sure there are no caches

Uzaaft commented 2 years ago

Ah man. I guess I should just try and go backwards trough your commits and see. What version of nvim do you use? Settting lvim.builtin.notify = false did not fix the issue.

abzcoding commented 2 years ago

😢

Screen Shot 2021-11-25 at 3 05 42 PM
abzcoding commented 2 years ago

just updated to this version, this works fine as well

Screen Shot 2021-11-25 at 3 06 45 PM
Uzaaft commented 2 years ago

Dang it. xD Guess I need to bisect stuff. Btw, how is the tmux config repo going? 😛

abzcoding commented 2 years ago

i think i found your issue

Screen Shot 2021-11-25 at 3 08 50 PM

you've removed this in your config

Screen Shot 2021-11-25 at 3 10 03 PM

i get this error when i use your repo

Uzaaft commented 2 years ago

I am using your repository, not mine.

abzcoding commented 2 years ago

I am using your repository, not mine.

well in that case, i have no idea

abzcoding commented 2 years ago

i'll try to install my config in a new machine later tonight, hopefully i can pinpoint the issue 🤞

Uzaaft commented 2 years ago

No worries. I found the commit that made things go wrong locally. 536e651d0d72fddd38650b33733c01cc5d3a83d7 is the hash Swifting trough the changes.

abzcoding commented 2 years ago

this causes the issue

    vim.tbl_deep_extend(lvim.autocommands.custom_groups, poor_mans_autocmds)

gonna fix it asap

abzcoding commented 2 years ago

fixed via 72b2310033adaf14bd7cc5213ec61987cf34e10f

Uzaaft commented 2 years ago

Wow. MVP. You should fix a donation button for your github...Just saying 😛

abzcoding commented 2 years ago

much appreciated sir <3

Uzaaft commented 2 years ago

@abzcoding I didn't know how to reach you outside GitHub, so here I am. Any news on the tmux config? 😝

abzcoding commented 2 years ago

not yet, I just bought a new house (in a new city) and I'm in the process of relocating there 😅 so I don't think I'll be available online other than some fixes to lunarvim till I'm settled in the new home ( in Rasht)

Screen Shot 2022-02-10 at 12 04 20 PM
Uzaaft commented 2 years ago

Ah, congratulations on the house! And sorry about asking you about the tmux config so much.

abzcoding commented 2 years ago

@Uzaaft thank you, and no worries, sorry for the late response and the clutter of my config 😅 please not use as-is, pick and choose

# Ring the bell if any background window rang a bell
set -g bell-action any

# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal "screen-256color"
set -sa terminal-overrides ',xterm-256color:RGB'
# set -g default-terminal screen-256color
# set -ga terminal-overrides ",alacritty:Tc"
# set -g default-terminal xterm-256color
# set -g default-terminal "alacritty"
# set -ga terminal-overrides ",xterm-256color:Tc"
# set -g default-terminal "screen.xterm-256color"
set -g status-position bottom
# Keep your finger on ctrl, or don't
bind-key ^D detach-client

# Create splits and vertical splits
bind-key v split-window -h -p 50 -c "#{pane_current_path}"
bind-key ^V split-window -h -p 50 -c "#{pane_current_path}"
bind-key s split-window -p 50 -c "#{pane_current_path}"
bind-key ^S split-window -p 50 -c "#{pane_current_path}"

# Use vi keybindings for tmux commandline input.
# Note that to get command mode you need to hit ESC twice...
set -g status-keys vi

# Smart pane switching with awareness of vim splits.
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?l?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"

# Mouse Support
set-option -g mouse on
set -g mouse on
#set-option -g base-index 1
#set-window-option -g pane-base-index 1
set-window-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi    C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-vi    C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane   send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down

# To copy, left click and drag to highlight text in yellow, 
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# bind -n C-k send-keys -R \; clear-history

# easily toggle synchronization (mnemonic: e is for echo)
# sends input to all panes in a given window.
bind e setw synchronize-panes on
bind E setw synchronize-panes off

# set first window to index 1 (not 0) to map more to the keyboard layout...
# styling
set -g status-bg "#1a1b26"
set -g status-fg "#a9b1d6"
set -g status-right ""
set -g status-left ""
set -g status-justify centre
set -g window-status-current-format "#[fg=magenta]#[fg=black]#[bg=magenta]#I #[bg=brightblack]#[fg=white] #W#[fg=brightblack]#[bg=black]"
set -g window-status-format "#[fg=yellow]#[fg=black]#[bg=yellow]#I #[bg=brightblack]#[fg=white] #W#[fg=brightblack]#[bg=black]"

# Patch for OS X pbpaste and pbcopy under tmux.
set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"

# Screen like binding
unbind C-b
set -g prefix C-a
bind a send-prefix

# No escape time for vi mode
set -sg escape-time 0

# Screen like binding for last window
unbind l
bind C-a last-window

# Bigger history
set -g history-limit 10000

# New windows/pane in $PWD
bind c new-window -c "#{pane_current_path}"

# Fix key bindings broken in tmux 2.1
set -g assume-paste-time 0

# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"

# Local config
if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user'
#set -g @resurrect-capture-pane-contents 'on'
#set -g @continuum-boot 'on'
#set -g @continuum-boot-options 'fullscreen'
#set -g @continuum-restore 'on'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-continuum'
# run-shell ~/.resurrect/resurrect.tmux
#run-shell ~/.continuum/continuum.tmux
#set -g default-command "reattach-to-user-namespace -l $SHELL"
#set-option -sa terminal-overrides ',xterm-256color:RGB' 

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
Uzaaft commented 2 years ago

Damn. You're the best!

Uzaaft commented 2 years ago

Still waiting on the donation button on your GitHub profile! @abzcoding

abzcoding commented 2 years ago

Thank you for your kind words, but my country is under sanctions, so I can't have any donation button 😅

Uzaaft commented 2 years ago

Ah, shame that such things gets in the way. Btw, have you looked into zellij? I've been considering going away from tmux as the colors are not the same in lunarvim with and without tmux.

abzcoding commented 2 years ago

Ah, shame that such things gets in the way. Btw, have you looked into zellij? I've been considering going away from tmux as the colors are not the same in lunarvim with and without tmux.

no i've not seen zellij yet, but regarding the colors play with these, they might help

set -g default-terminal "screen-256color"
set -sa terminal-overrides ',xterm-256color:RGB'
# set -g default-terminal screen-256color
# set -ga terminal-overrides ",alacritty:Tc"
# set -g default-terminal xterm-256color
# set -g default-terminal "alacritty"
# set -ga terminal-overrides ",xterm-256color:Tc"
# set -g default-terminal "screen.xterm-256color"
abzcoding commented 2 years ago

@Uzaaft just wanted to say if you want undercurl support please replace the entire

set -g default-terminal "screen-256color"
set -sa terminal-overrides ',xterm-256color:RGB'
# set -g default-terminal screen-256color
# set -ga terminal-overrides ",alacritty:Tc"
# set -g default-terminal xterm-256color
# set -g default-terminal "alacritty"
# set -ga terminal-overrides ",xterm-256color:Tc"
# set -g default-terminal "screen.xterm-256color"

with

# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"

here is what it looks like (tmux inside wezterm)

Screen Shot 2022-03-23 at 12 48 32 AM