Just use this; it's literally claude code in a terminal tab in vim; also aware of what files are open in vim.
https://github.com/coder/claudecode.nvim