
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
coc-snippets
Advanced tools
Snippets solution for coc.nvim
It's capable of:
In your vim/neovim, run command:
:CocInstall coc-snippets
" Use <C-l> to trigger snippet expand.
imap <C-l> <Plug>(coc-snippets-expand)
" Use <C-j> to select text for visual text of snippet.
vmap <C-j> <Plug>(coc-snippets-select)
" Use <C-j> to jump to forward placeholder, which is default
let g:coc_snippet_next = '<c-j>'
" Use <C-k> to jump to backward placeholder, which is default
let g:coc_snippet_prev = '<c-k>'
Note: you can use same key for both expand snippet and jump forward, jump forward would always have higher priority.
To open snippet files, use command:
:CocList snippets
Your UltiSnips snippets should work most of time, but sometimes not, check out feature list below:
b
, w
and i
.snippets.priority
: priority of snippets source, default 90
.
snippets.extends
: extends filetype's snippets with other filetypes, example:
{
"cpp": ["c"],
"javascriptreact": ["javascript"],
"typescript": ["javascript"]
}
snippets.shortcut
, shortcut in completion menu, default S
.
snippets.ultisnips.enable
: enable load UltiSnips snippets, default true
.
snippets.ultisnips.pythonVersion
: python version to use for run python code,
default to 3
, will always use pyx
commands on vim.
snippets.ultisnips.directories
: directories that searched for snippet files,
could be subfolder in every $runtimepath or absolute paths, default:
["UltiSnips"]
snippets.loadFromExtensions
: specify whether to load snippets from
extensions, default: true
Python regular expression of UltiSnips would be converted to javascript regex, however some
patterns are not supported, including (?s)
, \Z
, (?(id/name)yes-pattern|no-pattern)
,
(?x)
and free space syntax of multiple line regular expression.
The failed snippets would not be loaded, you can checkout the errors by open output channel:
:CocCommand workspace.showOutput snippets
Q: Can i use this without install ultisnips?
A: Yes, this extension could work with or without UltiSnips installed, it works independently, it doesn't use code or read configuration from UltiSnips.
Q: How to use same key for select next completion item and expand snippet?
A: Use condition keymap like:
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#rpc#request('doKeymap', ['snippets-expand', "\<TAB>"])
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
MIT
FAQs
Snippets extension for coc.nvim
The npm package coc-snippets receives a total of 645 weekly downloads. As such, coc-snippets popularity was classified as not popular.
We found that coc-snippets demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.