Closed LichKing-W closed 3 months ago
Hi, @LichKing-W
Can you try the development version of Neovim:
The Neovim Releases page has pre-built archives for Linux/Windows/macOS
Check :version to confirm that you are using the latest version.
我是安装好了,但输入后啥提示都没有。 会是和nvim-cmp有冲突吗?
我是安装好了,但输入后啥提示都没有。 会是和nvim-cmp有冲突吗?
@kdurant 登录了吗
可以查看一下日志
%LOCALAPPDATA%\nvim-data\fittencode\fittencode.log
~/.local/state/nvim/fittencode/fittencode.log
@luozhiya 登陆成功了
但是log里提示
[ERROR] [2024-03-08 11:03:23.292] [fittencode.nvim] API key file not found; path:/home/wj/.local/share/nvim/fittencode/api_key.json"
我把log文件删除后,没有生成新的log了
@kdurant
有要写的内容才会生成log文件,因为默认的log filter是WARN,没有这个文件的话,很可能是运行正常了。
查看这个路径的文件有吗? /home/wj/.local/share/nvim/fittencode/api_key.json
还有您更新一下插件,然后按这里 说明配置一下 updatetime
@luozhiya /home/wj/.local/share/nvim/fittencode/api_key.json
, 没有这个文件
配置一下 updatetime
没作用
@kdurant
没有这个文件的情况下,应该会弹 Last session not found or invalid, please login again
信息
您重新登陆一下试试看
@luozhiya 我logout后,重新login,提示我成功了,但还是没有api_key.json
@kdurant
您修改一下log level,然后看看日志输出内容
local fitten = require('fittencode')
fitten.setup({
log = {
level = vim.log.levels.TRACE,
},
})
@luozhiya 这样设置后,api_key.json
是有了
Verbose logging started: 2024-03-11 10:36:24
Log level: TRACE
Calling process: /usr/bin/nvim
Neovim version: {
buildtype = "RelWithDebInfo",
luajit = "2.1.0-beta3",
nvim = "v0.10.0-dev"
}
Process ID: 1564219
Parent process ID: 1564217
OS: {
machine = "x86_64",
release = "6.5.0-21-generic",
sysname = "Linux",
version = "#21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2"
}
================================================================================
[ INFO] [2024-03-11 10:36:24.597] [fittencode.nvim] Loading last session
[DEBUG] [2024-03-11 10:36:24.597] [fittencode.nvim] Prepare reading API key file; path: "/home/wj/.local/share/nvim/fittencode/api_key.json"
[DEBUG] [2024-03-11 10:36:24.600] [fittencode.nvim] API key file loaded successful; path: "/home/wj/.local/share/nvim/fittencode/api_key.json"
但还是没有提示
@kdurant
在一个空的buffer中输入 // KMP
,保持在 Insert 模式,稍等一下,看会不会出提示,再查看一下log日志
不出问题的话,会有如下的提示
@luozhiya 谢谢,可以用了。
多问下,安装ultisnips插件后,<Tab>
功能就不能用了
@kdurant
您客气了
会是和nvim-cmp有冲突吗? 安装ultisnips插件后,
功能就不能用了
和 nvim-cmp
不会冲突,现在的策略是优先 nvim-cmp
,如果 nvim-cmp
有当前上下文的补全,那么 fittencode 就不会再处理了(在某些情况下,两者都会出现:比如 nvim-cmp
产生补全耗时比较多时)
现在的版本,当snip处于expand状态时,fittencode 会拿不到事件响应,所以会用不了
@LichKing-W
新版已经降低了对neovim版本的要求,对于<= 0.10.0的只是没有inline virtual text,其他都一样,您可以更新一下
After I install, when I open neovim, an error says:
packer.nvim: Error running config for fittencode.nvim: ...ck/packer/start/fittencode.nvim/lua/fittencode/tasks.lua:17: attempt to index upvalue 'uv' (a nil value)
Not sure how to fix this.