This commit is contained in:
Ray Elliott 2022-09-20 18:46:49 +01:00
parent aac456d6d5
commit 6bd40aeeeb
7 changed files with 91 additions and 88 deletions

View File

@ -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 (
<div>$0
</div>
);
};
render() {
return (
<${2:div} className={this.props.className}>
$0
</$2>
);
}
}
export default () => (
<S.$1}></S.$1>
);
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 "<StaticImage ... />"
<StaticImage src="$1" alt="$2" />$0
endsnippet
render() {
return (
<${2:div} className={this.props.className}>
$0
</$2>
);
}
}
S.$1 = styled($1)\`
snippet st. "styled."
const $1 = styled.${2:div}\`
$0
\`;
export default () => (
<S.$1}></S.$1>
);
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
</$3>
);
}
}
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

View File

@ -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 ..."

View File

@ -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'

View File

@ -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"})

View File

@ -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}
}

View File

@ -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

Binary file not shown.