Compare commits
3 Commits
0d94085c26
...
fb3a829d3d
Author | SHA1 | Date |
---|---|---|
Ray Elliott | fb3a829d3d | |
Ray Elliott | 2ada6bffcf | |
Ray Elliott | 485eefc017 |
|
@ -1,5 +1,25 @@
|
||||||
snippet pf "public function ..."
|
snippet pf "public function ..."
|
||||||
public function $1($2) {
|
public function $1($2) {
|
||||||
$0
|
$0
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet wpregblock "function register_block() { ..."
|
||||||
|
function ${1:plugin_name}_register_block() {
|
||||||
|
|
||||||
|
// automatically load dependencies and version
|
||||||
|
$asset_file = include( plugin_dir_path( __FILE__ ) . '$2/build/index.asset.php');
|
||||||
|
|
||||||
|
wp_register_script(
|
||||||
|
'${1/_/-/g}-${2:block-name}',
|
||||||
|
plugins_url( '$2/build/block.js', __FILE__ ),
|
||||||
|
$asset_file['dependencies'],
|
||||||
|
$asset_file['version']
|
||||||
|
);
|
||||||
|
|
||||||
|
register_block_type( '${3:namespace}/${1/_/-/g}-$2',
|
||||||
|
array( 'editor_script' => '${1/_/-/g}-$2',) );
|
||||||
|
|
||||||
|
}
|
||||||
|
add_action( 'init', '$1_register_block' );
|
||||||
|
endsnippet
|
||||||
|
|
|
@ -22,13 +22,12 @@
|
||||||
"python.linting.lintOnSave": true,
|
"python.linting.lintOnSave": true,
|
||||||
"python.formatting.provider": "black",
|
"python.formatting.provider": "black",
|
||||||
"python.formatting.blackPath": "/home/ray/.local/bin/black",
|
"python.formatting.blackPath": "/home/ray/.local/bin/black",
|
||||||
"coc.preferences.formatOnSaveFiletypes": ["python", "scss", "css", "vue"],
|
"coc.preferences.formatOnSaveFiletypes": ["python", "vue"],
|
||||||
|
|
||||||
"eslint.enable": true,
|
"eslint.enable": true,
|
||||||
"eslint.autoFixOnSave": true,
|
"eslint.autoFixOnSave": true,
|
||||||
"eslint.filetypes": [
|
"eslint.filetypes": [
|
||||||
"javascript",
|
"javascript",
|
||||||
"vue"
|
"vue"
|
||||||
],
|
]
|
||||||
"prettier.eslintIntegration": true
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ call plug#begin('~/.config/nvim/bundle')
|
||||||
let g:ale_fix_on_save = 1
|
let g:ale_fix_on_save = 1
|
||||||
let g:ale_fix_on_save_ignore = { 'vue': ['eslint'] }
|
let g:ale_fix_on_save_ignore = { 'vue': ['eslint'] }
|
||||||
|
|
||||||
let g:ale_linters = {'scss': [], 'javascript': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
|
let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
|
||||||
let g:ale_fixers = {'scss': ['prettier'], 'javascript': [], 'json': ['jq'], 'python': [], 'vue': []}
|
let g:ale_fixers = {'scss': ['stylelint'], 'javascript': [], 'json': ['jq'], 'python': [], 'vue': []}
|
||||||
|
|
||||||
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue