akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.37k stars 60 forks source link

Scrolling causes selection in vim-startify #110

Open p00f opened 4 years ago

p00f commented 4 years ago

Scrolling using mousewheel causes selection in vim-startify

init.vim:

if empty(glob('~/.config/nvim/autoload/plug.vim'))
    silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
let g:ale_completion_enabled = 1
call plug#begin('~/.config/nvim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'dense-analysis/ale'
Plug 'scrooloose/nerdTree'
Plug 'ryanoasis/vim-devicons'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'mhinz/vim-startify'
Plug 'justinmk/vim-gtfo'
Plug 'akiyosi/gonvim-fuzzy'
Plug 'psliwka/vim-smoothie'
call plug#end()

set mouse=a

set number
set guifont=Iosevka\ SS05:h12
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
highlight Comment cterm=italic gui=italic

set runtimepath^=~/.config/nvim runtimepath+=~/.config/nvim/after
let &packpath = &runtimepath
set clipboard+=unnamedplus
let g:airline_theme='murmur'

let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#statusline#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#wordcount#filetypes = '\vasciidoc|help|mail|markdown|markdown.pandoc|org|rst|tex|text'

nmap <C-n> :NERDTreeToggle<CR>
source /home/chinmay/.config/nvim/devicons.vim

let g:ale_fixers = {
\   '*': ['remove_trailing_lines', 'trim_whitespace'],
\   'bash': ['language_server'],
\   'java': ['eclipselsp'],
\}

let g:ale_sign_error = '×'
let g:ale_sign_warning = '!'
let g:ale_java_eclipselsp_config_path='$HOME/.jdtls'

setting.toml:

[Editor]
# Editor minimum window width (>= 400)
Width = 800
# Editor minimum window height (>= 300)
Height = 600

# Start maximized window
StartMaximizedWindow = false

# Start fullscreen
StartFullscreen = false

# Editor external font-family, font-size, and linespace.
# This is the font and linespace settings of the graphical UI as an nvim front end.
# For example, linespace affects the margins of the external completion popup menu UI.
# Font settings in nvim are set with well-known options, such as `:set guifont = hoge:h10`, `:set linespace=4`.
FontFamily = "Iosevka SS05"
FontSize = 12

Linespace = 0

# Neovim external UI features
# The following is the default value of goneovim.
# You can change the behavior of the GUI by changing the following boolean values.
# If you prefer the traditional Vim UI, set it to false for all.
# Also, `ExtMessages` is still experimental at this time and we don't recommend setting it to true if you want stability.
ExtCmdline = true
ExtPopupmenu = true
ExtTabline = true
ExtMessages = true

# Drawing window border instead of vertical split, statusline
# Draw borders on the GUI side instead of the vertical border and status line that nvim draws.
# This option assumes that you use an external status line.
#DrawBorder = true

# Copy yanked text to clipboard
Clipboard = true

# Disable IME in Normal mode
# This option disables the input method editor(IME) in normal mode.
# For example, it may be useful for East Asian users who use the input method editor.
DisableImeInNormal = false

# Transparent window alpha
# Note: This setting also implicitly enables the Drawborder setting
# This option makes the whole GUI window in semi-transparent.
#Transparent =1

# Draw indent guide
# Enable this option to draw a simple indent guide.
# Indentation width is calculated based on the value of `tabstop` set in nvim.
IndentGuide = true

# Desktop Notifications
# Enable desktop notification settings for nvim messages.
# This option works only if `ExtMessages` is enabled.
DesktopNotifications = false

# Pattern that fills the diff background
# Change the background pattern used for diff display.
# This option allows you to use a visual effect pattern such as Dense, Diagonal Stripe instead of a regular solid pattern.
# The available patterns are all Qt brush styles. For more information, See: https://doc.qt.io/qt-5/qbrush.html#details
# // -- diffpattern enum --
# // SolidPattern             1
# // Dense1Pattern            2
# // Dense2Pattern            3
# // Dense3Pattern            4
# // Dense4Pattern            5
# // Dense5Pattern            6
# // Dense6Pattern            7
# // Dense7Pattern            8
# // HorPattern               9
# // VerPattern               10
# // CrossPattern             11
# // BDiagPattern             12
# // FDiagPattern             13
# // DiagCrossPattern         14
# // LinearGradientPattern    15
# // RadialGradientPattern    16
# // ConicalGradientPattern   17
# // TexturePattern           24
Diffdeletepattern = 12
Diffchangepattern = 12
Diffaddpattern = 1

[Statusline]
Visible = false

# Options: “textLabel” / “icon” / “background” / “none”
ModeIndicatorType = "textLabel"

# Optional setting colors per Neovim editing modes
NormalModeColor = "#3cabeb"
CommandModeColor = "#5285b8"
InsertModeColor = "#2abcb4"
ReplaceModeColor = "#ff8c0a"
VisualModeColor = "#9932cc"
TerminalModeColor = "#778899"

# Statusline components
Left = [ "mode", "filepath", "filename" ]
Right = [ "message", "git", "filetype", "fileformat", "fileencoding", "curpos", "lint" ]

[Palette]
Transparent = 0.8

[Message]
Transparent = 0.8

[Popupmenu]
# show detail column
ShowDetail = true
# total number to display item
Total = 20
# width of `menu` column
MenuWidth = 400
# width of `info` column
InfoWidth = 1
# width of `detail` column
DetailWidth = 250

[Tabline]
Visible = true

[Lint]
Visible = true

[ScrollBar]
Visible = true

[MiniMap]
Visible = false

[SideBar]
Visible = false
DropShadow = false
Width = 200
AccentColor = "#5596ea"

[Workspace]
# This setting sets the format of the path string of CWD in the sidebar.
#  name: directoryname
#  full: /path/to/directoryname
#  minimum: /p/t/directoryname
PathStyle = "minimum"

# Restore session — information that was ended without being saved
RestoreSession = false

Screencast gif

Screencast from 04-04-20 10_58_09 PM UTC

p00f commented 4 years ago

Since the second file is selected, it looks like 1 is pressed

p00f commented 4 years ago

I thought it was like #109 but i tried pressing shift too

akiyosi commented 4 years ago

Hi Thanks for the report this issue.

Goneovim will scroll by inputing n<C-e> or n<C-y> where n is a number of scroll amount. This is actually equivalent to call function such that

call nvim_input("2<C-e>")

The problem you reported seems to be that vim-startify is responding to the scroll amount number specified in the function argument above.

I'm trying to figure out how to fix it. Umm...

p00f commented 4 years ago

This is actually equivalent to call function such that

call nvim_input("2<C-e>")

Thanks for this info. For the time being, I think I can patch the vim-startify plugin