
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
coc-tsdetect
Advanced tools
vim-tsdetect/coc-tsdetect provides vim/neovim and coc.nvim extension to initialize workspace automatically for coc-tsserver and coc-deno.
Run :CocInstall coc-tsdetect in vim/neovim or install vim-tsdetect with your favorite plugin manager and build with pnpm install && pnpm run build. It is enough to install one of them.
Checking following in order.
deno:/ -> deno.js, .ts, .tsx -> check following in ordernode -> nodedeno -> denonode_modules/ directory is found in ancestors of (following) -> nodenode -> nodedeno -> denoThis tries to detect when following events occurred.
FileType javascript,javascriptreact,typescript,typescript.tsx,typescriptreactBufEnter,BufNewFile,BufWritePost *Please configure following if necessary by :CocConfig.
tsdetect.modeSet this "manual" to disable auto initialization. Variable b:tsdetect_is_node remains available.
Values: "auto" | "manual"
Default:
{
"tsdetect.mode": "auto"
}
tsdetect.doNotCreateOnNodeBy default, in Node.js environment, tsdetect does not create a workspace configuration (.vim/coc-settings.json). Set this false to create configuration file whether the configuration exists.
Values: boolean
Default:
{
"tsdetect.doNotCreateOnNode": true
}
tsdetect.nodeOverrideWorkspace configuration to be set in Node.js environment. If you want to extend original configuration, you need to include default ones. Not recommended to touch deno.enable and tsserver.enable.
Values: object
Default:
{
"tsdetect.nodeOverride": {
"deno.lint": false,
"coc.source.file.trimSameExts": [
".js",
".ts"
],
"prettier.disableLanguages": []
}
}
tsdetect.denoOverrideWorkspace configuration to be set in Deno environment. If you want to extend original configuration, you need to include default ones. Not recommended not to touch deno.enable and tsserver.enable.
Values: object
Default:
{
"tsdetect.denoOverride": {
"deno.lint": true,
"coc.source.file.trimSameExts": [],
"prettier.disableLanguages": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}
}
tsdetect#detectFired when the tsdetect detects TypeScript environment in the flow shown in above.
tsdetect#detect#nodeFired when tsdetect#detect is fired and environment was detected as node.
tsdetect#detect#denoFired when tsdetect#detect is fired and environment was detected as deno.
tsdetect#coc#auto#switch#node#afterFired after the automatic switch to node triggered and finished.
tsdetect#coc#auto#switch#deno#afterFired after the automatic switch to deno triggered and finished.
b:tsdetect_is_nodeSet when tsdetect#detect is fired.
deno.enable and tsserver.enable settings in user configuration (~/.vim/coc-settings.json that can be opened by :CocConfig)..vim/ directory being committed by VCS, you can globally ignore .vim/, or ignore one by one using git update-index --skip-worktree .vim for git projects.Example for deno.cache on save if deno environment is detected:
function! s:my_coc_tsdetect_buf_write_post() abort
if !get(g:, 'coc_enabled', 0)
return
endif
if exists('b:tsdetect_is_node') && !b:tsdetect_is_node
CocCommand deno.cache
endif
endfunction
augroup my-coc-tsdetect
autocmd!
autocmd BufWritePost * call <SID>my_coc_tsdetect_buf_write_post()
augroup END
FAQs
coc.nvim extensions for detecting node and deno environment.
We found that coc-tsdetect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.