Skip to content

Commit c426071

Browse files
committed
update
1 parent fbfdfec commit c426071

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+9136
-155
lines changed
+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
%YAML 1.2
2+
---
3+
name: RON
4+
file_extensions:
5+
- ron
6+
scope: source.ron
7+
contexts:
8+
main:
9+
- include: extension
10+
- include: value
11+
extension:
12+
- match: '\#\!\['
13+
scope: punctuation.section.array.begin.ron
14+
push:
15+
- meta_scope: meta.structure.array.ron
16+
- match: '\]'
17+
scope: punctuation.section.array.end.ron
18+
pop: true
19+
- include: extension_inner
20+
- match: ','
21+
scope: punctuation.separator.array.ron
22+
- match: '[^\s\]]'
23+
scope: invalid.illegal.expected-array-separator.ron
24+
extension_inner:
25+
- match: 'enable\('
26+
push:
27+
- meta_scope: meta.structure.entity.ron
28+
- match: '\)'
29+
scope: punctuation.section.entity.end.ron
30+
pop: true
31+
- include: extension_name
32+
- match: ','
33+
scope: punctuation.separator.entity.ron
34+
extension_name:
35+
- match: 'unwrap_newtypes'
36+
scope: entity.name.tag.ron
37+
- match: 'implicit_some'
38+
scope: entity.name.tag.ron
39+
array:
40+
- match: '\['
41+
scope: punctuation.section.array.begin.ron
42+
push:
43+
- meta_scope: meta.structure.array.ron
44+
- match: '\]'
45+
scope: punctuation.section.array.end.ron
46+
pop: true
47+
- include: value
48+
- match: ','
49+
scope: punctuation.separator.array.ron
50+
- match: '[^\s\]]'
51+
scope: invalid.illegal.expected-array-separator.ron
52+
comments:
53+
- match: /\*\*(?!/)
54+
scope: punctuation.definition.comment.ron
55+
push:
56+
- meta_scope: comment.block.documentation.ron
57+
- include: block_comment
58+
- match: /\*
59+
scope: punctuation.definition.comment.ron
60+
push:
61+
- meta_scope: comment.block.ron
62+
- include: block_comment
63+
- match: (//).*$\n?
64+
scope: comment.line.double-slash.ron
65+
captures:
66+
1: punctuation.definition.comment.ron
67+
block_comment:
68+
- match: \*/
69+
pop: true
70+
- match: /\*
71+
push: block_comment
72+
constant:
73+
- match: \b(true|false)\b
74+
scope: constant.language.ron
75+
number:
76+
# handles integer and decimal numbers
77+
- match: |-
78+
(?x: # turn on extended mode
79+
-? # an optional minus
80+
(?:
81+
0 # a zero
82+
| # ...or...
83+
[1-9] # a 1-9 character
84+
\d* # followed by zero or more digits
85+
)
86+
(?:
87+
(?:
88+
\. # a period
89+
\d+ # followed by one or more digits
90+
)?
91+
(?:
92+
[eE] # an e character
93+
[+-]? # followed by an option +/-
94+
\d+ # followed by one or more digits
95+
)? # make exponent optional
96+
)? # make decimal portion optional
97+
)
98+
scope: constant.numeric.ron
99+
object:
100+
- match: '[A-Za-z_][A-Za-z_0-9]*'
101+
scope: entity.name.class.ron
102+
- match: '\('
103+
scope: punctuation.section.dictionary.begin.ron
104+
push:
105+
- meta_scope: meta.structure.entity.ron
106+
- match: '\)'
107+
scope: punctuation.section.dictionary.end.ron
108+
pop: true
109+
- match: '[a-z_][A-Za-z_0-9]*'
110+
scope: entity.name.tag.ron
111+
- match: '\:'
112+
scope: punctuation.separator.dictionary.key-value.ron
113+
- include: value
114+
- match: ','
115+
scope: punctuation.separator.dictionary.ron
116+
dictionary:
117+
- match: '\{'
118+
scope: punctuation.section.dictionary.begin.ron
119+
push:
120+
- meta_scope: meta.structure.dictionary.ron
121+
- match: '\}'
122+
scope: punctuation.section.dictionary.end.ron
123+
pop: true
124+
- include: value
125+
- match: ':'
126+
scope: punctuation.separator.dictionary.key-value.ron
127+
- include: value
128+
- match: ','
129+
scope: punctuation.separator.dictionary.ron
130+
string:
131+
- match: '"'
132+
scope: punctuation.definition.string.begin.ron
133+
push: inside-string
134+
inside-string:
135+
- meta_scope: string.quoted.double.ron
136+
- match: '"'
137+
scope: punctuation.definition.string.end.ron
138+
pop: true
139+
- include: string-escape
140+
- match: $\n?
141+
scope: invalid.illegal.unclosed-string.ron
142+
pop: true
143+
string-escape:
144+
- match: |-
145+
(?x: # turn on extended mode
146+
\\ # a literal backslash
147+
(?: # ...followed by...
148+
["\\/bfnrt] # one of these characters
149+
| # ...or...
150+
u # a u
151+
[0-9a-fA-F]{4} # and four hex digits
152+
)
153+
)
154+
scope: constant.character.escape.ron
155+
- match: \\.
156+
scope: invalid.illegal.unrecognized-string-escape.ron
157+
raw_string:
158+
- match: 'r'
159+
- include: raw_string_inner
160+
raw_string_inner:
161+
- match: '#'
162+
push:
163+
- match: '"'
164+
scope: punctuation.definition.string.begin.ron
165+
- meta_scope: string.quoted.double.ron
166+
- match: '"'
167+
scope: punctuation.definition.string.end.ron
168+
- match: '#'
169+
pop: true
170+
value:
171+
- include: constant
172+
- include: number
173+
- include: raw_string
174+
- include: string
175+
- include: array
176+
- include: dictionary
177+
- include: object
178+
- include: comments

.config/bat/themes/kimbro.tmTheme

+12-12
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,18 @@
272272
<string>bold</string>
273273
</dict>
274274
</dict>
275-
<dict>
276-
<key>name</key>
277-
<string>TEST</string>
278-
<key>scope</key>
279-
<string>meta.function-call</string>
280-
<key>settings</key>
281-
<dict>
282-
<!-- #819C3B -->
283-
<key>foreground</key>
284-
<string>#FFFFFF</string>
285-
</dict>
286-
</dict>
275+
<!-- <dict> -->
276+
<!-- <key>name</key> -->
277+
<!-- <string>Arguments to options in bash</string> -->
278+
<!-- <key>scope</key> -->
279+
<!-- <string>meta.function-call</string> -->
280+
<!-- <key>settings</key> -->
281+
<!-- <dict> -->
282+
<!-- [> #819C3B <] -->
283+
<!-- <key>foreground</key> -->
284+
<!-- <string>#aaaaaa</string> -->
285+
<!-- </dict> -->
286+
<!-- </dict> -->
287287
<dict>
288288
<key>name</key>
289289
<string>Derive hashtag</string>

.config/luaformatter/config.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
column_limit: 80
2+
indent_width: 2
3+
use_tab: false
4+
tab_width: 4
5+
continuation_indent_width: 4
6+
spaces_before_call: 1
7+
keep_simple_control_block_one_line: false
8+
keep_simple_function_one_line: true
9+
align_args: true
10+
break_after_functioncall_lp: false
11+
break_before_functioncall_rp: false
12+
spaces_inside_functioncall_parens: false
13+
spaces_inside_functiondef_parens: false
14+
align_parameter: true
15+
chop_down_parameter: false
16+
break_after_functiondef_lp: false
17+
break_before_functiondef_rp: false
18+
align_table_field: true
19+
break_after_table_lb: true
20+
break_before_table_rb: true
21+
chop_down_table: false
22+
chop_down_kv_table: true
23+
table_sep: ","
24+
extra_sep_at_table_end: false
25+
spaces_inside_table_braces: false
26+
break_after_operator: true
27+
double_quote_to_single_quote: false
28+
single_quote_to_double_quote: false
29+
spaces_around_equals_in_field: true
30+
line_breaks_after_function_body: 1

.config/nvim/init.vim

+51
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,7 @@ Plug 'sbdchd/neoformat'
11141114
nnoremap ;ff :Format<CR>
11151115
augroup formatting
11161116
autocmd!
1117+
autocmd FileType lua nmap ;ff :Neoformat! lua luaformat<CR>
11171118
autocmd FileType java nmap ;ff :Neoformat! java prettier<CR>
11181119
autocmd FileType perl nmap ;ff :Neoformat! perl<CR>
11191120
autocmd FileType sh nmap ;ff :Neoformat! sh<CR>
@@ -1787,6 +1788,7 @@ inoremap <expr> <a-;> fzf#complete({
17871788
Plug 'fannheyward/telescope-coc.nvim'
17881789
Plug 'folke/todo-comments.nvim'
17891790
Plug 'Pocco81/HighStr.nvim'
1791+
Plug 'folke/which-key.nvim'
17901792

17911793
Plug 'jamessan/vim-gnupg'
17921794

@@ -2420,6 +2422,7 @@ autocmd FileType cpp nnoremap <Leader>r<CR> :FloatermNew --autoclose=0 g++ % -o
24202422
tnoremap :q! <C-\><C-n>:q!<CR>
24212423
" }}} === Default Terminal ===
24222424

2425+
" ================== TreeSitter ================== {{{
24232426
lua <<EOF
24242427
require'nvim-treesitter.configs'.setup {
24252428
ensure_installed = {
@@ -2433,6 +2436,54 @@ require'nvim-treesitter.configs'.setup {
24332436
},
24342437
}
24352438
EOF
2439+
" }}} === TreeSitter ===
2440+
2441+
2442+
" ================== WhichKey ================== {{{
2443+
lua <<EOF
2444+
require("which-key").setup {
2445+
plugins = {
2446+
marks = true, -- shows a list of your marks on ' and `
2447+
registers = false, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
2448+
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
2449+
-- No actual key bindings are created
2450+
presets = {
2451+
operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion
2452+
motions = false, -- adds help for motions
2453+
text_objects = false, -- help for text objects triggered after entering an operator
2454+
windows = false, -- default bindings on <c-w>
2455+
nav = false, -- misc bindings to work with windows
2456+
z = false, -- bindings for folds, spelling and others prefixed with z
2457+
g = false -- bindings for prefixed with g
2458+
}
2459+
},
2460+
-- add operators that will trigger motion and text object completion
2461+
-- to enable all native operators, set the preset / operators plugin above
2462+
operators = {gc = "Comments"},
2463+
icons = {
2464+
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
2465+
separator = "", -- symbol used between a key and it's label
2466+
group = "+" -- symbol prepended to a group
2467+
},
2468+
window = {
2469+
border = "none", -- none, single, double, shadow
2470+
position = "bottom", -- bottom, top
2471+
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
2472+
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
2473+
},
2474+
layout = {
2475+
height = {min = 4, max = 25}, -- min and max height of the columns
2476+
width = {min = 20, max = 50}, -- min and max width of the columns
2477+
spacing = 3 -- spacing between columns
2478+
},
2479+
hidden = {"lua", "^ "}, -- hide mapping boilerplate
2480+
-- hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "},
2481+
show_help = true, -- show help message on the command line when the popup is visible
2482+
-- triggers = "auto", -- automatically setup triggers
2483+
triggers = {"auto"} -- or specifiy a list manually
2484+
}
2485+
EOF
2486+
" }}} === WhichKey ===
24362487

24372488
" ================== GitSigns ================== {{{
24382489
lua <<EOF

.config/surfraw/elvi/rust_docs

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
11
#!/bin/sh
2-
3-
# elvis: rust_docs -- Search rust_docs (doc.rust-lang.org)
4-
2+
# elvis: rust_docs -- Search rust_docs (docs.rs)
3+
# Generated-By: mkelvis (surfraw-tools) 0.1.0
4+
# NOTE: Any double underscore-prefixed names (i.e., variables and functions)
5+
# are reserved for `mkelvis` and are an implementation detail.
6+
# Depend on at your own risk.
57
. surfraw || exit 1
68

79
w3_usage_hook ()
810
{
911
cat <<EOF
1012
Usage: $w3_argv0 [options] [search words]...
1113
Description:
12-
Search rust_docs (doc.rust-lang.org)
14+
Search rust_docs (docs.rs)
1315
EOF
1416
w3_global_usage
1517
}
1618

1719

1820
w3_config
1921
w3_parse_args "$@"
22+
# `w3_args` now contains a list of arguments.
23+
24+
# Check enums
25+
26+
# Collapse variables
2027

28+
# Any variables in the url should have values now
2129
if test -z "$w3_args"; then
22-
w3_browse_url "https://doc.rust-lang.org"
30+
w3_browse_url "https://docs.rs"
2331
exit
2432
fi
2533

34+
# Map inline variables
2635
# Map each value of inline list variables
2736
##__mkelvis_inline_variable "$SURFRAW_rust_docs_variable" keyword
2837

@@ -33,9 +42,11 @@ fi
3342
## Successive parameters
3443
##mappings="$mappings&param2=$(w3_url_escape "$SURFRAW_rust_docs_variable2")"
3544

45+
# Add the search to url
46+
## Don't expand pathnames so that '*' characters are passed to browser verbatim.
3647
set -f
3748
escaped_args="$(w3_url_of_arg $w3_args)"
3849
_="$escaped_args"
39-
search_url="https://doc.rust-lang.org/std/index.html?search="
50+
search_url="https://docs.rs/releases/search?query=?"
4051
search_url="$search_url$escaped_args"
4152
w3_browse_url "$search_url"

0 commit comments

Comments
 (0)