if has('vim_starting')
set encoding=utf-8
endif
scriptencoding utf-8
if &compatible
set nocompatible
endif
let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end
execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'neovim/nvim-lspconfig'
call plug#end()
PlugInstall | quit
" Setup global configuration. More on configuration below.
lua << EOF
local cmp = require "cmp"
cmp.setup {
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<CR>'] = cmp.mapping.confirm({ select = true })
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "buffer" },
}),
}
EOF
lua << EOF
local capabilities = require('cmp_nvim_lsp').default_capabilities()
require'lspconfig'.cssls.setup {
capabilities = capabilities,
}
EOF
Description
When opening multiple buffers the "node" process associated with the pyright lang server seems to not get killed upon quitting nvim (see reproduction).
It could be that this is related to pyright itself. I'm opening this mostly to get some advice on how to debug this further? I'm using a MacBook M2 pro, reproduced both on iterm2 and terminal.app.
Steps to reproduce
Open any Python file
This starts "node" process, as expected (:LspInfo gives "1 client attached")
I quit nvim - "node" process dies, as expected - this works as expected
I open a file again
:vsp
:e some/other/file.py
(maybe open a few more buffers)
:qa!
Process "node" sticks around, hogging a lot of memory (>1GB)
I open a Python file again - starts new process with name "node", therefore now 2 "node" processes each using a lot of memory. Previous one never dies. Parent process is 1, meaning it is forked from the init process.
Expected behavior
I expect all node processes to properly shut down after closing nvim.
Actual behavior
More and more "node" processes are started over time, clogging up my system resources.
FAQ
Announcement
Minimal reproducible full config
Description
When opening multiple buffers the "node" process associated with the pyright lang server seems to not get killed upon quitting nvim (see reproduction).
It could be that this is related to pyright itself. I'm opening this mostly to get some advice on how to debug this further? I'm using a MacBook M2 pro, reproduced both on iterm2 and terminal.app.
Steps to reproduce
Expected behavior
I expect all node processes to properly shut down after closing nvim.
Actual behavior
More and more "node" processes are started over time, clogging up my system resources.
Additional context
NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
pyright 1.1.326