mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
feat(neovim): Custom snippet configuration for Docker & Rust
- VS code format snippets for Docker & Rust - Blink.nvim configured to pick custom snippets automatically
This commit is contained in:
22
common/.config/nvim/custom-snippets/dockerfile.json
Normal file
22
common/.config/nvim/custom-snippets/dockerfile.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"Add User in Debian": {
|
||||
"prefix": "userd",
|
||||
"description": "Add User to Debian Container",
|
||||
"body": [
|
||||
"RUN groupadd -r ${1:username} && useradd -m -r -g ${1:username} ${1:username}",
|
||||
"USER ${1:username}",
|
||||
"WORKDIR \/${2:workdir}",
|
||||
"RUN chown ${1:username}:${1:username} \/${2:workdir}"
|
||||
]
|
||||
},
|
||||
"Add User in Alpine": {
|
||||
"prefix": "usera",
|
||||
"description": "Add User to Alpine Container",
|
||||
"body": [
|
||||
"RUN addgroup -S ${1:username} && adduser -S ${1} -G ${1}",
|
||||
"USER ${1}",
|
||||
"WORKDIR \/${2:workdir}",
|
||||
"RUN chown ${1}:${1} \/${2}"
|
||||
]
|
||||
}
|
||||
}
|
||||
19
common/.config/nvim/custom-snippets/package.json
Normal file
19
common/.config/nvim/custom-snippets/package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "custom-snippets",
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": [
|
||||
"dockerfile"
|
||||
],
|
||||
"path": "./dockerfile.json"
|
||||
},
|
||||
{
|
||||
"language": [
|
||||
"rust"
|
||||
],
|
||||
"path": "./rust.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
0
common/.config/nvim/custom-snippets/rust.json
Normal file
0
common/.config/nvim/custom-snippets/rust.json
Normal file
Reference in New Issue
Block a user