You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using with neovim official lsp client, and the client seems caused neovim CPU high.
The plugin report:
Error executing vim.schedule lua callback: ...al/share/nvim/plugged/gitsigns.nvim/lua/gitsigns/git.lua:222: attempt to concatenate upvalue 'line' (a nil value)
Press ENTER or typecommand to continue
To Reproduce
init.vim:
" Specify a directory for plugins" - For Neovim: ~/.local/share/nvim/plugged" - Avoid using standard Vim directory names like 'plugin'callplug#begin('~/.local/share/nvim/plugged')
Plug 'neovim/nvim-lspconfig'autocmdFiletypegosetlocalomnifunc=v:lua.vim.lsp.omnifunc" https://github.com/nvim-lua/completion-nvim/wiki/chain-complete-support
Plug 'nvim-lua/completion-nvim'" Configure the completion chainsletg:completion_chain_complete_list= {
\ 'default': [
\ {'complete_items': ['lsp']},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'}
\]\}letg:completion_enable_auto_popup=1letg:completion_enable_auto_hover=1letg:completion_enable_auto_signature=1letg:completion_matching_smart_case=1letg:completion_trigger_keyword_length=1" default = 1letg:completion_timer_cycle=80"default value is 80" auto change sources whenever this completion source has no complete itemletg:completion_auto_change_source=1letg:completion_enable_auto_paren=1" Set completeopt to have a better completion experiencesetcompleteopt=menuone,noinsert,noselect
" Avoid showing message extra message when using completionsetshortmess+=cn" The delay is governed by vim's updatetime option," default updatetime 4000ms is not good for async updatesetupdatetime=100" set signcolumn to 2 to avoid git gutter sign conflict with linter signsetsigncolumn=yes:2" signify show git diff sigs" Plug 'mhinz/vim-signify'" https://github.com/lewis6991/gitsigns.nvim
Plug 'nvim-lua/plenary.nvim'
Plug 'lewis6991/gitsigns.nvim'lua << EOF
require('gitsigns').setup {
signs = {
add= {hl='DiffAdd' , text ='│', numhl='GitSignsAddNr'},
change= {hl='DiffChange', text ='│', numhl='GitSignsChangeNr'},
delete= {hl='DiffDelete', text ='_', numhl='GitSignsDeleteNr'},
topdelete = {hl='DiffDelete', text ='‾', numhl='GitSignsDeleteNr'},
changedelete = {hl='DiffChange', text ='~', numhl='GitSignsChangeNr'},
},
numhl = false,
sign_priority =6,
status_formatter = nil, -- Use default
}
local lsp= require'lspconfig'
local cmp= require'completion'--@param client: (required, vim.lsp.client)
local mix_attach =function(client)
-- lsp_status.on_attach(client)
cmp.on_attach(client)
end--lsp.gopls.setup{}
-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/gopls.lua-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md#neovim
-- https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#gopls
lsp.gopls.setup({
on_attach = mix_attach,
settings = {
gopls = {
usePlaceholders = true,
completeUnimported = true,
},
},
capabilities = lsp_status.capabilities,
})
EOF
Steps to reproduce the behavior:
open a go file under a regular go project, the file must be big, about 3000 lines code
insert some go comment (and then neovim lsp client will continue to send the whole file to lsp server)
neovim cpu will 100%
See error
Error executing vim.schedule lua callback: ...al/share/nvim/plugged/gitsigns.nvim/lua/gitsigns/git.lua:222: attempt to concatenate upvalue 'line' (a nil value)
Press ENTER or typecommand to continue
Observed output
Error messages, logs, etc
Screenshots
Additional context
System: Linux Ubuntu 20.10 x86_64
Neovim version:
NVIM v0.5.0-dev+1115-gc1fbc2ddf
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/ttys3/.config/nvim/neovim/build/config -I/home/ttys3/.config/nvim/neovim/src -I/home/ttys3/.config/nvim/neovim/.deps/usr/include -I/usr/include -I/home/ttys3/.config/nvim/neovim/build/src/nvim/auto -I/home/ttys3/.config/nvim/neovim/build/include
Compiled by ttys3@ttys3-ht
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for$VIM: "/usr/local/share/nvim"
Run :checkhealth for more info
Describe the bug
When using with neovim official lsp client, and the client seems caused neovim CPU high.
The plugin report:
To Reproduce
init.vim:
Steps to reproduce the behavior:
Observed output
Error messages, logs, etc
Screenshots
Additional context
System: Linux Ubuntu 20.10 x86_64
Neovim version:
also reported to nvim lsp neovim/neovim#14037
The text was updated successfully, but these errors were encountered: