diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 6746b42..748d6b4 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -1,25 +1,5 @@ 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 b5fa2b7..0e34b9f 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -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 } diff --git a/init.plugins.vim b/init.plugins.vim index 39be4f5..7e6aa16 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': ['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'