- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 NeoVim 和 CoC 来进行支持yarn-3 pnp 的项目的 TS 开发。在某些时候,编辑器不再看到导入并开始提示导入的模块不存在。 (参见屏幕截图)。我已经为vim配置了SDK并安装了ts sdks,更新了yarn并重新启动了编辑器。以下是一些细节:操作系统:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
Neovim:
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a4d0c1c5c98fd2cdc9e4d0d6c5c7cfc1d68ac0c1c6cdc5ca8acbd6c3" rel="noreferrer noopener nofollow">[email protected]</a>
package.json:
{
"private": true,
...
"devDependencies": {
"typescript": "4.5.5",
},
"packageManager": "<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90e9f1e2fed0a3bea5bea0" rel="noreferrer noopener nofollow">[email protected]</a>"
}
.yarnrc.yml
checksumBehavior: update
nodeLinker: pnp
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
yarnPath: .yarn/releases/yarn-3.5.0.cjs
tsconfig.json:
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"skipLibCheck": true,
"module": "es6",
"target": "es6",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"paths": {
"@company/xxx-rqb": ["./packages/xxx-rqb/src"]
}
},
"exclude": ["**/*.test.ts", "**/*.spec.ts"]
}
.vim/coc-settings.json:
{
"eslint.packageManager": "yarn",
"eslint.nodePath": ".yarn/sdks",
"workspace.workspaceFolderCheckCwd": false,
"tsserver.tsdk": ".yarn/sdks/typescript/lib"
}
Coc信息:
## versions
vim version: NVIM v0.7.2
node version: v16.15.1
coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800
coc.nvim directory: /home/user/.nvim/plugin/coc.nvim
term: tmux
platform: linux
## Log of coc.nvim
2023-04-11T18:17:33.885 INFO (pid:911582) [configurations] - Add folder configuration from cwd: /home/user/dev/reactfrontend/.vim/coc-settings.json
2023-04-11T18:17:34.057 INFO (pid:911582) [plugin] - coc.nvim initialized with node: v16.15.1 after 224
...
coc-tsserver veriosn 2.1.3 (latest)
All plugins are updated.
Yarn SDKs installed for typescript, prettier, eslint. Integrations: vim.
我已经尝试过升级yarn、升级sdks、升级neovim、重新安装依赖项。使用一个简单的文件尝试了yarn tsc,没有错误并生成了一些js。
最佳答案
最终发现我必须使用以下命令更改 coc ts 版本:
:CocCommand tsserver.chooseVersion
并选择本地版本
而不是与coc-tsserver捆绑
关于typescript - 无法使用 coc-tsserver 找到模块 (ts2307),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75986441/
我尝试构建, yarn 构建 但它告诉我 yarn run v1.22.17 error Couldn't find a package.json file in "/home/darth/.conf
我正在使用带有 coc-prettier 插件扩展的 neovim。格式按预期工作,但我似乎无法让它从配置文件中获取设置。我想知道我是否还缺少另一个步骤。我查看了扩展库中的自述文件,它不再提及设置,并
我是 Vim 的新手,正在使用 coc-prettier格式化我的文件。我可以使用命令 :Prettier格式化我的文件,但希望为所有文件类型自动执行此操作。我找到了这个,但我需要指定文件类型: "c
有没有办法让 coc-vim 自动选择第一个预览建议而不是使用箭头键?我正在使用 vim 8.1。 最佳答案 将 "suggest.noselect": false 添加到您的 coc-setting
我安装了 coc 的最新分支,但在使用时遇到了问题。 出于某种原因,每当我进入插入模式时,此错误一直闪烁: [coc.nvim] error: at NeovimClient.emitNoti
我是 Neovim 用户 我使用插件 neoclide/coc.vim用于自动完成 但是当我的光标聚焦时,我无法再次获得建议框 (这个框怎么称呼?建议框还是提示框?我想知道这个框的名字) 我想触发它
我试图更改我的 coc.nvim 自动完成键,并发现 this Stack Overflow 中的问题,但是回答这个问题的人并没有很好地解释如何根据需要自定义它,所以我将解释它以帮助像我一样为此绞尽脑
installation instructions不要提及对 Python 或特定 Python 插件的需求。虽然当我将 coc.nvim 添加到我的 vim 插件( Plug 'neoclide/c
我已安装 coc.nvim和分机 coc-python (:CocInstall coc-python) 当我打开文件时,我拒绝 linting,然后出现错误: [coc.nvim] Jedi err
我正在尝试使用 Coc 设置 Neovim 来编写 Markdown。我有 Coc 使用 javascript 和其他文件类型。 我想要做的是仅对 Markdown 文件禁用自动完成建议。我发现如果我
我在我的 vim 编辑器中使用 C++ 的 coc.nvim 插件,这里显示错误,但它的颜色伤害了我的眼睛,我一直在寻找解决方案,但仍然不知道如何自定义颜色 cocnvim floating wind
我正在使用 NeoVim 和 CoC 来进行支持yarn-3 pnp 的项目的 TS 开发。在某些时候,编辑器不再看到导入并开始提示导入的模块不存在。 (参见屏幕截图)。我已经为vim配置了SDK并安
我正在使用 neovim 插件 "coc-nvim" ,作为 C/C++ 的 IntelliSense 工具。据我所知,这个插件实际上是 ccls、clangd 和 cquery 等语言服务器的客户端
例如,在 Agda 中表示 STLC 可以这样做: data Type : Set where * : Type _⇒_ : (S T : Type) → Type data Context :
过去使用过其他 MVC 框架(例如 Zend Framework),我习惯了默认情况下按如下方式映射请求的想法。 http://mysite.com/user/add调用 User Controlle
我最近从 ALE 转移到 coc.nvim,因为 ALE 的智能感知并不是那么好。 但我发现错误或警告弹出窗口存在一个问题。光标需要正好位于带下划线的错误上。 有没有一种方法可以让 coc 显示弹出窗
使用 vim 8、Ultisnips 和 coc-ultisnips。 考虑这个片段: snippet cdeg "Add console.debug({})" console.debug(${0:$
我想更改 rust-analyzer 中类型提示的颜色。目前看起来是这样的,很难区分类型我需要编辑 coc-vim 的哪一部分来更改类型提示的颜色? 最佳答案 在我的 nvim 设置中,我必须自定义
我想更改 rust-analyzer 中类型提示的颜色。目前看起来是这样的,很难区分类型我需要编辑 coc-vim 的哪一部分来更改类型提示的颜色? 最佳答案 在我的 nvim 设置中,我必须自定义
我在 Vim 中输入:CocInstall coc-clangd 提示没有安装clangd sudo apt-get install clangd-10,我也安装了 clangd-9 仍然出现同样的错
我是一名优秀的程序员,十分优秀!