Compare commits

..

No commits in common. "fb3a829d3d2db5e6fdf78b53878a9b586a149e42" and "0d94085c262394169d759cfc495190fcfafe4334" have entirely different histories.

3 changed files with 6 additions and 25 deletions

View File

@ -3,23 +3,3 @@ public function $1($2) {
$0
}
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

View File

@ -22,12 +22,13 @@
"python.linting.lintOnSave": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/home/ray/.local/bin/black",
"coc.preferences.formatOnSaveFiletypes": ["python", "vue"],
"coc.preferences.formatOnSaveFiletypes": ["python", "scss", "css", "vue"],
"eslint.enable": true,
"eslint.autoFixOnSave": true,
"eslint.filetypes": [
"javascript",
"vue"
]
],
"prettier.eslintIntegration": true
}

View File

@ -25,8 +25,8 @@ call plug#begin('~/.config/nvim/bundle')
let g:ale_fix_on_save = 1
let g:ale_fix_on_save_ignore = { 'vue': ['eslint'] }
let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
let g:ale_fixers = {'scss': ['stylelint'], 'javascript': [], 'json': ['jq'], 'python': [], 'vue': []}
let g:ale_linters = {'scss': [], 'javascript': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
let g:ale_fixers = {'scss': ['prettier'], 'javascript': [], 'json': ['jq'], 'python': [], 'vue': []}
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'