彭于斌
彭于斌
我知道原因了:`vim.fn.isdirectory`返回的是0或1。 而lua中0也会被视为true,导致无论是否存在该目录,都会进入`return repo`分支。 > To fix this bug,please add "not" after "if", then swap the statements that return the value. 你的修复是错误的,那只会变成无论如何都进入`return path`分支。 正确的做法应该是: ```lua if vim.fn.isdirectory(path) == 1 then ```...
最小复现(3种均可复现): ```cpp #include int main() { std::string c({{}}); // cursor here: } ``` ```cpp #include int main() { std::string c{{{}}}; // cursor here: } ``` ```cpp #include int main() {...
https://www.bilibili.com/video/BV1gu411m7kN?t=1419.5
```cpp for (int idz = 0; idz < sizeb; idz++) { result[idx * size2 + idy] += padZeroData[idy + idz] * b[idz]; } ``` 5079us ```cpp float tmp = 0;...
可以看一下 `nvim --version` 的输出吗?我的是 ``` ❯ nvim --version NVIM v0.11.2 Build type: RelWithDebInfo LuaJIT 2.1.1748459687 Run "nvim -V1 -v" for more info ```
```vim :1ToggleTerm :2ToggleTerm :3ToggleTerm ``` 可以打开或切换到不同编号的终端。或者使用快捷键:`1`,`2`... ```vim :TermSelect ``` 可以选择一个已经打开的终端跳转过去。
无论什么构建系统,只要能生成build/compile_commands.json,就能智能补全。 cmake是通过`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`就能生成这个文件。 我没用过meson,请自行查阅meson文档或询问gpt。 如果他们没有支持,那就不能支持meson智能补全,或者你只能手动书写compile_commands.json。 相关issue:https://github.com/mesonbuild/meson/issues/3545