From 485eefc0176688574df58ce740b415c3782337db Mon Sep 17 00:00:00 2001 From: rayelliott Date: Sat, 9 May 2020 15:26:33 +0000 Subject: [PATCH 1/2] add wh - width, height to css --- UltiSnips/css.snippets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UltiSnips/css.snippets b/UltiSnips/css.snippets index 8307065..e26e679 100644 --- a/UltiSnips/css.snippets +++ b/UltiSnips/css.snippets @@ -39,6 +39,11 @@ snippet h "height: ;" height: ${1:100%}; endsnippet +snippet wh "width: ; height: ;" +width: ${1:100%}; +height: $1; +endsnippet + snippet mxw "max-width: ;" max-width: ${1:100%}; endsnippet From fb3a829d3d2db5e6fdf78b53878a9b586a149e42 Mon Sep 17 00:00:00 2001 From: rayelliott Date: Sun, 10 May 2020 13:15:31 +0000 Subject: [PATCH 2/2] fix merge conflict --- UltiSnips/php.snippets | 22 +++++++++++++++++++++- coc-settings.json | 5 ++--- init.plugins.vim | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 748d6b4..6746b42 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -1,5 +1,25 @@ snippet pf "public function ..." public function $1($2) { - $0 + $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 diff --git a/coc-settings.json b/coc-settings.json index 0e34b9f..b5fa2b7 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -22,13 +22,12 @@ "python.linting.lintOnSave": true, "python.formatting.provider": "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.autoFixOnSave": true, "eslint.filetypes": [ "javascript", "vue" - ], - "prettier.eslintIntegration": true + ] } diff --git a/init.plugins.vim b/init.plugins.vim index 7e6aa16..39be4f5 100644 --- a/init.plugins.vim +++ b/init.plugins.vim @@ -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': [], 'javascript': [], 'json': [], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []} - let g:ale_fixers = {'scss': ['prettier'], 'javascript': [], 'json': ['jq'], 'python': [], 'vue': []} + 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_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'