-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: do not get completions anymore for issues and mentions #53
Comments
Is the repo hosted on gitlab or github? |
github |
Same problem here, adding minimal config to reproduce: local on_windows = vim.loop.os_uname().version:match "Windows"
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
vim.cmd [[set runtimepath=$VIMRUNTIME]]
local temp_dir = vim.loop.os_getenv "TEMP" or "/tmp"
vim.cmd("set packpath=" .. join_paths(temp_dir, "nvim", "site"))
local package_root = join_paths(temp_dir, "nvim", "site", "pack")
local install_path = join_paths(package_root, "packer", "start", "packer.nvim")
local compile_path = join_paths(install_path, "plugin", "packer_compiled.lua")
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"hrsh7th/nvim-cmp",
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" },
},
config = {
package_root = package_root,
compile_path = compile_path,
},
}
end
_G.load_config = function()
local cmp = require "cmp"
cmp.setup {
snippet = {
expand = function(args) require("luasnip").lsp_expand(args.body) end,
},
mapping = cmp.mapping.preset.insert {
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm { select = true },
},
}
require("cmp_git").setup()
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources {
{ name = "git" }, -- You can specify the `cmp_git` source if you were installed it.
},
})
end
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path }
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once lua load_config()]]
else
load_plugins()
require("packer").sync()
_G.load_config()
end |
Hi ! That's an amazing plugin! Thanks for your work. But I have the same issue, only commits works, PR, issues, and mentions do nothing. I used gh CLI and though I wrongly configured it so I tried token in env var but it did not work too. |
I have the same problem but only for the For me at least, this is purely an issue with the |
I also have problem with |
I am having the same problem and I don't believe the |
Do you by any chance have |
I don't believe I do, however after looking at the
After I did that it started working. |
Strange I didn't need to add these keymaps to my configuration. It just worked out of the box. Anyway, glad you solved this. |
Oh you said in your first post that you only do |
Oh 🤦♂️ Yeah this is what happens when you I don't pay attention and also am a noob at this |
Has anyone figured this out? I am having the same issues. |
- Seems to be caused by the Octo filetype - See petertriho#53
Finally figured out the source of the problem. This commit 7b292e1 was pushed to account for GH Enterprise but Octo default settings leaves this blank. This fix accounts for that as well. ref: petertriho#53
cc @chrisgrieser @vitorf7 @petertriho @dpetka2001 @cseickel @Curs3W4ll @rafamadriz This should fix it. Can use my fork (https://github.com/GitMurf/cmp-git) until the PR gets merged: #61 |
- Seems to be caused by the Octo filetype - See #53
Not sure if this will fix all the issues so I'll keep this open. |
Another thing to note is that even with this fix above, I had an issue on another machine when I changed the default shell to powershell (instead of CMD). When i flipped it back to using cmd.exe as my default nvim terminal shell then it worked. In case any Windows users are still having problems. |
Issues and mentions completion haven't work in a while petertriho/cmp-git#53
do any of you happen to have |
I haven't used the plugin in a while, but it seems that for some reason it stopped working for me, I don't get any completions anymore. Completions for commits (
:
) work, but not for mentions or issues (#
and@
).Given that at least on the surface level it looks like my previous problem ( #47 ), I already checked and confirmed the following:
pwd
is set correctly:CmpStatus
correctly listsgit
as a ready sourcegitcommit
:lua print(require("cmp_git.utils").is_git_repo())
reportstrue
The text was updated successfully, but these errors were encountered: