From 6bd40aeeeb3aeef6a69294988d40bd4878797584 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 20 Sep 2022 18:46:49 +0100 Subject: [PATCH] update --- UltiSnips/javascript.snippets | 95 ++++++++++++---------------------- UltiSnips/php.snippets | 4 +- init.plugins.vim | 8 +-- lua/init-lsp.lua | 19 ++++--- lua/init-treesitter.lua | 26 +++++----- spell/en.utf-8.add | 27 ++++++++++ spell/en.utf-8.add.spl | Bin 3644 -> 4044 bytes 7 files changed, 91 insertions(+), 88 deletions(-) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index ef92bb4..5f7c319 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -74,75 +74,50 @@ const $1 = document.querySelectorAll($0); endsnippet snippet jsx "import React ..." -import React from "react"; +import * as React from "react";${1: +import { css } from "@emotion/react";} -class $1 extends React.Component { - constructor(props) { - super(props); - this.state = { - } - } +const `!p snip.rv = snip.basename` = ($2) => { + return ( +
$0 +
+ ); +}; - render() { - return ( - <${2:div} className={this.props.className}> - $0 - - ); - } -} - -export default () => ( - -); +export default `!p snip.rv = snip.basename`; endsnippet -snippet jsxs "import React ... styled" -import React from "react"; -import styled from "styled-components"; -const S = {}; +snippet isi "import { StaticImage } ..." +import { StaticImage } from "gatsby-plugin-image"; +endsnippet -class $1 extends React.Component { - constructor(props) { - super(props); - this.state = { - } - } +snippet simg "" +$0 +endsnippet - render() { - return ( - <${2:div} className={this.props.className}> - $0 - - ); - } -} - -S.$1 = styled($1)\` +snippet st. "styled." +const $1 = styled.${2:div}\` + $0 \`; - -export default () => ( - -); endsnippet -snippet jsc "class ... extends React.Component" -class $1 extends React.Component \{ -${2: constructor(props) \{ - super(props); - this.state = \{ - \} - \}} +snippet icss "import ... from ..." +import \{ css \} from "@emotion/react"; +endsnippet - render() \{ - return ( - <${3:div}${4: className=\{this.props.className\}}> - $0 - - ); - } -} +snippet ccs "const ..Css=css``" +const $1Css = css\` + $0 +\`; +endsnippet + +snippet cse "css={css``}" +css={css\`$0\`} +endsnippet + +snippet css "css={..Css}" +css={$0Css} endsnippet snippet th "this.handle..." @@ -206,7 +181,3 @@ endsnippet snippet imp "import ... from ..." import $1 from "${2:.}/$1"; endsnippet - -snippet impcss "import ... from ..." -import \{ css \} from "@emotion/react"; -endsnippet diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index d6f83e4..857246f 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -71,11 +71,11 @@ snippet ''= "'...' => " endsnippet snippet apm "add_post_meta(..." -add_post_meta( ${1:671}, '$2', $0); +add_post_meta( ${1:2720}, '__DEBUG__$2', $0); endsnippet snippet upm "update_post_meta(..." -update_post_meta( ${1:671}, '$1', $0); +update_post_meta( ${1:2720}, '__DEBUG__$1', $0); endsnippet snippet sw "switch ..." diff --git a/init.plugins.vim b/init.plugins.vim index ab8c046..e6b5286 100644 --- a/init.plugins.vim +++ b/init.plugins.vim @@ -10,14 +10,14 @@ call plug#begin('~/.config/nvim/bundle') " https://github.com/simrat39/rust-tools.nvim Plug 'simrat39/rust-tools.nvim' +" evaluating +" https://github.com/wuelnerdotexe/vim-astro +Plug 'wuelnerdotexe/vim-astro' + " https://github.com/kevinhwang91/ Plug 'kevinhwang91/promise-async' Plug 'kevinhwang91/nvim-ufo' -" colorscheme (temporary) -Plug 'https://github.com/marko-cerovac/material.nvim', { 'branch': 'main' } -let g:material_style = 'lighter' - " colorscheme in develpment paper-tonic Plug '~/projects/nvim-paper-tonic' diff --git a/lua/init-lsp.lua b/lua/init-lsp.lua index 4a0e976..0120229 100644 --- a/lua/init-lsp.lua +++ b/lua/init-lsp.lua @@ -180,12 +180,8 @@ require('rust-tools').setup({ settings = {["rust-analyzer"] = {checkOnSave = {command = "clippy"}}} } }) --- set inlay hints -require('rust-tools.inlay_hints').set_inlay_hints() --- disable inlay hints -require('rust-tools.inlay_hints').disable_inlay_hints() --- toggle inlay hints -require('rust-tools.inlay_hints').toggle_inlay_hints() +-- inlay hints +require('rust-tools').inlay_hints.enable() ------ -- null-ls @@ -214,6 +210,17 @@ local sources = { root .. "/node_modules/@wordpress/scripts/config/.eslintignore" } }), -- + null_ls.builtins.diagnostics.eslint, + -- null_ls.builtins.diagnostics.eslint.with({ + -- condition = function(utils) + -- local has_file1 = utils.root_has_file({".eslintrc.js"}) + -- local has_file2 = utils.root_has_file({"gatsby-config.js"}) + -- print("condition") + -- print(has_file1) + -- print(has_file2) + -- return has_file1 and has_file2 + -- end + -- }), -- null_ls.builtins.diagnostics.phpcs.with({ condition = function(utils) return not utils.root_has_file({"vendor/bin/phpcs"}) diff --git a/lua/init-treesitter.lua b/lua/init-treesitter.lua index f8ba776..f2574e4 100644 --- a/lua/init-treesitter.lua +++ b/lua/init-treesitter.lua @@ -1,16 +1,14 @@ require'nvim-treesitter.configs'.setup { - ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages - ignore_install = { "c" }, -- List of parsers to ignore installing - highlight = { - enable = true, -- false will disable the whole extension - disable = { "c", "rust" }, -- list of language that will be disabled - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - indent = { - enable = true - } + -- ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages + ignore_install = {"c"}, -- List of parsers to ignore installing + highlight = { + enable = true, -- false will disable the whole extension + disable = {"c", "rust"}, -- list of language that will be disabled + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false + }, + indent = {enable = true} } diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index b570f70..706363c 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -276,3 +276,30 @@ blockchain ABI inline auditable +Creality +fungible +fungible +ERC721 +ERC +hyperledger +Astra +unmerged +forEach +defineProperty +Enumerability +MDN +Iterable +TypedArray +NodeList +iterables +iterable +Roboto +Neue +Helvetica +Okta +W3C +Bracketspace +Jetpack +LearnDash +Astro +frontmatter diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index f77e4f02f7ee5644da2452a670ceb22c14966fec..586e5e5072524710e2ab707ce4dd106b629baa28 100644 GIT binary patch literal 4044 zcmY*cOK&7s6|Q@#+YXtCMWk56iWN4pTFB{%Itw(28Bgqt@HkG!L&T1H-0m*-tw*Y= z?do358jXaaVZk3D0%QRTvSA`NWCI(ofGvVy3*;As?>o1wnT$2Ad(S=3?>z4H5AQ!{ zD(l?%%OH5=vzt+zq;@)+XJ-qS7iCp9?ehGhTfKHGiqqMdE2?I>GJz>fWX?=utPwGp zkwKW|7p62t7=RE2+YPAv79iFp<$By02Qe@~EGOkS!k%26Wc;)eTTo)>Xb&YdViEY%5dHq}?vl8G0u;cfn5SvMq zsGoC~@m{v@#(}vpt!R>vkP41K;@7QYB|O0LlLd^VGQEIH*zVQ-d%RN3%`nZ23|m6R2`E*zg^v%B-}tM}Z1jJ?qVwNMr!sHKSw=6gc;p zTWx^89owv|molv+t8r-IMU7Z0tZJ`ny~3JlFC@xDUWe52jt~5J2S*z1-W$1-C`g@W8@KUvCZ?r`Anv-D=hGwdm=p#Qc7Jr4tLv)!1x zm^S{*{PYDT@))P7NT=E{T7?MS5M=L%|cmU9Y= zaST4{ocjHw8d6hg%X&44EDD;n=1Z9DQ|uM8i8bsIRv+k&9?M~gP>2a(_T6H(s6PA! zX#|v-IDSGm3vU(P^jHu95$-#j(}#$0$e7!a*g2L=vv$Y#+3Y$LJ3F)`SYE9@B8rtp z5PplUn5z`7u>WLOO8`t!a|3iqm==tWSpe6!S$`$uXiDBlf!YE)PGgUr?@LH@?Pg?A z-QllXx$LCI>Xcp*1LER1jF=a8J`N8!@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